mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
[TGUI] Implant Pad + Implanter Related Sprites + Slight Implant refactor (#18556)
* holy guacamole * TGUI capitilization Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> * TGUI rebuild * implements requested changes * fixes * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * fulfilling more requests * uplink fixes * init order stuff * charlies requested changes * Apply suggestions from code review Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
co-authored by
Nathan Winters
Luc
SteelSlayer
S34N
parent
08f36a9521
commit
520b0914ab
@@ -26,22 +26,25 @@
|
||||
/obj/item/implant
|
||||
name = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
icon_state = "generic" //Shows up as a auto surgeon, used as a placeholder when a implant doesn't have a sprite
|
||||
origin_tech = "materials=2;biotech=3;programming=2"
|
||||
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate)
|
||||
item_color = "black"
|
||||
flags = DROPDEL // By default, don't let implants be harvestable.
|
||||
|
||||
///which implant overlay should be used for implant cases. This should point to a state in implants.dmi
|
||||
var/implant_state = "implant-default"
|
||||
/// How the implant is activated.
|
||||
var/activated = IMPLANT_ACTIVATED_ACTIVE
|
||||
/// Whether the implant is implanted. Null if it's never been inserted, TRUE if it's currently inside someone, or FALSE if it's been removed.
|
||||
var/implanted = null
|
||||
var/implanted
|
||||
/// Who the implant is inside of.
|
||||
var/mob/living/imp_in = null
|
||||
item_color = "b"
|
||||
var/mob/living/imp_in
|
||||
|
||||
/// Whether multiple implants of this same type can be inserted into someone.
|
||||
var/allow_multiple = FALSE
|
||||
/// Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted.
|
||||
var/uses = -1
|
||||
flags = DROPDEL // By default, don't let implants be harvestable.
|
||||
|
||||
/// List of emote keys that activate this implant when used.
|
||||
var/list/trigger_emotes
|
||||
@@ -50,6 +53,18 @@
|
||||
/// Whether this implant has already triggered on death or not, to prevent it firing multiple times.
|
||||
var/has_triggered_on_death = FALSE
|
||||
|
||||
///the implant_fluff datum attached to this implant, purely cosmetic "lore" information
|
||||
var/datum/implant_fluff/implant_data = /datum/implant_fluff
|
||||
|
||||
/obj/item/implant/Initialize(mapload)
|
||||
. = ..()
|
||||
if(ispath(implant_data))
|
||||
implant_data = new implant_data
|
||||
|
||||
/obj/item/implant/Destroy()
|
||||
QDEL_NULL(implant_data)
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/proc/unregister_emotes()
|
||||
if(imp_in && LAZYLEN(trigger_emotes))
|
||||
for(var/emote in trigger_emotes)
|
||||
@@ -212,10 +227,6 @@
|
||||
removed(imp_in)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/implant/proc/get_data()
|
||||
return "No information available"
|
||||
|
||||
/obj/item/implant/dropped(mob/user)
|
||||
. = TRUE
|
||||
..()
|
||||
|
||||
@@ -2,20 +2,23 @@
|
||||
name = "recall implant"
|
||||
desc = "Returns you to the mothership."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "implant"
|
||||
icon_state = "implant" //ew
|
||||
activated = IMPLANT_ACTIVATED_ACTIVE
|
||||
origin_tech = "materials=2;biotech=7;magnets=4;bluespace=4;abductor=5"
|
||||
implant_data = /datum/implant_fluff/abductor
|
||||
implant_state = "implant-alien"
|
||||
|
||||
var/obj/machinery/abductor/pad/home
|
||||
var/cooldown = 30
|
||||
var/total_cooldown = 30
|
||||
|
||||
/obj/item/implant/abductor/activate()
|
||||
if(cooldown == total_cooldown)
|
||||
home.Retrieve(imp_in,1)
|
||||
home.Retrieve(imp_in, 1)
|
||||
cooldown = 0
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(imp_in, "<span class='warning'>You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!</span>")
|
||||
to_chat(imp_in, "<span class='warning'>You must wait [(total_cooldown - cooldown) * 2] seconds to use [src] again!</span>")
|
||||
|
||||
/obj/item/implant/abductor/process()
|
||||
if(cooldown < total_cooldown)
|
||||
@@ -36,7 +39,7 @@
|
||||
if(!home)
|
||||
console = get_team_console(pick(1, 2, 3, 4))
|
||||
home = console.pad
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/abductor/proc/get_team_console(team)
|
||||
var/obj/machinery/abductor/console/console
|
||||
@@ -45,3 +48,18 @@
|
||||
console = c
|
||||
break
|
||||
return console
|
||||
|
||||
/obj/item/implanter/abductor
|
||||
name = "implanter (abductor)"
|
||||
|
||||
/obj/item/implanter/abductor/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/abductor(src)
|
||||
|
||||
/obj/item/implantcase/abductor
|
||||
name = "implant case - 'abductor'"
|
||||
desc = "A glass case containing an abductor implant."
|
||||
|
||||
/obj/item/implantcase/abductor/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/abductor(src)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/item/implant/adrenalin
|
||||
name = "adrenal implant"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
icon_state = "adrenal"
|
||||
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
|
||||
uses = 3
|
||||
implant_data = /datum/implant_fluff/adrenaline
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
/obj/item/implant/adrenalin/activate()
|
||||
uses--
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetKnockDown(0)
|
||||
imp_in.SetParalysis(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
imp_in.stand_up(TRUE)
|
||||
|
||||
imp_in.reagents.add_reagent("synaptizine", 10)
|
||||
imp_in.reagents.add_reagent("omnizine", 10)
|
||||
imp_in.reagents.add_reagent("stimulative_agent", 10)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
|
||||
/obj/item/implanter/adrenalin/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/adrenalin(src)
|
||||
|
||||
/obj/item/implantcase/adrenaline
|
||||
name = "implant case - 'Adrenaline'"
|
||||
desc = "A glass case containing an adrenaline implant."
|
||||
|
||||
/obj/item/implantcase/adrenaline/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/adrenalin(src)
|
||||
@@ -5,25 +5,11 @@
|
||||
origin_tech = "materials=3;biotech=4"
|
||||
container_type = OPENCONTAINER
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ANY
|
||||
implant_data = /datum/implant_fluff/chem
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implant/chem/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
|
||||
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
|
||||
<b>Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject<BR>
|
||||
will suffer from an increased appetite.</B><BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal<BR>
|
||||
the implant releases the chemicals directly into the blood stream.<BR>
|
||||
<b>Special Features:</b>
|
||||
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.<BR>
|
||||
Can only be loaded while still in its original case.<BR>
|
||||
<b>Integrity:</b> Implant will last so long as the subject is alive."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/chem/New()
|
||||
..()
|
||||
/obj/item/implant/chem/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(50)
|
||||
GLOB.tracked_implants += src
|
||||
|
||||
@@ -35,9 +21,10 @@
|
||||
activate(reagents.total_volume)
|
||||
|
||||
/obj/item/implant/chem/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
if(!cause || !imp_in)
|
||||
return FALSE
|
||||
var/mob/living/carbon/R = imp_in
|
||||
var/injectamount = null
|
||||
var/injectamount
|
||||
if(cause == "action_button")
|
||||
injectamount = reagents.total_volume
|
||||
else
|
||||
@@ -48,11 +35,16 @@
|
||||
to_chat(R, "<span class='italics'>You hear a faint click from your chest.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implanter/chem
|
||||
name = "implanter (chem)"
|
||||
|
||||
/obj/item/implanter/chem/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/dust(src)
|
||||
/obj/item/implantcase/chem
|
||||
name = "implant case - 'Remote Chemical'"
|
||||
desc = "A glass case containing a remote chemical implant."
|
||||
|
||||
/obj/item/implantcase/chem/New()
|
||||
/obj/item/implantcase/chem/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/chem(src)
|
||||
..()
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
/obj/item/implant/death_alarm
|
||||
name = "death alarm implant"
|
||||
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
|
||||
var/mobname = "Will Robinson"
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_mothership, /area/shuttle/syndicate_elite))
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ANY
|
||||
implant_data = /datum/implant_fluff/death_alarm
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implant/death_alarm/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Nanotrasen \"Profit Margin\" Class Employee Lifesign Sensor<BR>
|
||||
<b>Life:</b> Activates upon death.<BR>
|
||||
<b>Important Notes:</b> Alerts crew to crewmember death.<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a compact radio signaler that triggers when the host's lifesigns cease.<BR>
|
||||
<b>Special Features:</b> Alerts crew to crewmember death.<BR>
|
||||
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
|
||||
return dat
|
||||
var/mobname = "Unknown"
|
||||
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_mothership, /area/shuttle/syndicate_elite))
|
||||
|
||||
/obj/item/implant/death_alarm/implant(mob/target)
|
||||
. = ..()
|
||||
@@ -59,5 +50,20 @@
|
||||
/obj/item/implant/death_alarm/removed(mob/target)
|
||||
if(..())
|
||||
UnregisterSignal(target, COMSIG_MOB_DEATH)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implanter/death_alarm
|
||||
name = "implanter (Death Alarm)"
|
||||
|
||||
/obj/item/implanter/death_alarm/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/death_alarm(src)
|
||||
|
||||
/obj/item/implantcase/death_alarm
|
||||
name = "Implant Case - 'Death Alarm'"
|
||||
desc = "A case containing a death alarm implant."
|
||||
|
||||
/obj/item/implantcase/death_alarm/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/death_alarm(src)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// Dust implant, for CC officers. Prevents gear theft if they die.
|
||||
|
||||
/obj/item/implant/dust
|
||||
name = "duster implant"
|
||||
desc = "A remote controlled implant that will dust the user upon activation (or death of user)."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remains"
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE | IMPLANT_TRIGGER_NOT_WHEN_GIBBED
|
||||
implant_data = /datum/implant_fluff/dust
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implant/dust/death_trigger(mob/source, force)
|
||||
activate("death")
|
||||
|
||||
/obj/item/implant/dust/activate(cause)
|
||||
if(!cause || !imp_in || cause == "emp")
|
||||
return FALSE
|
||||
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting implant? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes")
|
||||
return FALSE
|
||||
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
|
||||
for(var/obj/item/I in imp_in.contents)
|
||||
if(I == src)
|
||||
continue
|
||||
if(I.flags & NODROP)
|
||||
qdel(I)
|
||||
imp_in.dust()
|
||||
|
||||
/obj/item/implant/dust/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/implanter/dust
|
||||
name = "implanter (Dust-on-death)"
|
||||
|
||||
/obj/item/implanter/dust/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/dust(src)
|
||||
|
||||
/obj/item/implantcase/dust
|
||||
name = "implant case - 'Dust'"
|
||||
desc = "A glass case containing a dust implant."
|
||||
|
||||
/obj/item/implantcase/dust/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/dust(src)
|
||||
@@ -0,0 +1,29 @@
|
||||
/obj/item/implant/emp
|
||||
name = "emp implant"
|
||||
desc = "Triggers an EMP."
|
||||
icon_state = "emp"
|
||||
origin_tech = "biotech=3;magnets=4;syndicate=1"
|
||||
uses = 2
|
||||
implant_data = /datum/implant_fluff/emp
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
/obj/item/implant/emp/activate()
|
||||
uses--
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/empulse, get_turf(imp_in), 3, 5, 1)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
|
||||
/obj/item/implanter/emp/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/emp(src)
|
||||
|
||||
/obj/item/implantcase/emp
|
||||
name = "implant case - 'EMP'"
|
||||
desc = "A glass case containing an EMP implant."
|
||||
|
||||
/obj/item/implantcase/emp/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/emp(src)
|
||||
@@ -0,0 +1,36 @@
|
||||
//Exile implants will allow you to use the station gate, but not return home.
|
||||
//This will allow security to exile badguys/for badguys to exile their kill targets
|
||||
/obj/item/implant/exile
|
||||
name = "exile implant"
|
||||
desc = "Prevents you from returning from away missions"
|
||||
origin_tech = "materials=2;biotech=3;magnets=2;bluespace=3"
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
implant_data = /datum/implant_fluff/exile
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implanter/exile
|
||||
name = "implanter (exile)"
|
||||
|
||||
/obj/item/implanter/exile/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/exile(src)
|
||||
|
||||
/obj/item/implantcase/exile
|
||||
name = "implant case - 'Exile'"
|
||||
desc = "A glass case containing an exile implant."
|
||||
|
||||
/obj/item/implantcase/exile/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/exile(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/exile
|
||||
name = "exile implants"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
|
||||
/obj/structure/closet/secure_closet/exile/populate_contents()
|
||||
new /obj/item/implanter/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
new /obj/item/implantcase/exile(src)
|
||||
@@ -4,24 +4,15 @@
|
||||
icon_state = "explosive"
|
||||
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE // Not surviving that
|
||||
implant_data = /datum/implant_fluff/explosive
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
var/detonating = FALSE
|
||||
var/weak = 2
|
||||
var/medium = 0.8
|
||||
var/heavy = 0.4
|
||||
var/delay = 7
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE // Not surviving that
|
||||
|
||||
/obj/item/implant/explosive/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
|
||||
<b>Life:</b> Activates upon death.<BR>
|
||||
<b>Important Notes:</b> Explodes<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
|
||||
<b>Special Features:</b> Explodes<BR>
|
||||
"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/explosive/death_trigger(mob/source, gibbed)
|
||||
activate("death")
|
||||
@@ -48,31 +39,32 @@
|
||||
timed_explosion()
|
||||
|
||||
/obj/item/implant/explosive/implant(mob/source)
|
||||
var/obj/item/implant/explosive/imp_e = locate(src.type) in source
|
||||
var/obj/item/implant/explosive/imp_e = locate(type) in source
|
||||
if(imp_e && imp_e != src)
|
||||
imp_e.heavy += heavy
|
||||
imp_e.medium += medium
|
||||
imp_e.weak += weak
|
||||
imp_e.delay += delay
|
||||
qdel(src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/explosive/proc/timed_explosion()
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
var/wait_delay = delay / 4
|
||||
sleep(wait_delay)
|
||||
if(imp_in && imp_in.stat)
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Weaken(14 SECONDS)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(wait_delay)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(wait_delay)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
sleep(wait_delay)
|
||||
explosion(src, heavy,medium,weak,weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib()
|
||||
qdel(src)
|
||||
@@ -86,18 +78,20 @@
|
||||
medium = 8
|
||||
heavy = 4
|
||||
delay = 70
|
||||
implant_data = new /datum/implant_fluff/explosive_macro
|
||||
|
||||
/obj/item/implant/explosive/macro/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
if(!cause || !imp_in)
|
||||
return FALSE
|
||||
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
return FALSE
|
||||
to_chat(imp_in, "<span class='notice'>You activate your macrobomb implant.</span>")
|
||||
timed_explosion()
|
||||
|
||||
/obj/item/implant/explosive/macro/implant(mob/source)
|
||||
var/obj/item/implant/explosive/imp_e = locate(src.type) in source
|
||||
var/obj/item/implant/explosive/imp_e = locate(type) in source
|
||||
if(imp_e && imp_e != src)
|
||||
return 0
|
||||
return FALSE
|
||||
imp_e = locate(/obj/item/implant/explosive) in source
|
||||
if(imp_e && imp_e != src)
|
||||
heavy += imp_e.heavy
|
||||
@@ -112,73 +106,29 @@
|
||||
/obj/item/implanter/explosive
|
||||
name = "implanter (explosive)"
|
||||
|
||||
/obj/item/implanter/explosive/New()
|
||||
/obj/item/implanter/explosive/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/explosive(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/implantcase/explosive
|
||||
name = "implant case - 'Explosive'"
|
||||
desc = "A glass case containing an explosive implant."
|
||||
name = "implant case - 'Micro Explosive'"
|
||||
desc = "A glass case containing a micro explosive implant."
|
||||
|
||||
/obj/item/implantcase/explosive/New()
|
||||
/obj/item/implantcase/explosive/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/explosive(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/implanter/explosive_macro
|
||||
name = "implanter (macro-explosive)"
|
||||
|
||||
/obj/item/implanter/explosive_macro/New()
|
||||
/obj/item/implanter/explosive_macro/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/explosive/macro(src)
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/explosive_macro
|
||||
name = "implant case - 'Macro Explosive'"
|
||||
desc = "A glass case containing a macro explosive implant."
|
||||
|
||||
// Dust implant, for CC officers. Prevents gear theft if they die.
|
||||
|
||||
/obj/item/implant/dust
|
||||
name = "duster implant"
|
||||
desc = "An alarm which monitors host vital signs, transmitting a radio message and dusting the corpse on death."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remains"
|
||||
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
||||
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE | IMPLANT_TRIGGER_NOT_WHEN_GIBBED
|
||||
|
||||
/obj/item/implant/dust/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Ultraviolet Corp XX-13 Security Implant<BR>
|
||||
<b>Life:</b> Activates upon death.<BR>
|
||||
<b>Important Notes:</b> Vaporizes organic matter<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death. <BR>
|
||||
<b>Special Features:</b> Vaporizes<BR>
|
||||
"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/dust/death_trigger(emote, mob/source, force)
|
||||
activate("death")
|
||||
|
||||
/obj/item/implant/dust/activate(cause)
|
||||
if(!cause || !imp_in || cause == "emp")
|
||||
return 0
|
||||
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting implant? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
|
||||
for(var/obj/item/I in imp_in.contents)
|
||||
if(I == src)
|
||||
continue
|
||||
if(I.flags & NODROP)
|
||||
qdel(I)
|
||||
imp_in.dust()
|
||||
|
||||
/obj/item/implant/dust/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/implanter/dust
|
||||
name = "implanter (Dust-on-death)"
|
||||
|
||||
/obj/item/implanter/dust/New()
|
||||
imp = new /obj/item/implant/dust(src)
|
||||
..()
|
||||
/obj/item/implantcase/explosive_macro/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/explosive/macro(src)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
item_color = "r"
|
||||
origin_tech = "combat=5;magnets=3;biotech=4;syndicate=2"
|
||||
uses = 4
|
||||
implant_data = /datum/implant_fluff/freedom
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
|
||||
/obj/item/implant/freedom/activate()
|
||||
@@ -25,36 +27,17 @@
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/implant/freedom/get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Freedom Beacon<BR>
|
||||
<b>Life:</b> optimum 5 uses<BR>
|
||||
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Transmits a specialized cluster of signals to override handcuff locking
|
||||
mechanisms<BR>
|
||||
<b>Special Features:</b><BR>
|
||||
<i>Neuro-Scan</i>- Analyzes certain shadow signals in the nervous system<BR>
|
||||
<HR>
|
||||
No Implant Specifics"}
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/implanter/freedom
|
||||
name = "implanter (freedom)"
|
||||
|
||||
/obj/item/implanter/freedom/New()
|
||||
/obj/item/implanter/freedom/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/freedom(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/implantcase/freedom
|
||||
name = "implant case - 'Freedom'"
|
||||
desc = "A glass case containing a freedom implant."
|
||||
|
||||
/obj/item/implantcase/freedom/New()
|
||||
/obj/item/implantcase/freedom/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/freedom(src)
|
||||
..()
|
||||
|
||||
+3
@@ -1,6 +1,9 @@
|
||||
/obj/item/implant/health
|
||||
name = "health implant"
|
||||
activated = FALSE
|
||||
implant_data = /datum/implant_fluff/health
|
||||
implant_state = "implant-default"
|
||||
|
||||
var/healthstring = ""
|
||||
|
||||
/obj/item/implant/health/proc/sensehealth()
|
||||
@@ -5,15 +5,10 @@
|
||||
icon_state ="scroll2"
|
||||
activated = IMPLANT_ACTIVATED_ACTIVE
|
||||
origin_tech = "materials=2;biotech=4;combat=5;syndicate=4"
|
||||
var/datum/martial_art/krav_maga/style = new
|
||||
implant_data = /datum/implant_fluff/krav_maga
|
||||
implant_state = "implant-default"
|
||||
|
||||
/obj/item/implant/krav_maga/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Krav Maga Implant<BR>
|
||||
<b>Life:</b> 4 hours after death of host<BR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Teaches even the clumsiest host the arts of Krav Maga."}
|
||||
return dat
|
||||
var/datum/martial_art/krav_maga/style = new
|
||||
|
||||
/obj/item/implant/krav_maga/activate()
|
||||
var/mob/living/carbon/human/H = imp_in
|
||||
@@ -27,14 +22,14 @@
|
||||
/obj/item/implanter/krav_maga
|
||||
name = "implanter (krav maga)"
|
||||
|
||||
/obj/item/implanter/krav_maga/New()
|
||||
/obj/item/implanter/krav_maga/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/krav_maga(src)
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/krav_maga
|
||||
name = "implant case - 'Krav Maga'"
|
||||
desc = "A glass case containing an implant that can teach the user the art of Krav Maga."
|
||||
|
||||
/obj/item/implantcase/krav_maga/New()
|
||||
/obj/item/implantcase/krav_maga/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/krav_maga(src)
|
||||
..()
|
||||
|
||||
@@ -3,19 +3,8 @@
|
||||
desc = "Stops people messing with your mind."
|
||||
origin_tech = "materials=2;biotech=4;programming=4"
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
|
||||
/obj/item/implant/mindshield/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
|
||||
<b>Life:</b> Ten years.<BR>
|
||||
<b>Important Notes:</b> Personnel injected with this device can better resist mental compulsions.<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
|
||||
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
|
||||
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
|
||||
return dat
|
||||
|
||||
implant_data = /datum/implant_fluff/mindshield
|
||||
implant_state = "implant-nanotrasen"
|
||||
|
||||
/obj/item/implant/mindshield/implant(mob/target)
|
||||
if(..())
|
||||
@@ -35,18 +24,17 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/implanter/mindshield
|
||||
name = "implanter (mindshield)"
|
||||
|
||||
/obj/item/implanter/mindshield/New()
|
||||
/obj/item/implanter/mindshield/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/mindshield(src)
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/mindshield
|
||||
name = "implant case - 'mindshield'"
|
||||
desc = "A glass case containing a mindshield implant."
|
||||
|
||||
/obj/item/implantcase/mindshield/New()
|
||||
/obj/item/implantcase/mindshield/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/mindshield(src)
|
||||
..()
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
/obj/item/implant/weapons_auth
|
||||
name = "firearms authentication implant"
|
||||
desc = "Lets you shoot your guns"
|
||||
icon_state = "auth"
|
||||
origin_tech = "magnets=2;programming=7;biotech=5;syndicate=5"
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
|
||||
/obj/item/implant/weapons_auth/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Firearms Authentication Implant<BR>
|
||||
<b>Life:</b> 4 hours after death of host<BR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Allows operation of implant-locked weaponry, preventing equipment from falling into enemy hands."}
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/implant/adrenalin
|
||||
name = "adrenal implant"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
icon_state = "adrenal"
|
||||
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
|
||||
uses = 3
|
||||
|
||||
/obj/item/implant/adrenalin/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Cybersun Industries Adrenaline Implant<BR>
|
||||
<b>Life:</b> Five days.<BR>
|
||||
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> Subjects injected with implant can activate an injection of medical cocktails.<BR>
|
||||
<b>Function:</b> Removes stuns, increases speed, and has a mild healing effect.<BR>
|
||||
<b>Integrity:</b> Implant can only be used three times before reserves are depleted."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/adrenalin/activate()
|
||||
uses--
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetKnockDown(0)
|
||||
imp_in.SetParalysis(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
imp_in.stand_up(TRUE)
|
||||
|
||||
imp_in.reagents.add_reagent("synaptizine", 10)
|
||||
imp_in.reagents.add_reagent("omnizine", 10)
|
||||
imp_in.reagents.add_reagent("stimulative_agent", 10)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/implant/emp
|
||||
name = "emp implant"
|
||||
desc = "Triggers an EMP."
|
||||
icon_state = "emp"
|
||||
origin_tech = "biotech=3;magnets=4;syndicate=1"
|
||||
uses = 2
|
||||
|
||||
/obj/item/implant/emp/activate()
|
||||
uses--
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/empulse, get_turf(imp_in), 3, 5, 1)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implant/cortical
|
||||
name = "cortical stack"
|
||||
desc = "A fist-sized mass of biocircuits and chips."
|
||||
icon_state = "implant_evil"
|
||||
+6
-11
@@ -4,13 +4,8 @@
|
||||
trigger_emotes = list("deathgasp")
|
||||
// If something forces the clown to fake death, it's pretty funny to still see the sad trombone played
|
||||
trigger_causes = IMPLANT_EMOTE_TRIGGER_UNINTENTIONAL | IMPLANT_TRIGGER_DEATH_ANY
|
||||
|
||||
/obj/item/implant/sad_trombone/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Honk Co. Sad Trombone Implant<BR>
|
||||
<b>Life:</b> Activates upon death.<BR>
|
||||
"}
|
||||
return dat
|
||||
implant_data = /datum/implant_fluff/sad_trombone
|
||||
implant_state = "implant-honk"
|
||||
|
||||
/obj/item/implant/sad_trombone/emote_trigger(emote, mob/source, force)
|
||||
activate(emote)
|
||||
@@ -25,14 +20,14 @@
|
||||
/obj/item/implanter/sad_trombone
|
||||
name = "implanter (sad trombone)"
|
||||
|
||||
/obj/item/implanter/sad_trombone/New() //gross
|
||||
/obj/item/implanter/sad_trombone/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/sad_trombone
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/sad_trombone
|
||||
name = "implant case - 'Sad Trombone'"
|
||||
desc = "A glass case containing a sad trombone implant."
|
||||
|
||||
/obj/item/implantcase/sad_trombone/New() //gross
|
||||
/obj/item/implantcase/sad_trombone/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/sad_trombone
|
||||
..()
|
||||
@@ -7,17 +7,19 @@
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
silent = TRUE
|
||||
|
||||
|
||||
/obj/item/implant/storage
|
||||
name = "storage implant"
|
||||
desc = "Stores up to two big items in a bluespace pocket."
|
||||
icon_state = "storage"
|
||||
origin_tech = "materials=2;magnets=4;bluespace=5;syndicate=4"
|
||||
item_color = "r"
|
||||
implant_data = /datum/implant_fluff/storage
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
var/obj/item/storage/hidden/implant/storage
|
||||
|
||||
/obj/item/implant/storage/New()
|
||||
..()
|
||||
/obj/item/implant/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
storage = new /obj/item/storage/hidden/implant(src)
|
||||
|
||||
/obj/item/implant/storage/emp_act(severity)
|
||||
@@ -34,10 +36,10 @@
|
||||
storage.close(M)
|
||||
for(var/obj/item/I in storage)
|
||||
storage.remove_from_storage(I, get_turf(source))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/storage/implant(mob/source)
|
||||
var/obj/item/implant/storage/imp_e = locate(src.type) in source
|
||||
var/obj/item/implant/storage/imp_e = locate(type) in source
|
||||
if(imp_e)
|
||||
imp_e.storage.storage_slots += storage.storage_slots
|
||||
imp_e.storage.max_combined_w_class += storage.max_combined_w_class
|
||||
@@ -49,7 +51,7 @@
|
||||
storage.show_to(source)
|
||||
|
||||
qdel(src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -60,6 +62,14 @@
|
||||
/obj/item/implanter/storage
|
||||
name = "implanter (storage)"
|
||||
|
||||
/obj/item/implanter/storage/New()
|
||||
/obj/item/implanter/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/storage(src)
|
||||
|
||||
/obj/item/implantcase/storage
|
||||
name = "implant case - 'Storage'"
|
||||
desc = "A glass case containing a storage implant."
|
||||
|
||||
/obj/item/implantcase/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/storage(src)
|
||||
..()
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/obj/item/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1
|
||||
var/warn_cooldown = 0
|
||||
|
||||
|
||||
/obj/item/implant/tracking/New()
|
||||
..()
|
||||
GLOB.tracked_implants += src
|
||||
|
||||
/obj/item/implant/tracking/Destroy()
|
||||
GLOB.tracked_implants -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Tracking Beacon<BR>
|
||||
<b>Life:</b> 10 minutes after death of host<BR>
|
||||
<b>Important Notes:</b> None<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> <BR>
|
||||
<b>Function:</b> Continuously transmits low power signal. Useful for tracking.<BR>
|
||||
<b>Special Features:</b><BR>
|
||||
<i>Neuro-Safe</i>- Specialized shell absorbs excess voltages self-destructing the chip if
|
||||
a malfunction occurs thereby securing safety of subject. The implant will melt and
|
||||
disintegrate into bio-safe elements.<BR>
|
||||
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
|
||||
circuitry. As a result neurotoxins can cause massive damage.<HR>
|
||||
Implant Specifics:<BR>"}
|
||||
return dat
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/item/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
activated = IMPLANT_ACTIVATED_PASSIVE
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
implant_data = /datum/implant_fluff/tracking
|
||||
implant_state = "implant-nanotrasen"
|
||||
var/warn_cooldown = 0
|
||||
|
||||
/obj/item/implant/tracking/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.tracked_implants += src
|
||||
|
||||
/obj/item/implant/tracking/Destroy()
|
||||
GLOB.tracked_implants -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/implanter/tracking
|
||||
name = "implanter (tracking)"
|
||||
|
||||
/obj/item/implanter/tracking/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/tracking(src)
|
||||
|
||||
/obj/item/implantcase/tracking
|
||||
name = "implant case - 'Tracking'"
|
||||
desc = "A glass case containing a tracking implant."
|
||||
|
||||
/obj/item/implantcase/tracking/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/tracking(src)
|
||||
@@ -3,21 +3,12 @@
|
||||
desc = "Divide and Conquer"
|
||||
origin_tech = "programming=5;biotech=5;syndicate=8"
|
||||
activated = FALSE
|
||||
implant_data = /datum/implant_fluff/traitor
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
/// The UID of the mindslave's `mind`. Stored to solve GC race conditions and ensure we can remove their mindslave status even when they're deleted or gibbed.
|
||||
var/mindslave_UID
|
||||
|
||||
/obj/item/implant/traitor/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Mind-Slave Implant<BR>
|
||||
<b>Life:</b> ??? <BR>
|
||||
<b>Important Notes:</b> Any humanoid injected with this implant will become loyal to the injector, unless of course the host is already loyal to someone else.<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
|
||||
<b>Special Features:</b> Diplomacy was never so easy.<BR>
|
||||
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/traitor/implant(mob/living/carbon/human/mindslave_target, mob/living/carbon/human/user)
|
||||
// Check `activated` here so you can't just keep taking it out and putting it back into other people.
|
||||
if(!..() || activated || !istype(mindslave_target) || !istype(user)) // Both the target and the user need to be human.
|
||||
@@ -55,3 +46,18 @@
|
||||
. = ..()
|
||||
var/datum/mind/M = locateUID(mindslave_UID)
|
||||
M.remove_antag_datum(/datum/antagonist/mindslave)
|
||||
|
||||
/obj/item/implanter/traitor
|
||||
name = "implanter (Mindslave)"
|
||||
|
||||
/obj/item/implanter/traitor/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/traitor(src)
|
||||
|
||||
/obj/item/implantcase/traitor
|
||||
name = "implant case - 'Mindslave'"
|
||||
desc = "A glass case containing a mindslave implant."
|
||||
|
||||
/obj/item/implantcase/traitor/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/traitor(src)
|
||||
|
||||
+38
-28
@@ -4,54 +4,64 @@
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
|
||||
implant_data = /datum/implant_fluff/uplink
|
||||
implant_state = "implant-syndicate"
|
||||
|
||||
/obj/item/implant/uplink/New()
|
||||
/obj/item/implant/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
..()
|
||||
|
||||
/obj/item/implant/uplink/nuclear/New()
|
||||
..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_NUCLEAR)
|
||||
|
||||
/obj/item/implant/uplink/sit/New()
|
||||
..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_SIT)
|
||||
|
||||
/obj/item/implant/uplink/admin/New()
|
||||
..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_ADMIN)
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/source)
|
||||
var/obj/item/implant/imp_e = locate(src.type) in source
|
||||
var/obj/item/implant/imp_e = locate(type) in source
|
||||
if(imp_e && imp_e != src)
|
||||
imp_e.hidden_uplink.uses += hidden_uplink.uses
|
||||
qdel(src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(..())
|
||||
hidden_uplink.uplink_owner="[source.key]"
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implant/uplink/activate()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.check_trigger(imp_in)
|
||||
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
|
||||
/obj/item/implanter/uplink/New()
|
||||
/obj/item/implanter/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/uplink(src)
|
||||
..()
|
||||
|
||||
/obj/item/implanter/nuclear_uplink
|
||||
name = "implanter (nuclear uplink)"
|
||||
/obj/item/implantcase/uplink
|
||||
name = "implant case - 'Syndicate Uplink'"
|
||||
desc = "A glass case containing an uplink implant."
|
||||
|
||||
/obj/item/implanter/nuclear_uplink/New()
|
||||
/obj/item/implantcase/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/uplink(src)
|
||||
|
||||
/obj/item/implant/uplink/nuclear/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_NUCLEAR)
|
||||
|
||||
/obj/item/implanter/nuclear
|
||||
name = "implanter (Nuclear Agent Uplink)"
|
||||
|
||||
/obj/item/implanter/nuclear/Initialize(mapload)
|
||||
. = ..()
|
||||
imp = new /obj/item/implant/uplink/nuclear(src)
|
||||
..()
|
||||
|
||||
/obj/item/implant/uplink/sit/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_SIT)
|
||||
|
||||
|
||||
/obj/item/implant/uplink/admin/Initialize(mapload)
|
||||
. = ..()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.update_uplink_type(UPLINK_TYPE_ADMIN)
|
||||
@@ -1,16 +1,26 @@
|
||||
/obj/item/implantcase
|
||||
name = "implant case"
|
||||
desc = "A glass case containing an implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-0"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "implantcase"
|
||||
item_state = "implantcase"
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "materials=1;biotech=2"
|
||||
container_type = OPENCONTAINER | INJECTABLE | DRAWABLE
|
||||
materials = list(MAT_GLASS=500)
|
||||
var/obj/item/implant/imp = null
|
||||
materials = list(MAT_GLASS = 500)
|
||||
|
||||
var/obj/item/implant/imp
|
||||
|
||||
/obj/item/implantcase/Initialize(mapload)
|
||||
. = ..()
|
||||
update_state()
|
||||
|
||||
/obj/item/implantcase/Destroy()
|
||||
if(imp)
|
||||
QDEL_NULL(imp)
|
||||
return ..()
|
||||
|
||||
/obj/item/implantcase/proc/update_state()
|
||||
if(imp)
|
||||
@@ -21,17 +31,17 @@
|
||||
origin_tech = initial(origin_tech)
|
||||
flags = initial(flags)
|
||||
reagents = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/implantcase/update_icon_state()
|
||||
/obj/item/implantcase/update_overlays()
|
||||
. = ..()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.item_color]"
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
var/image/implant_overlay = image('icons/obj/implants.dmi', imp.implant_state)
|
||||
. += implant_overlay
|
||||
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/pen))
|
||||
rename_interactive(user, W)
|
||||
else if(istype(W, /obj/item/implanter))
|
||||
@@ -39,7 +49,7 @@
|
||||
if(I.imp)
|
||||
if(imp || I.imp.implanted)
|
||||
return
|
||||
I.imp.loc = src
|
||||
I.imp.forceMove(src)
|
||||
imp = I.imp
|
||||
I.imp = null
|
||||
update_state()
|
||||
@@ -53,46 +63,3 @@
|
||||
imp = null
|
||||
update_state()
|
||||
I.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/*else if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
|
||||
var/obj/item/ammo_casing/shotgun/implanter/I = W
|
||||
if(I.implanter)
|
||||
src.attackby(I.implanter, user, params) */ // COMING SOON -- c0
|
||||
|
||||
/obj/item/implantcase/New()
|
||||
..()
|
||||
update_state()
|
||||
|
||||
|
||||
/obj/item/implantcase/tracking
|
||||
name = "implant case - 'Tracking'"
|
||||
desc = "A glass case containing a tracking implant."
|
||||
|
||||
/obj/item/implantcase/tracking/New()
|
||||
imp = new /obj/item/implant/tracking(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/implantcase/weapons_auth
|
||||
name = "implant case - 'Firearms Authentication'"
|
||||
desc = "A glass case containing a firearms authentication implant."
|
||||
|
||||
/obj/item/implantcase/weapons_auth/New()
|
||||
imp = new /obj/item/implant/weapons_auth(src)
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/adrenaline
|
||||
name = "implant case - 'Adrenaline'"
|
||||
desc = "A glass case containing an adrenaline implant."
|
||||
|
||||
/obj/item/implantcase/adrenaline/New()
|
||||
imp = new /obj/item/implant/adrenalin(src)
|
||||
..()
|
||||
|
||||
/obj/item/implantcase/death_alarm
|
||||
name = "Glass Case- 'Death Alarm'"
|
||||
desc = "A case containing a death alarm implant."
|
||||
|
||||
/obj/item/implantcase/death_alarm/New()
|
||||
imp = new /obj/item/implant/death_alarm(src)
|
||||
..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/injection_cooldown = 600
|
||||
var/replenish_cooldown = 6000
|
||||
var/replenishing = 0
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/mob/living/carbon/occupant
|
||||
var/injecting = FALSE
|
||||
|
||||
/obj/machinery/implantchair/Initialize(mapload)
|
||||
@@ -25,20 +25,20 @@
|
||||
/obj/machinery/implantchair/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/health_text = ""
|
||||
if(src.occupant)
|
||||
if(src.occupant.health <= -100)
|
||||
if(occupant)
|
||||
if(occupant.health <= -100)
|
||||
health_text = "<FONT color=red>Dead</FONT>"
|
||||
else if(src.occupant.health < 0)
|
||||
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
|
||||
else if(occupant.health < 0)
|
||||
health_text = "<FONT color=red>[round(occupant.health, 0.1)]</FONT>"
|
||||
else
|
||||
health_text = "[round(src.occupant.health,0.1)]"
|
||||
health_text = "[round(occupant.health,0.1)]"
|
||||
|
||||
var/dat ="<B>Implanter Status</B><BR>"
|
||||
|
||||
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
|
||||
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=[UID()];replenish=1'>Replenish</A>"]<BR>"
|
||||
if(src.occupant)
|
||||
dat += "[src.ready ? "<A href='?src=[UID()];implant=1'>Implant</A>" : "Recharging"]<BR>"
|
||||
dat +="<B>Current occupant:</B> [occupant ? "<BR>Name: [occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
|
||||
dat += "<B>Implants:</B> [length(implant_list) ? "[length(implant_list)]" : "<A href='?src=[UID()];replenish=1'>Replenish</A>"]<BR>"
|
||||
if(occupant)
|
||||
dat += "[ready ? "<A href='?src=[UID()];implant=1'>Implant</A>" : "Recharging"]<BR>"
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=implant")
|
||||
onclose(user, "implant")
|
||||
@@ -48,7 +48,7 @@
|
||||
if(..())
|
||||
return
|
||||
if(href_list["implant"])
|
||||
if(src.occupant)
|
||||
if(occupant)
|
||||
injecting = TRUE
|
||||
go_out()
|
||||
ready = FALSE
|
||||
@@ -61,7 +61,7 @@
|
||||
add_implants()
|
||||
ready = TRUE
|
||||
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -76,20 +76,20 @@
|
||||
return
|
||||
if(put_mob(M))
|
||||
qdel(G)
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/proc/go_out(mob/M)
|
||||
if(!( src.occupant ))
|
||||
if(!(occupant))
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
occupant.forceMove(loc)
|
||||
if(injecting)
|
||||
implant(src.occupant)
|
||||
implant(occupant)
|
||||
injecting = FALSE
|
||||
src.occupant = null
|
||||
occupant = null
|
||||
icon_state = "implantchair"
|
||||
return
|
||||
|
||||
@@ -98,15 +98,15 @@
|
||||
if(!iscarbon(M))
|
||||
to_chat(usr, "<span class='warning'>[src] cannot hold this!</span>")
|
||||
return
|
||||
if(src.occupant)
|
||||
if(occupant)
|
||||
to_chat(usr, "<span class='warning'>[src] is already occupied!</span>")
|
||||
return
|
||||
M.stop_pulling()
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.add_fingerprint(usr)
|
||||
occupant = M
|
||||
add_fingerprint(usr)
|
||||
icon_state = "implantchair_on"
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/implantchair/proc/implant(mob/M)
|
||||
@@ -126,10 +126,9 @@
|
||||
|
||||
|
||||
/obj/machinery/implantchair/proc/add_implants()
|
||||
for(var/i=0, i<src.max_implants, i++)
|
||||
var/obj/item/implant/mindshield/I = new /obj/item/implant/mindshield(src)
|
||||
implant_list += I
|
||||
return
|
||||
for(var/i in 1 to max_implants)
|
||||
var/obj/item/implant/mindshield/new_implant = new /obj/item/implant/mindshield(src)
|
||||
implant_list += new_implant
|
||||
|
||||
/obj/machinery/implantchair/verb/get_out()
|
||||
set name = "Eject occupant"
|
||||
@@ -137,11 +136,10 @@
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
src.go_out(usr)
|
||||
go_out(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/verb/move_inside()
|
||||
set name = "Move Inside"
|
||||
set category = "Object"
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
/obj/item/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
materials = list(MAT_METAL = 600, MAT_GLASS = 200)
|
||||
toolspeed = 1
|
||||
var/obj/item/implant/imp = null
|
||||
|
||||
var/obj/item/implant/imp
|
||||
|
||||
/obj/item/implanter/update_icon_state()
|
||||
if(imp)
|
||||
@@ -21,7 +20,6 @@
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/carbon/M, mob/user)
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
@@ -47,35 +45,4 @@
|
||||
|
||||
/obj/item/implanter/New()
|
||||
..()
|
||||
spawn(1)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
|
||||
/obj/item/implanter/adrenalin/New()
|
||||
imp = new /obj/item/implant/adrenalin(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
|
||||
/obj/item/implanter/emp/New()
|
||||
imp = new /obj/item/implant/emp(src)
|
||||
..()
|
||||
|
||||
/obj/item/implanter/traitor
|
||||
name = "implanter (Mindslave)"
|
||||
|
||||
/obj/item/implanter/traitor/New()
|
||||
imp = new /obj/item/implant/traitor(src)
|
||||
..()
|
||||
|
||||
/obj/item/implanter/death_alarm
|
||||
name = "implanter (Death Alarm)"
|
||||
|
||||
/obj/item/implanter/death_alarm/New()
|
||||
imp = new /obj/item/implant/death_alarm(src)
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
/**
|
||||
* # Implant Fluff Datum
|
||||
*
|
||||
* Implant fluff is just lore about the implant that is accessed through the implantpad, you must attach
|
||||
* one of these datums to the implant_data var on an implant for it to show it up.
|
||||
*/
|
||||
/datum/implant_fluff
|
||||
var/name = "Unknown Implant"
|
||||
var/life = "Not Specified."
|
||||
var/notes = "No Notes."
|
||||
var/function = "An electronic insert that supplements biological functions."
|
||||
|
||||
/datum/implant_fluff/abductor
|
||||
name = "GC$X9%D#G"
|
||||
life = "Unknown."
|
||||
notes = "Appears to contain highly advanced bluespace technology."
|
||||
|
||||
/datum/implant_fluff/adrenaline
|
||||
name = "Cybersun Industries RX-2 Adrenaline Implant"
|
||||
life = "Five days."
|
||||
notes = "One of Cybersun Industries oldest and simplest implants, even in its simplicity it is rumoured to be one of Cybersun Industries best-selling products."
|
||||
function = "Subjects injected with implant can activate an injection of medical cocktails that removes stuns, increases speed, and has mild healing effects."
|
||||
|
||||
/datum/implant_fluff/chem
|
||||
name = "BioTech Solutions MJ-420 Prisoner Management Implant" //ah yes, MJ-420, old coders are FUNNY
|
||||
life = "Deactivates upon death but remains within the body."
|
||||
notes = "Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units. Can only be loaded while still in its original case."
|
||||
function = "Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal the implant releases the chemicals directly into the blood stream."
|
||||
|
||||
/datum/implant_fluff/death_alarm
|
||||
name = "BioTech Solutions MJ-102 Death Alarm Implant"
|
||||
notes = "Alerts crew to crewmember death."
|
||||
function = "Contains a compact radio signaler that triggers when the host's lifesigns cease."
|
||||
|
||||
/datum/implant_fluff/dust
|
||||
name = "Nanotrasen Employee Dust Implant"
|
||||
life = "Unknown, attempts to retrieve a sample of the implant have often led to the destruction of the implant... and user."
|
||||
notes = "Activates upon death or from manual activation by the user."
|
||||
function = "Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death."
|
||||
|
||||
/datum/implant_fluff/emp
|
||||
name = "Cybersun Industries RX-22 Electromagnetic Pulse Emitter Implant"
|
||||
life = "Destroyed upon final activation."
|
||||
notes = "An minituarized nuclear squib fit snuggly into an implant."
|
||||
function = "Upon detonization the implant will release an EMP affecting the immediate area around the user."
|
||||
|
||||
/datum/implant_fluff/exile
|
||||
name = "Nanotrasen Employee Exile Implant"
|
||||
life = "Known to last up to 3 to 4 years."
|
||||
notes = "The onboard station gateway system has been modified to reject entry by individuals containing this implant."
|
||||
function = "Prevents the user from reentering the station through the gateway.... alive."
|
||||
|
||||
/datum/implant_fluff/explosive
|
||||
name = "Cybersun Industries RX-78 Employee Management Implant"
|
||||
life = "Destroyed upon activation."
|
||||
notes = "Appears to contain a small, dense explosive device wired to a signaller chip, the serial number on the side is scratched out."
|
||||
function = "Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death."
|
||||
|
||||
/datum/implant_fluff/explosive_macro
|
||||
name = "Cybersun Industries RX-79 Employee Management Implant"
|
||||
life = "Destroyed upon activation."
|
||||
notes = "Compared to its predecessor, the RX-79 contains a much larger explosive; sometimes you just need a bigger boom. Due to its bulkiness, it has been known to press into the user's frontal lobe, impairing judgement."
|
||||
function = "Contains a bulky, electrically triggered explosive that detonates upon receiving a specially encoded signal or upon host death."
|
||||
|
||||
/datum/implant_fluff/freedom
|
||||
name = "Cybersun Industries RX-92 Quick Escape Implant"
|
||||
life = "Destroyed after 4 uses."
|
||||
notes = "An implant that is illegal in many systems. It is notoriously known for allowing users to grotesquely fracture bones and over-exert joints in order to slip out of the tightest of restraints."
|
||||
function = "Uses a mixture of cybernetic nanobots, bone regrowth chemicals, and radio signals to quickly break the user out of restraints."
|
||||
|
||||
/datum/implant_fluff/health
|
||||
name = "Nanotrasen Health Implant"
|
||||
|
||||
/datum/implant_fluff/krav_maga
|
||||
name = "Prospero Foreign Industries Krav Maga Neurotrainer"
|
||||
life = "Will cease functioning 4 hours after death of host."
|
||||
notes = "As a consequence of using a neurotrainer, using this implant will overwrite other martial arts knowledge in the users brain."
|
||||
function = "Teaches even the clumsiest host the arts of Krav Maga."
|
||||
|
||||
/datum/implant_fluff/mindshield
|
||||
name = "Nanotrasen Type 3 Mindshield Implant"
|
||||
life = "Studies have shown the implant to last up to 10 years."
|
||||
notes = "This is the third iteration of an implant that has garnered attention from many galactic humanoid rights groups over concerns of self autonomy. Allegedly, it used to force the user to be completely loyal to Nanotrasen."
|
||||
function = "Personnel injected with this device can better resist mental compulsions such as brainwashing and mindslaving."
|
||||
|
||||
/datum/implant_fluff/storage
|
||||
name = "Cybersun Industries RX-16 Collapsible Body Cavity Implant"
|
||||
notes = "Prolonged usage of this implant often results in the users bones being fractured and occassionaly complete organ failure."
|
||||
function = "Allows the user to store two small objects within a cybernetic body cavity."
|
||||
|
||||
/datum/implant_fluff/tracking
|
||||
name = "Nanotrasen RFID Tracking Chip"
|
||||
life = "Unknown, known to last up to a few years."
|
||||
notes = "Tracking implants are Neuro-safe! Makes use of a specialized shell that will melt and disintegrate into bio-safe elements in the event of a malfunction. "
|
||||
function = "Continuously transmits a low power signal. Can be used for tracking and teleporting to the user."
|
||||
|
||||
/datum/implant_fluff/traitor
|
||||
name = "Syndicate Type E Mindslave Implant"
|
||||
life = "Unknown, no collected sample has been active long enough to determine lifespan."
|
||||
notes = "Any humanoid injected with this implant will become loyal to the injector, unless of course the host is already loyal to someone else. It's Diplomacy made easy. The Syndicate is known to use this for political and diplomatic leverage."
|
||||
function = " Contains a small pod of nanobots that manipulate the host's mental functions and slave the host to the implanter."
|
||||
|
||||
/datum/implant_fluff/uplink
|
||||
name = "Syndicate Agent Uplink Implant"
|
||||
life = "Unknown, no collected sample has been active long enough to determine lifespan."
|
||||
notes = "An intricate piece of machinery that interfaces directly with the users brain and which inner workings are a closely guarded syndicate secret."
|
||||
function = "Allows the user to access a syndicate uplink connected contained within their body, invisible from the outside but provides the same functionality as a regular uplink."
|
||||
|
||||
/datum/implant_fluff/sad_trombone
|
||||
name = "BioTech Solutions Comedy Implant"
|
||||
function = "Plays a sad trombone noise upon death of the implantee, allows clowns to entertain the crew even post-mortem."
|
||||
@@ -1,26 +1,36 @@
|
||||
/obj/item/implantpad
|
||||
name = "implantpad"
|
||||
desc = "Used to modify implants."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantpad-0"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "implantpad-off"
|
||||
item_state = "electronic"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/obj/item/implantcase/case = null
|
||||
|
||||
var/obj/item/implantcase/case
|
||||
|
||||
/obj/item/implantpad/Destroy()
|
||||
if(case)
|
||||
dropcase()
|
||||
eject_case()
|
||||
return ..()
|
||||
|
||||
/obj/item/implantpad/update_icon_state()
|
||||
if(case)
|
||||
icon_state = "implantpad-1"
|
||||
icon_state = "implantpad-on"
|
||||
else
|
||||
icon_state = "implantpad-0"
|
||||
icon_state = "implantpad-off"
|
||||
|
||||
/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj)
|
||||
/obj/item/implantpad/attack_self(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user)
|
||||
if(istype(C))
|
||||
addcase(user, C)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/implantpad/proc/addcase(mob/user, obj/item/implantcase/C)
|
||||
if(!user || !C)
|
||||
return
|
||||
if(case)
|
||||
@@ -31,9 +41,8 @@
|
||||
case = C
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/implantpad/proc/dropcase(mob/user as mob)
|
||||
/obj/item/implantpad/proc/eject_case(mob/user)
|
||||
if(!case)
|
||||
to_chat(user, "<span class='warning'>There's no implant in the pad!</span>")
|
||||
return
|
||||
if(user)
|
||||
if(user.put_in_hands(case))
|
||||
@@ -55,52 +64,32 @@
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
dropcase(usr)
|
||||
eject_case(usr)
|
||||
|
||||
/obj/item/implantpad/attackby(obj/item/implantcase/C as obj, mob/user as mob, params)
|
||||
if(istype(C, /obj/item/implantcase))
|
||||
addcase(user, C)
|
||||
else
|
||||
return ..()
|
||||
/obj/item/implantpad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "ImplantPad", name, 410, 400, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/implantpad/attack_self(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Implant Mini-Computer:</B><HR>"
|
||||
if(case)
|
||||
if(case.imp)
|
||||
if(istype(case.imp, /obj/item/implant))
|
||||
dat += "<A href='byond://?src=[UID()];removecase=1'>Remove Case</A><HR>"
|
||||
dat += case.imp.get_data()
|
||||
if(istype(case.imp, /obj/item/implant/tracking))
|
||||
var/obj/item/implant/tracking/T = case.imp
|
||||
dat += {"ID (1-100):
|
||||
<A href='byond://?src=[UID()];tracking_id=-10'>-</A>
|
||||
<A href='byond://?src=[UID()];tracking_id=-1'>-</A> [T.id]
|
||||
<A href='byond://?src=[UID()];tracking_id=1'>+</A>
|
||||
<A href='byond://?src=[UID()];tracking_id=10'>+</A><BR>"}
|
||||
else
|
||||
dat += "The implant casing is empty."
|
||||
else
|
||||
dat += "Please insert an implant casing!"
|
||||
user << browse(dat, "window=implantpad")
|
||||
onclose(user, "implantpad")
|
||||
return
|
||||
/obj/item/implantpad/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["contains_case"] = case ? TRUE : FALSE
|
||||
if(case && case.imp)
|
||||
var/datum/implant_fluff/implant_data = case.imp.implant_data
|
||||
data["implant"] = list(
|
||||
"name" = implant_data.name,
|
||||
"life" = implant_data.life,
|
||||
"notes" = implant_data.notes,
|
||||
"function" = implant_data.function,
|
||||
"image" = "[icon2base64(icon(initial(case.imp.icon), initial(case.imp.icon_state), SOUTH, 1))]",
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
/obj/item/implantpad/Topic(href, href_list)
|
||||
/obj/item/implantpad/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
if(..())
|
||||
return 1
|
||||
return
|
||||
|
||||
var/mob/living/user = usr
|
||||
if(href_list["tracking_id"])
|
||||
if(case && case.imp)
|
||||
var/obj/item/implant/tracking/T = case.imp
|
||||
T.id += text2num(href_list["tracking_id"])
|
||||
T.id = min(100, T.id)
|
||||
T.id = max(1, T.id)
|
||||
else if(href_list["removecase"])
|
||||
dropcase(user)
|
||||
|
||||
attack_self(user)
|
||||
return 1
|
||||
switch(action)
|
||||
if("eject_case")
|
||||
eject_case(ui.user)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/item/locator
|
||||
name = "locator"
|
||||
desc = "Used to track those with locater implants."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "locator"
|
||||
var/temp = null
|
||||
var/frequency = 1451
|
||||
@@ -73,7 +73,7 @@ Frequency:
|
||||
var/turf/Tr = get_turf(T)
|
||||
|
||||
if(Tr && Tr.z == sr.z)
|
||||
temp += "[T.id]: [Tr.x], [Tr.y], [Tr.z]<BR>"
|
||||
temp += " [Tr.x], [Tr.y], [Tr.z]<BR>"
|
||||
|
||||
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B>."
|
||||
temp += "<BR><BR><A href='byond://?src=[UID()];refresh=1'>Refresh</A><BR>"
|
||||
|
||||
Reference in New Issue
Block a user