Skip to content

Commit

Permalink
Abductor's assistant (#10876)
Browse files Browse the repository at this point in the history
Co-authored-by: KIBORG04 <[email protected]>
  • Loading branch information
Chip11-n and KIBORG04 authored Mar 22, 2023
1 parent 694a63e commit edd6f6a
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 9 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/gamemodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
// Role IDs
#define ABDUCTOR_AGENT "Abductor Agent"
#define ABDUCTOR_SCI "Abductor Scientist"
#define ABDUCTOR_ASSISTANT "Abductor Assistant"
#define ABDUCTED "Abducted"
#define BORER "Cortical Borer"
#define BLOBOVERMIND "Blob Overmind"
Expand Down
32 changes: 30 additions & 2 deletions code/game/gamemodes/modes_gameplays/abduction/gland.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
cooldown_high = 2400
uses = 1

/obj/item/gland/slime_boom/activate()
/obj/item/gland/true_form/activate()
host.visible_message("<span class='danger'>[host] explodes into creatures!</span>")
var/turf/pos = get_turf(host)
new /mob/living/carbon/slime(pos)
Expand All @@ -92,7 +92,6 @@
var/obj/effect/proc_holder/spell/S = new /obj/effect/proc_holder/spell/no_target/shapeshift/abductor()
host.AddSpell(S)
S.cast(null, host)
S.cast(null, host)

//MINDSHOCK
/obj/item/gland/mindshock
Expand Down Expand Up @@ -125,6 +124,35 @@
to_chat(host, "<span class='notice'>You feel unlike yourself.</span>")
host.set_species_soft(pick(HUMAN, UNATHI, TAJARAN, SKRELL, DIONA, PODMAN, VOX))

//Abductor
/obj/item/gland/abductor
desc = "Creates your new ally"
uses = 0
icon_state = "species"
var/team = 0

/obj/item/gland/abductor/Inject(mob/living/carbon/human/target)
. = ..()
if(tgui_alert(target, "Вы станете новым членом команды пришельцев, и за одно предадите всё человечество!", "Стать ассистентом пришельцев?", list("Да", "Нет"), 15 SECONDS) == "Да")
to_chat(host, "<span class='notice'>You feel something moving in your brain.</span>")
host.AdjustConfused(8)
host.make_jittery(60)
host.emote("scream")
var/datum/faction/abductors/req_f
for(var/datum/faction/abductors/F in find_factions_by_type(/datum/faction/abductors))
if(F.team_number == team)
req_f = F
break
if(!req_f)
return
host.setOxyLoss(0) //They can't heal oxyloss, so we need to deal with it right now
var/datum/role/R = SSticker.mode.CreateRole(/datum/role/abductor/assistant, host)
req_f.HandleRecruitedRole(R)
setup_role(R, TRUE)
else
host = null
target.organs -= src
forceMove(get_turf(target))

//VENTCRAWLING
/obj/item/gland/ventcrawling
Expand Down
29 changes: 23 additions & 6 deletions code/game/gamemodes/modes_gameplays/abduction/machinery/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"agent helmet" =1,
"additional agent equipment" =1,
"additional scientist equipment" =1,
"silence gloves" =3)
"transforming gland" =1,
"silence gloves" =3,
"recall implant" =4)

var/baton_modules_bought = FALSE

Expand Down Expand Up @@ -97,7 +99,9 @@
dat += "<a href='?src=\ref[src];dispense=tool'>Science Tool</A><br>"
dat += "<a href='?src=\ref[src];dispense=agent_gear'>Additional agent equipment</A><br>"
dat += "<a href='?src=\ref[src];dispense=scientist_gear'>Additional scientist equipment</A><br>"
dat += "<a href='?src=\ref[src];dispense=trans_gland'>Transforming gland</A><br>"
dat += "<a href='?src=\ref[src];dispense=silence_gloves'>Silence gloves</A><br>"
dat += "<a href='?src=\ref[src];dispense=recall_implant'>Recall implant</A><br>"
dat += "<a href='?src=\ref[src];show_prices=1'>[show_price_list ? "Close Price List" : "Open Price List"]</a><br>"
if(show_price_list)
dat += "<div class='Section'>[get_price_list()]</div>"
Expand Down Expand Up @@ -188,6 +192,15 @@
if("scientist_gear")
if(Dispense(/obj/item/clothing/glasses/hud/health/night))
new /obj/item/weapon/storage/visuals/surgery(pad.loc)
if("trans_gland")
var/obj/item/gland/abductor/G = Dispense(/obj/item/gland/abductor)
if(G)
G.team = team
if("recall_implant")
var/obj/item/weapon/implanter/abductor/G = Dispense(/obj/item/weapon/implanter/abductor, 3)
if(G)
var/obj/item/weapon/implant/abductor/I = G.imp
I.home = pad
if("silence_gloves")
Dispense(/obj/item/clothing/gloves/black/silence, 3)
else if(href_list["show_prices"])
Expand Down Expand Up @@ -281,16 +294,21 @@
gizmo = G
G.console = src
return FALSE
if(istype(O, /obj/item/clothing/suit/armor/abductor/vest))
else if(istype(O, /obj/item/clothing/suit/armor/abductor/vest))
var/obj/item/clothing/suit/armor/abductor/vest/V = O
to_chat(user, "<span class='notice'>You link the vest to the console.</span>")
vest = V
return FALSE
if(istype(O, /obj/item/weapon/abductor_baton))
else if(istype(O, /obj/item/weapon/abductor_baton))
var/obj/item/weapon/abductor_baton/B = O
to_chat(user, "<span class='notice'>You link the advanced baton to the console.</span>")
B.console = src
return FALSE
else if(istype(O, /obj/item/gland/abductor))
experiment.points++
visible_message("Refunded!")
qdel(O)
return FALSE
return ..()

/obj/machinery/abductor/console/proc/Dispense(item,cost=1)
Expand All @@ -299,10 +317,9 @@
visible_message("Incoming supply!")
if(pad)
flick("alien-pad", pad)
new item(pad.loc)
. = new item(pad.loc)
else
new item(loc)
return TRUE
. = new item(loc)
else
visible_message("Insufficent data!")
return FALSE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/obj/machinery/abductor/gland_dispenser/atom_init()
. = ..()
gland_types = subtypesof(/obj/item/gland)
gland_types = subtypesof(/obj/item/gland) - /obj/item/gland/abductor
gland_types = shuffle(gland_types)
gland_colors = new/list(gland_types.len)
amounts = new/list(gland_types.len)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
if(!GlandTest)
visible_message("Experimental dissection not detected!")
return "<span class='bad'>No glands detected!</span>"
if(istype(GlandTest, /obj/item/gland/abductor))
return "<span class='bad'>Special gland interferes with an experiment!</span>"
if(H.mind != null && H.ckey != null)
history += H
visible_message("Processing specimen...")
Expand Down
16 changes: 16 additions & 0 deletions code/game/gamemodes/roles/abductor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@
G.console = console
beamplant.home = console.pad

/datum/role/abductor/assistant
name = "Assistant"
id = ABDUCTOR_ASSISTANT
skillset_type = /datum/skillset/abductor/scientist

/datum/role/abductor/assistant/equip_common()
return

/datum/role/abductor/assistant/Greet(greeting, custom)
if(!..())
return FALSE

to_chat(antag.current, "<span class='info'>Help your team. Do the operations for them, look for test subjects, or what is the assistant doing there?</span>")

return TRUE

/datum/role/abducted
name = ABDUCTED
id = ABDUCTED
Expand Down
15 changes: 15 additions & 0 deletions code/game/objects/items/weapons/implants/implanter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,18 @@
imp = new /obj/item/weapon/implant/uplink(src)
. = ..()
update()

/obj/item/weapon/implanter/abductor
name = "Strange implanter"

/obj/item/weapon/implanter/abductor/atom_init()
imp = new /obj/item/weapon/implant/abductor(src)
. = ..()
update()

/obj/item/weapon/implanter/abductor/update()
if (imp)
icon_state = "cimplanter2"
else
icon_state = "cimplanter0"
return

0 comments on commit edd6f6a

Please sign in to comment.