mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
TG Implant Refactor/Overhaul
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
/obj/item/weapon/implant/deadman
|
||||
name = "deadman switch implant"
|
||||
desc = "Activates a signal on death."
|
||||
var/obj/item/device/assembly/signaler/signaler
|
||||
icon_state = "implant_evil"
|
||||
|
||||
/obj/item/weapon/implant/deadman/get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Robust Corp RX-79 Deadman Switch Implant<BR>
|
||||
<b>Life:</b> Activates upon death.<BR>
|
||||
<b>Important Notes:</b> Sends triggering signal<BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b><BR>
|
||||
<b>Function:</b> Contains a compact, electric signaller that activates upon host death.<BR>
|
||||
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/deadman/implanted(mob/source as mob)
|
||||
signaler = new /obj/item/device/assembly/signaler(src)
|
||||
signaler.interact(source)
|
||||
usr.mind.store_memory("Deadman switch will broadcast signal on <B>[signaler.frequency]</B> using encryption <B>[signaler.code]</B>.", 0, 0)
|
||||
usr << "Deadman switch will broadcast signal on <B>[signaler.frequency]</B> using encryption <B>[signaler.code]</B>."
|
||||
|
||||
/obj/item/weapon/implant/deadman/trigger(emote, source as mob)
|
||||
if(emote == "deathgasp")
|
||||
src.activate("death")
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/deadman/activate(var/cause)
|
||||
if((!cause) || (!src.imp_in)) return 0
|
||||
signaler.signal()
|
||||
|
||||
/obj/item/weapon/implant/deadman/islegal()
|
||||
return 0
|
||||
@@ -1,612 +1,86 @@
|
||||
#define MALFUNCTION_TEMPORARY 1
|
||||
#define MALFUNCTION_PERMANENT 2
|
||||
/obj/item/weapon/implant
|
||||
name = "implant"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
action_button_is_hands_free = 1
|
||||
origin_tech = "materials=2;biotech=3;programming=2"
|
||||
|
||||
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
|
||||
var/implanted = null
|
||||
var/mob/living/imp_in = null
|
||||
var/obj/item/organ/external/part = null
|
||||
item_color = "b"
|
||||
var/allow_reagents = 0
|
||||
var/malfunction = 0
|
||||
var/allow_multiple = 0
|
||||
var/uses = -1
|
||||
|
||||
/obj/item/weapon/implant/proc/trigger(emote, source as mob)
|
||||
|
||||
/obj/item/weapon/implant/proc/trigger(emote, mob/source)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/proc/activate()
|
||||
return
|
||||
|
||||
// What does the implant do upon injection?
|
||||
// return 0 if the implant fails (ex. Revhead and loyalty implant.)
|
||||
// return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.)
|
||||
/obj/item/weapon/implant/proc/implanted(var/mob/source)
|
||||
/obj/item/weapon/implant/ui_action_click()
|
||||
activate("action_button")
|
||||
|
||||
|
||||
//What does the implant do upon injection?
|
||||
//return 1 if the implant injects
|
||||
//return -1 if the implant fails to inject
|
||||
//return 0 if there is no room for implant
|
||||
/obj/item/weapon/implant/proc/implant(var/mob/source, var/mob/user)
|
||||
var/obj/item/weapon/implant/imp_e = locate(src.type) in source
|
||||
if(!allow_multiple && imp_e && imp_e != src)
|
||||
if(imp_e.uses < initial(imp_e.uses)*2)
|
||||
if(uses == -1)
|
||||
imp_e.uses = -1
|
||||
else
|
||||
imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
|
||||
qdel(src)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
if(activated)
|
||||
action_button_name = "Activate [src.name]"
|
||||
src.loc = source
|
||||
imp_in = source
|
||||
implanted = 1
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
if(user)
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
affected.implants += src
|
||||
part = affected
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
if(user)
|
||||
add_logs(source, user, "implanted", object="[name]")
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/proc/removed(var/mob/source)
|
||||
src.loc = null
|
||||
imp_in = null
|
||||
implanted = 0
|
||||
|
||||
if(istype(source, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = source
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/Destroy()
|
||||
if(imp_in)
|
||||
removed(imp_in)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/implant/proc/get_data()
|
||||
return "No information available"
|
||||
|
||||
/obj/item/weapon/implant/proc/hear(message, source as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/proc/islegal()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/proc/meltdown() //breaks it down, making implant unrecongizible
|
||||
imp_in << "\red You feel something melting inside [part ? "your [part.name]" : "you"]!"
|
||||
if (part)
|
||||
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
|
||||
else
|
||||
var/mob/living/M = imp_in
|
||||
M.apply_damage(15,BURN)
|
||||
name = "melted implant"
|
||||
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
|
||||
icon_state = "implant_melted"
|
||||
malfunction = MALFUNCTION_PERMANENT
|
||||
|
||||
/obj/item/weapon/implant/Destroy()
|
||||
if(part)
|
||||
part.implants.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking"
|
||||
desc = "Track with this."
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1.0
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
tracking_implants -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/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
|
||||
|
||||
/obj/item/weapon/implant/tracking/emp_act(severity)
|
||||
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
var/delay = 20
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(60))
|
||||
meltdown()
|
||||
if(2)
|
||||
delay = rand(5*60*10,15*60*10) //from 5 to 15 minutes of free time
|
||||
|
||||
spawn(delay)
|
||||
malfunction--
|
||||
|
||||
/obj/item/weapon/implant/dexplosive
|
||||
name = "explosive"
|
||||
desc = "And boom goes the weasel."
|
||||
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
||||
icon_state = "implant_evil"
|
||||
|
||||
/obj/item/weapon/implant/dexplosive/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>
|
||||
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/dexplosive/trigger(emote, source as mob)
|
||||
if(emote == "deathgasp")
|
||||
src.activate("death")
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/dexplosive/activate(var/cause)
|
||||
if((!cause) || (!src.imp_in)) return 0
|
||||
explosion(src, 0, 1, 3, 6)//This might be a bit much, dono will have to see.
|
||||
if(src.imp_in)
|
||||
src.imp_in.gib()
|
||||
|
||||
/obj/item/weapon/implant/dexplosive/islegal()
|
||||
return 0
|
||||
|
||||
//BS12 Explosive
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "explosive implant"
|
||||
desc = "A military grade micro bio-explosive. Highly dangerous."
|
||||
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
||||
var/elevel = "Localized Limb"
|
||||
var/phrase = "supercalifragilisticexpialidocious"
|
||||
icon_state = "implant_evil"
|
||||
|
||||
/obj/item/weapon/implant/explosive/get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Robust Corp RX-78 Intimidation Class Implant<BR>
|
||||
<b>Life:</b> Activates upon codephrase.<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>
|
||||
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/explosive/hear_talk(mob/M as mob, msg)
|
||||
hear(msg)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/explosive/hear(var/msg)
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
msg = sanitize_simple(msg, replacechars)
|
||||
if(findtext(msg,phrase))
|
||||
activate()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implant/explosive/activate()
|
||||
if (malfunction == MALFUNCTION_PERMANENT)
|
||||
return
|
||||
|
||||
var/need_gib = null
|
||||
if(istype(imp_in, /mob/))
|
||||
var/mob/T = imp_in
|
||||
message_admins("Explosive implant triggered in [key_name_admin(T)]")
|
||||
log_game("Explosive implant triggered in [key_name(T)].")
|
||||
need_gib = 1
|
||||
|
||||
if(ishuman(imp_in))
|
||||
if (elevel == "Localized Limb")
|
||||
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
|
||||
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
|
||||
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
sleep(25)
|
||||
if (istype(part,/obj/item/organ/external/chest) || \
|
||||
istype(part,/obj/item/organ/external/groin) || \
|
||||
istype(part,/obj/item/organ/external/head))
|
||||
part.createwound(BRUISE, 60) //mangle them instead
|
||||
explosion(get_turf(imp_in), -1, -1, 2, 3)
|
||||
qdel(src)
|
||||
else
|
||||
explosion(get_turf(imp_in), -1, -1, 2, 3)
|
||||
part.droplimb()
|
||||
qdel(src)
|
||||
if (elevel == "Destroy Body")
|
||||
explosion(get_turf(T), -1, 0, 1, 6)
|
||||
T.gib()
|
||||
if (elevel == "Full Explosion")
|
||||
explosion(get_turf(T), 0, 1, 3, 6)
|
||||
T.gib()
|
||||
|
||||
else
|
||||
explosion(get_turf(imp_in), 0, 1, 3, 6)
|
||||
|
||||
if(need_gib)
|
||||
imp_in.gib()
|
||||
|
||||
var/turf/t = get_turf(imp_in)
|
||||
|
||||
if(t)
|
||||
t.hotspot_expose(3500,125)
|
||||
|
||||
/obj/item/weapon/implant/explosive/implanted(mob/source as mob)
|
||||
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
|
||||
phrase = input("Choose activation phrase:") as text
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
phrase = sanitize_simple(phrase, replacechars)
|
||||
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
|
||||
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/explosive/emp_act(severity)
|
||||
if (malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
switch (severity)
|
||||
if (2.0) //Weak EMP will make implant tear limbs off.
|
||||
if (prob(50))
|
||||
small_boom()
|
||||
if (1.0) //strong EMP will melt implant either making it go off, or disarming it
|
||||
if (prob(70))
|
||||
if (prob(50))
|
||||
small_boom()
|
||||
else
|
||||
if (prob(50))
|
||||
activate() //50% chance of bye bye
|
||||
else
|
||||
meltdown() //50% chance of implant disarming
|
||||
spawn (20)
|
||||
malfunction--
|
||||
|
||||
/obj/item/weapon/implant/explosive/islegal()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/explosive/proc/small_boom()
|
||||
if (ishuman(imp_in) && part)
|
||||
imp_in.visible_message("\red Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
|
||||
playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
|
||||
spawn(25)
|
||||
if (ishuman(imp_in) && part)
|
||||
//No tearing off these parts since it's pretty much killing
|
||||
//and you can't replace groins
|
||||
if (istype(part,/obj/item/organ/external/chest) || \
|
||||
istype(part,/obj/item/organ/external/groin) || \
|
||||
istype(part,/obj/item/organ/external/head))
|
||||
part.createwound(BRUISE, 60) //mangle them instead
|
||||
else
|
||||
part.droplimb()
|
||||
explosion(get_turf(imp_in), -1, -1, 2, 3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implant/chem
|
||||
name = "chem"
|
||||
desc = "Injects things."
|
||||
origin_tech = "materials=3;biotech=4"
|
||||
allow_reagents = 1
|
||||
|
||||
/obj/item/weapon/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. However, if the subject suffers from malnutrition,<BR>
|
||||
the implant may become unstable and either pre-maturely inject the subject or simply break."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/chem/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/chem/Destroy()
|
||||
tracking_implants -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, source as mob)
|
||||
if(emote == "deathgasp")
|
||||
src.activate(src.reagents.total_volume)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/chem/activate(var/cause)
|
||||
if((!cause) || (!src.imp_in)) return 0
|
||||
var/mob/living/carbon/R = src.imp_in
|
||||
src.reagents.trans_to(R, cause)
|
||||
R << "You hear a faint *beep*."
|
||||
if(!src.reagents.total_volume)
|
||||
R << "You hear a faint click from your chest."
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/chem/emp_act(severity)
|
||||
if (malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(60))
|
||||
activate(20)
|
||||
if(2)
|
||||
if(prob(30))
|
||||
activate(5)
|
||||
|
||||
spawn(20)
|
||||
malfunction--
|
||||
|
||||
/obj/item/weapon/implant/loyalty
|
||||
name = "loyalty"
|
||||
desc = "Makes you loyal or such."
|
||||
origin_tech = "materials=2;biotech=4;programming=4"
|
||||
|
||||
/obj/item/weapon/implant/loyalty/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 tend to be much more loyal to the company.<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
|
||||
|
||||
|
||||
/obj/item/weapon/implant/loyalty/implanted(mob/M)
|
||||
if(!istype(M, /mob/living/carbon/human)) return 0
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.mind in ticker.mode.head_revolutionaries)
|
||||
H.visible_message("<span class='warning'>[H] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
|
||||
return 0
|
||||
else if(H.mind in ticker.mode:revolutionaries)
|
||||
ticker.mode:remove_revolutionary(H.mind)
|
||||
H << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/traitor
|
||||
name = "Mindslave Implant"
|
||||
desc = "Divide and Conquer"
|
||||
icon_state = "implant_evil"
|
||||
|
||||
/obj/item/weapon/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/weapon/implant/traitor/implanted(mob/M, mob/user)
|
||||
var/list/implanters
|
||||
var/ref = "\ref[user.mind]"
|
||||
if(!ishuman(M)) return 0
|
||||
if(!M.mind) return 0
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(M == user)
|
||||
user << "<span class='notice'>Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot.</span>"
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
L.adjustBrainLoss(20)
|
||||
return
|
||||
if(locate(/obj/item/weapon/implant/loyalty) in H.contents)
|
||||
H.visible_message("<span class='warning'>[H] seems to resist the implant!</span>", "<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
return 0
|
||||
if(locate(/obj/item/weapon/implant/traitor) in H.contents)
|
||||
H.visible_message("<span class='warning'>[H] seems to resist the implant!</span>", "<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
return 0
|
||||
H.implanting = 1
|
||||
H << "<span class='notice'>You feel completely loyal to [user.name].</span>"
|
||||
if(!(user.mind in ticker.mode:implanter))
|
||||
ticker.mode:implanter[ref] = list()
|
||||
implanters = ticker.mode:implanter[ref]
|
||||
implanters.Add(H.mind)
|
||||
ticker.mode.implanted.Add(H.mind)
|
||||
ticker.mode.implanted[H.mind] = user.mind
|
||||
//ticker.mode:implanter[user.mind] += H.mind
|
||||
ticker.mode:implanter[ref] = implanters
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
H << "<span class='warning'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect them and assist in their goals at any cost.</span>"
|
||||
var/datum/objective/protect/p = new
|
||||
p.owner = H.mind
|
||||
p.target = user:mind
|
||||
p.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]."
|
||||
H.mind.objectives += p
|
||||
for(var/datum/objective/objective in H.mind.objectives)
|
||||
H << "<B>Objective #1</B>: [objective.explanation_text]"
|
||||
ticker.mode.update_traitor_icons_added(H.mind)
|
||||
ticker.mode.update_traitor_icons_added(user.mind)
|
||||
log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].")
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/traitor/islegal()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenalin"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
|
||||
var/uses = 3
|
||||
|
||||
/obj/item/weapon/implant/adrenalin/get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Cybersun Industries Adrenalin 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>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
|
||||
<b>Integrity:</b> Implant can only be used three times before the nanobots are depleted."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/adrenalin/trigger(emote, mob/source as mob)
|
||||
if (src.uses < 1) return 0
|
||||
if (emote == "pale")
|
||||
src.uses--
|
||||
source << "\blue You feel a sudden surge of energy!"
|
||||
source.SetStunned(0)
|
||||
source.SetWeakened(0)
|
||||
source.SetParalysis(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
source.lying = 0
|
||||
source.update_canmove()
|
||||
|
||||
source.reagents.add_reagent("synaptizine", 10)
|
||||
source.reagents.add_reagent("omnizine", 10)
|
||||
source.reagents.add_reagent("stimulative_agent", 10)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/adrenalin/implanted(mob/source)
|
||||
source.mind.store_memory("A implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted freedom implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/process()
|
||||
if (!implanted) return
|
||||
var/mob/M = imp_in
|
||||
|
||||
if(isnull(M)) // If the mob got gibbed
|
||||
activate()
|
||||
else if(M.stat == 2)
|
||||
activate("death")
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/activate(var/cause)
|
||||
var/mob/M = imp_in
|
||||
var/area/t = get_area(M)
|
||||
switch (cause)
|
||||
if("death")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
|
||||
//give the syndies a bit of stealth
|
||||
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm")
|
||||
else
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
if ("emp")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
var/name = prob(50) ? t.name : pick(teleportlocs)
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
else
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
|
||||
if (malfunction) //so I'm just going to add a meltdown chance here
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
activate("emp") //let's shout that this dude is dead
|
||||
if(severity == 1)
|
||||
if(prob(40)) //small chance of obvious meltdown
|
||||
meltdown()
|
||||
else if (prob(60)) //but more likely it will just quietly die
|
||||
malfunction = MALFUNCTION_PERMANENT
|
||||
processing_objects.Remove(src)
|
||||
|
||||
spawn(20)
|
||||
malfunction--
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/implanted(mob/source as mob)
|
||||
mobname = source.real_name
|
||||
processing_objects.Add(src)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/compressed
|
||||
name = "compressed matter implant"
|
||||
desc = "Based on compressed matter technology, can store a single item."
|
||||
icon_state = "implant_evil"
|
||||
origin_tech = "materials=2;magnets=4;bluespace=4;syndicate=4"
|
||||
var/activation_emote = "sigh"
|
||||
var/obj/item/scanned = null
|
||||
|
||||
/obj/item/weapon/implant/compressed/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
|
||||
|
||||
/obj/item/weapon/implant/compressed/trigger(emote, mob/source as mob)
|
||||
if (src.scanned == null)
|
||||
return 0
|
||||
|
||||
if (emote == src.activation_emote)
|
||||
source << "The air glows as \the [src.scanned.name] uncompresses."
|
||||
activate()
|
||||
|
||||
/obj/item/weapon/implant/compressed/activate()
|
||||
var/turf/t = get_turf(src)
|
||||
if (imp_in)
|
||||
imp_in.put_in_hands(scanned)
|
||||
else
|
||||
scanned.loc = t
|
||||
/obj/item/weapon/implant/dropped(mob/user)
|
||||
. = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implant/compressed/implanted(mob/source as mob)
|
||||
src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
if (source.mind)
|
||||
source.mind.store_memory("Compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/compressed/islegal()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/cortical
|
||||
name = "cortical stack"
|
||||
desc = "A fist-sized mass of biocircuits and chips."
|
||||
icon_state = "implant_evil"
|
||||
|
||||
/obj/item/weapon/implant/emp
|
||||
name = "emp implant"
|
||||
desc = "Triggers an EMP."
|
||||
origin_tech = "materials=2;biotech=3;magnets=4;syndicate=4"
|
||||
var/activation_emote = "chuckle"
|
||||
var/uses = 2
|
||||
|
||||
/obj/item/weapon/implant/emp/New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "smile", "pale", "sniff", "whimper", "wink")
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/emp/trigger(emote, mob/living/carbon/source as mob)
|
||||
if (src.uses < 1) return 0
|
||||
if (emote == src.activation_emote)
|
||||
src.uses--
|
||||
empulse(source, 3, 5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/emp/implanted(mob/living/carbon/source)
|
||||
source.mind.store_memory("EMP implant can be activated [uses] time\s by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted EMP implant can be activated [uses] time\s by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
return .
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/obj/item/weapon/implant/chem
|
||||
name = "chem implant"
|
||||
desc = "Injects things."
|
||||
icon_state = "reagents"
|
||||
origin_tech = "materials=3;biotech=4"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/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/weapon/implant/chem/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
tracked_implants += src
|
||||
|
||||
/obj/item/weapon/implant/chem/Destroy()
|
||||
tracked_implants -= src
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
activate(reagents.total_volume)
|
||||
|
||||
/obj/item/weapon/implant/chem/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
var/mob/living/carbon/R = imp_in
|
||||
var/injectamount = null
|
||||
if (cause == "action_button")
|
||||
injectamount = reagents.total_volume
|
||||
else
|
||||
injectamount = cause
|
||||
reagents.trans_to(R, injectamount)
|
||||
R << "<span class='italics'>You hear a faint beep.</span>"
|
||||
if(!reagents.total_volume)
|
||||
R << "<span class='italics'>You hear a faint click from your chest.</span>"
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/chem
|
||||
name = "implant case - 'Remote Chemical'"
|
||||
desc = "A glass case containing a remote chemical implant."
|
||||
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
imp = new /obj/item/weapon/implant/chem(src)
|
||||
..()
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/item/weapon/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 = 0
|
||||
|
||||
/obj/item/weapon/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
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/process()
|
||||
if(!implanted)
|
||||
return
|
||||
var/mob/M = imp_in
|
||||
|
||||
if(isnull(M)) // If the mob got gibbed
|
||||
activate()
|
||||
else if(M.stat == DEAD)
|
||||
activate("death")
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/activate(var/cause)
|
||||
var/mob/M = imp_in
|
||||
var/area/t = get_area(M)
|
||||
switch (cause)
|
||||
if("death")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
|
||||
//give the syndies a bit of stealth
|
||||
a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm")
|
||||
else
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
if ("emp")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
var/name = prob(50) ? t.name : pick(teleportlocs)
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
else
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
|
||||
activate("emp") //let's shout that this dude is dead
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/implant(mob/target)
|
||||
if(..())
|
||||
mobname = target.real_name
|
||||
processing_objects.Add(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/removed(mob/target)
|
||||
if(..())
|
||||
processing_objects.Remove(src)
|
||||
return 1
|
||||
return 0
|
||||
@@ -0,0 +1,128 @@
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "microbomb implant"
|
||||
desc = "And boom goes the weasel."
|
||||
icon_state = "explosive"
|
||||
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
||||
var/weak = 2
|
||||
var/medium = 0.8
|
||||
var/heavy = 0.4
|
||||
var/delay = 7
|
||||
|
||||
/obj/item/weapon/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/weapon/implant/explosive/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
activate("death")
|
||||
|
||||
/obj/item/weapon/implant/explosive/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
|
||||
return 0
|
||||
heavy = round(heavy)
|
||||
medium = round(medium)
|
||||
weak = round(weak)
|
||||
imp_in << "<span class='notice'>You activate your microbomb implant.</span>"
|
||||
//If the delay is short, just blow up already jeez
|
||||
if(delay <= 7)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib()
|
||||
qdel(src)
|
||||
return
|
||||
timed_explosion()
|
||||
|
||||
/obj/item/weapon/implant/explosive/implant(mob/source)
|
||||
var/obj/item/weapon/implant/explosive/imp_e = locate(src.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 ..()
|
||||
|
||||
/obj/item/weapon/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)
|
||||
if(imp_in && imp_in.stat)
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Weaken(7)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implant/explosive/macro
|
||||
name = "macrobomb implant"
|
||||
desc = "And boom goes the weasel. And everything else nearby."
|
||||
icon_state = "explosive"
|
||||
origin_tech = "materials=3;combat=5;biotech=4;syndicate=5"
|
||||
weak = 16
|
||||
medium = 8
|
||||
heavy = 4
|
||||
delay = 70
|
||||
|
||||
/obj/item/weapon/implant/explosive/macro/activate(cause)
|
||||
if(!cause || !imp_in) return 0
|
||||
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
|
||||
imp_in << "<span class='notice'>You activate your macrobomb implant.</span>"
|
||||
timed_explosion()
|
||||
|
||||
/obj/item/weapon/implant/explosive/macro/implant(mob/source)
|
||||
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
|
||||
if(imp_e && imp_e != src)
|
||||
return 0
|
||||
imp_e = locate(/obj/item/weapon/implant/explosive) in source
|
||||
if(imp_e && imp_e != src)
|
||||
heavy += imp_e.heavy
|
||||
medium += imp_e.medium
|
||||
weak += imp_e.weak
|
||||
delay += imp_e.delay
|
||||
qdel(imp_e)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/explosive
|
||||
name = "implanter (explosive)"
|
||||
|
||||
/obj/item/weapon/implanter/explosive/New()
|
||||
imp = new /obj/item/weapon/implant/explosive(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/explosive
|
||||
name = "implant case - 'Explosive'"
|
||||
desc = "A glass case containing an explosive implant."
|
||||
|
||||
/obj/item/weapon/implantcase/explosive/New()
|
||||
imp = new /obj/item/weapon/implant/explosive(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/explosive_macro
|
||||
name = "implanter (macro-explosive)"
|
||||
|
||||
/obj/item/weapon/implanter/explosive_macro/New()
|
||||
imp = new /obj/item/weapon/implant/explosive/macro(src)
|
||||
..()
|
||||
@@ -0,0 +1,50 @@
|
||||
/obj/item/weapon/implant/freedom
|
||||
name = "freedom implant"
|
||||
desc = "Use this to escape from those evil Red Shirts."
|
||||
icon_state = "freedom"
|
||||
item_color = "r"
|
||||
origin_tech = "materials=2;magnets=3;biotech=3;syndicate=4"
|
||||
uses = 4
|
||||
|
||||
|
||||
/obj/item/weapon/implant/freedom/activate()
|
||||
if(uses == 0) return 0
|
||||
if(uses != -1) uses--
|
||||
imp_in << "You feel a faint click."
|
||||
if(iscarbon(imp_in))
|
||||
var/mob/living/carbon/C_imp_in = imp_in
|
||||
C_imp_in.uncuff()
|
||||
|
||||
|
||||
/obj/item/weapon/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/weapon/implanter/freedom
|
||||
name = "implanter (freedom)"
|
||||
|
||||
/obj/item/weapon/implanter/freedom/New()
|
||||
imp = new /obj/item/weapon/implant/freedom(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/freedom
|
||||
name = "implant case - 'Freedom'"
|
||||
desc = "A glass case containing a freedom implant."
|
||||
|
||||
/obj/item/weapon/implantcase/freedom/New()
|
||||
imp = new /obj/item/weapon/implant/freedom(src)
|
||||
..()
|
||||
@@ -0,0 +1,59 @@
|
||||
/obj/item/weapon/implant/loyalty
|
||||
name = "loyalty implant"
|
||||
desc = "Makes you loyal or such."
|
||||
origin_tech = "materials=2;biotech=4;programming=4"
|
||||
activated = 0
|
||||
|
||||
/obj/item/weapon/implant/loyalty/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 tend to be much more loyal to the company.<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
|
||||
|
||||
|
||||
/obj/item/weapon/implant/loyalty/implant(mob/target)
|
||||
if(..())
|
||||
if(target.mind in ticker.mode.head_revolutionaries || is_shadow_or_thrall(target))
|
||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
|
||||
removed(target, 1)
|
||||
qdel(src)
|
||||
return -1
|
||||
if(target.mind in ticker.mode.revolutionaries)
|
||||
ticker.mode.remove_revolutionary(target.mind)
|
||||
if(target.mind in ticker.mode.cult)
|
||||
target << "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>"
|
||||
else
|
||||
target << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/loyalty/removed(mob/target, var/silent = 0)
|
||||
if(..())
|
||||
if(target.stat != DEAD && !silent)
|
||||
target << "<span class='boldnotice'>You feel a sense of liberation as Nanotrasen's grip on your mind fades away.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/loyalty
|
||||
name = "implanter (loyalty)"
|
||||
|
||||
/obj/item/weapon/implanter/loyalty/New()
|
||||
imp = new /obj/item/weapon/implant/loyalty(src)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/loyalty
|
||||
name = "implant case - 'Loyalty'"
|
||||
desc = "A glass case containing a loyalty implant."
|
||||
|
||||
/obj/item/weapon/implantcase/loyalty/New()
|
||||
imp = new /obj/item/weapon/implant/loyalty(src)
|
||||
..()
|
||||
@@ -0,0 +1,66 @@
|
||||
/obj/item/weapon/implant/weapons_auth
|
||||
name = "firearms authentication implant"
|
||||
desc = "Lets you shoot your guns"
|
||||
icon_state = "auth"
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=5;syndicate=5"
|
||||
activated = 0
|
||||
|
||||
/obj/item/weapon/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/weapon/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/weapon/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/weapon/implant/adrenalin/activate()
|
||||
if(uses < 1) return 0
|
||||
uses--
|
||||
imp_in << "<span class='notice'>You feel a sudden surge of energy!</span>"
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetParalysis(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
imp_in.lying = 0
|
||||
imp_in.update_canmove()
|
||||
|
||||
imp_in.reagents.add_reagent("synaptizine", 10)
|
||||
imp_in.reagents.add_reagent("omnizine", 10)
|
||||
imp_in.reagents.add_reagent("stimulative_agent", 10)
|
||||
|
||||
|
||||
/obj/item/weapon/implant/emp
|
||||
name = "emp implant"
|
||||
desc = "Triggers an EMP."
|
||||
icon_state = "emp"
|
||||
origin_tech = "materials=2;biotech=3;magnets=4;syndicate=4"
|
||||
uses = 2
|
||||
|
||||
/obj/item/weapon/implant/emp/activate()
|
||||
if (src.uses < 1) return 0
|
||||
src.uses--
|
||||
empulse(imp_in, 3, 5)
|
||||
|
||||
/obj/item/weapon/implant/cortical
|
||||
name = "cortical stack"
|
||||
desc = "A fist-sized mass of biocircuits and chips."
|
||||
icon_state = "implant_evil"
|
||||
@@ -0,0 +1,57 @@
|
||||
/obj/item/weapon/storage/hidden/implant
|
||||
name = "bluespace pocket"
|
||||
storage_slots = 2
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 6
|
||||
w_class = 4
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
silent = 1
|
||||
|
||||
|
||||
/obj/item/weapon/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=4;syndicate=4"
|
||||
item_color = "r"
|
||||
var/obj/item/weapon/storage/hidden/implant/storage
|
||||
|
||||
/obj/item/weapon/implant/storage/New()
|
||||
..()
|
||||
storage = new /obj/item/weapon/storage/hidden/implant(src)
|
||||
|
||||
/obj/item/weapon/implant/storage/activate()
|
||||
storage.MouseDrop(imp_in)
|
||||
|
||||
/obj/item/weapon/implant/storage/removed(source)
|
||||
if(..())
|
||||
for(var/mob/M in range(1))
|
||||
if(M.s_active == storage)
|
||||
storage.close(M)
|
||||
for(var/obj/item/I in storage)
|
||||
storage.remove_from_storage(I, get_turf(source))
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/storage/implant(mob/source)
|
||||
var/obj/item/weapon/implant/storage/imp_e = locate(src.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
|
||||
imp_e.storage.contents += storage.contents
|
||||
|
||||
for(var/mob/M in range(1))
|
||||
if(M.s_active == storage)
|
||||
storage.close(M)
|
||||
storage.show_to(source)
|
||||
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/storage
|
||||
name = "implanter (storage)"
|
||||
|
||||
/obj/item/weapon/implanter/storage/New()
|
||||
imp = new /obj/item/weapon/implant/storage(src)
|
||||
..()
|
||||
@@ -0,0 +1,32 @@
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
activated = 0
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracked_implants += src
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
tracked_implants -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/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,69 @@
|
||||
/obj/item/weapon/implant/traitor
|
||||
name = "Mindslave Implant"
|
||||
desc = "Divide and Conquer"
|
||||
origin_tech = "programming=5;biotech=5;syndicate=8"
|
||||
activated = 0
|
||||
|
||||
/obj/item/weapon/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/weapon/implant/traitor/implant(mob/M, mob/user)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(ismindslave(H))
|
||||
H.visible_message("<span class='warning'>[H] seems to resist the implant!</span>", "<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
qdel(src)
|
||||
return -1
|
||||
if(..())
|
||||
var/list/implanters
|
||||
var/ref = "\ref[user.mind]"
|
||||
if(!ishuman(M))
|
||||
return 0
|
||||
if(!M.mind)
|
||||
return 0
|
||||
if(M == user)
|
||||
user << "<span class='notice'>Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot.</span>"
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
L.adjustBrainLoss(20)
|
||||
removed(M)
|
||||
qdel(src)
|
||||
return -1
|
||||
if(isloyal(H))
|
||||
H.visible_message("<span class='warning'>[H] seems to resist the implant!</span>", "<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
removed(M)
|
||||
qdel(src)
|
||||
return -1
|
||||
H.implanting = 1
|
||||
H << "<span class='notice'>You feel completely loyal to [user.name].</span>"
|
||||
if(!(user.mind in ticker.mode:implanter))
|
||||
ticker.mode:implanter[ref] = list()
|
||||
implanters = ticker.mode:implanter[ref]
|
||||
implanters.Add(H.mind)
|
||||
ticker.mode.implanted.Add(H.mind)
|
||||
ticker.mode.implanted[H.mind] = user.mind
|
||||
//ticker.mode:implanter[user.mind] += H.mind
|
||||
ticker.mode:implanter[ref] = implanters
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
H << "<span class='warning'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect them and assist in their goals at any cost.</span>"
|
||||
var/datum/objective/protect/p = new
|
||||
p.owner = H.mind
|
||||
p.target = user:mind
|
||||
p.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]."
|
||||
H.mind.objectives += p
|
||||
for(var/datum/objective/objective in H.mind.objectives)
|
||||
H << "<B>Objective #1</B>: [objective.explanation_text]"
|
||||
ticker.mode.update_traitor_icons_added(H.mind)
|
||||
ticker.mode.update_traitor_icons_added(user.mind)
|
||||
log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].")
|
||||
return 1
|
||||
return 0
|
||||
@@ -1,171 +1,101 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/weapon/implantcase
|
||||
name = "Glass Case"
|
||||
desc = "A case containing an implant."
|
||||
name = "implant case"
|
||||
desc = "A glass case containing an implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-0"
|
||||
item_state = "implantcase"
|
||||
throw_speed = 1
|
||||
throw_speed = 2
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
w_class = 1
|
||||
origin_tech = "materials=1;biotech=2"
|
||||
materials = list(MAT_GLASS=500)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
|
||||
New()
|
||||
..()
|
||||
update()
|
||||
|
||||
proc
|
||||
update()
|
||||
/obj/item/weapon/implantcase/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.item_color]"
|
||||
origin_tech = imp.origin_tech
|
||||
flags = imp.flags
|
||||
reagents = imp.reagents
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
origin_tech = initial(origin_tech)
|
||||
flags = initial(flags)
|
||||
reagents = null
|
||||
|
||||
|
||||
update()
|
||||
if (src.imp)
|
||||
src.icon_state = text("implantcase-[]", src.imp.item_color)
|
||||
src.origin_tech = src.imp.origin_tech
|
||||
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_hand() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implant case - '[t]'"
|
||||
else
|
||||
src.icon_state = "implantcase-0"
|
||||
src.origin_tech = initial(src.origin_tech)
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/weapon/I as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(I, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.get_active_hand() != I)
|
||||
name = "implant case"
|
||||
else if(istype(W, /obj/item/weapon/implanter))
|
||||
var/obj/item/weapon/implanter/I = W
|
||||
if(I.imp)
|
||||
if(imp || I.imp.implanted)
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
src.name = text("Glass Case- '[]'", t)
|
||||
else
|
||||
src.name = "Glass Case"
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
if(!src.imp) return
|
||||
if(!src.imp.allow_reagents) return
|
||||
if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume)
|
||||
user << "\red [src] is full."
|
||||
else
|
||||
spawn(5)
|
||||
I.reagents.trans_to(src.imp, 5)
|
||||
user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units."
|
||||
else if (istype(I, /obj/item/weapon/implanter))
|
||||
if (I:imp)
|
||||
if ((src.imp || I:imp.implanted))
|
||||
I.imp.loc = src
|
||||
imp = I.imp
|
||||
I.imp = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
else
|
||||
if(imp)
|
||||
if(I.imp)
|
||||
return
|
||||
I:imp.loc = src
|
||||
src.imp = I:imp
|
||||
I:imp = null
|
||||
src.update()
|
||||
I:update()
|
||||
else
|
||||
if (src.imp)
|
||||
if (I:imp)
|
||||
return
|
||||
src.imp.loc = I
|
||||
I:imp = src.imp
|
||||
src.imp = null
|
||||
update()
|
||||
I:update()
|
||||
return
|
||||
imp.loc = I
|
||||
I.imp = imp
|
||||
imp = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
|
||||
/*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/weapon/implantcase/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/tracking
|
||||
name = "Glass Case- 'Tracking'"
|
||||
desc = "A case containing a tracking implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
name = "implant case - 'Tracking'"
|
||||
desc = "A glass case containing a tracking implant."
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/tracking( src )
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/explosive
|
||||
name = "Glass Case- 'Explosive'"
|
||||
desc = "A case containing an explosive implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/explosive( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/dexplosive
|
||||
name = "Glass Case- 'Death Explosive'"
|
||||
desc = "A case containing an explosive implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/dexplosive( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/chem
|
||||
name = "Glass Case- 'Chem'"
|
||||
desc = "A case containing a chemical implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
|
||||
src.imp = new /obj/item/weapon/implant/chem( src )
|
||||
/obj/item/weapon/implantcase/tracking/New()
|
||||
imp = new /obj/item/weapon/implant/tracking(src)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/loyalty
|
||||
name = "Glass Case- 'Loyalty'"
|
||||
desc = "A case containing a loyalty implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-r"
|
||||
/obj/item/weapon/implantcase/weapons_auth
|
||||
name = "implant case - 'Firearms Authentication'"
|
||||
desc = "A glass case containing a firearms authentication implant."
|
||||
|
||||
/obj/item/weapon/implantcase/weapons_auth/New()
|
||||
imp = new /obj/item/weapon/implant/weapons_auth(src)
|
||||
..()
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
..()
|
||||
return
|
||||
/obj/item/weapon/implantcase/adrenaline
|
||||
name = "implant case - 'Adrenaline'"
|
||||
desc = "A glass case containing an adrenaline implant."
|
||||
|
||||
/obj/item/weapon/implantcase/adrenaline/New()
|
||||
imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implantcase/death_alarm
|
||||
name = "Glass Case- 'Death Alarm'"
|
||||
desc = "A case containing a death alarm implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/death_alarm( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/freedom
|
||||
name = "Glass Case- 'Freedom'"
|
||||
desc = "A case containing a freedom implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/freedom( src )
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantcase/adrenaline
|
||||
name = "Glass Case- 'Adrenaline'"
|
||||
desc = "A glass case containing an adrenaline implant."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/adrenalin( src )
|
||||
..()
|
||||
return
|
||||
/obj/item/weapon/implantcase/death_alarm/New()
|
||||
imp = new /obj/item/weapon/implant/death_alarm(src)
|
||||
..()
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/machinery/implantchair
|
||||
name = "Loyalty Implanter"
|
||||
name = "loyalty implanter"
|
||||
desc = "Used to implant occupants with loyalty implants."
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
@@ -19,153 +19,148 @@
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/injecting = 0
|
||||
|
||||
proc
|
||||
go_out()
|
||||
put_mob(mob/living/carbon/M as mob)
|
||||
implant(var/mob/M)
|
||||
add_implants()
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
add_implants()
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/health_text = ""
|
||||
if(src.occupant)
|
||||
if(src.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
|
||||
health_text = "[round(src.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=\ref[src];replenish=1'>Replenish</A>"]<BR>"
|
||||
if(src.occupant)
|
||||
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=implant")
|
||||
onclose(user, "implant")
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
|
||||
if(href_list["implant"])
|
||||
if(src.occupant)
|
||||
injecting = 1
|
||||
go_out()
|
||||
ready = 0
|
||||
spawn(injection_cooldown)
|
||||
ready = 1
|
||||
|
||||
if(href_list["replenish"])
|
||||
ready = 0
|
||||
spawn(replenish_cooldown)
|
||||
add_implants()
|
||||
ready = 1
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting:name] will not fit into the [src.name] because they have a slime latched onto their head."
|
||||
return
|
||||
var/mob/M = G:affecting
|
||||
if(put_mob(M))
|
||||
qdel(G)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
go_out(var/mob/M)
|
||||
if(!( src.occupant ))
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
if(injecting)
|
||||
implant(src.occupant)
|
||||
injecting = 0
|
||||
src.occupant = null
|
||||
icon_state = "implantchair"
|
||||
return
|
||||
|
||||
|
||||
put_mob(mob/living/carbon/M as mob)
|
||||
if(!iscarbon(M))
|
||||
usr << "\red <B>The [src.name] cannot hold this!</B>"
|
||||
return
|
||||
if(src.occupant)
|
||||
usr << "\red <B>The [src.name] is already occupied!</B>"
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.add_fingerprint(usr)
|
||||
icon_state = "implantchair_on"
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/proc
|
||||
go_out()
|
||||
put_mob(mob/living/carbon/M)
|
||||
implant(var/mob/M)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if(!implant_list.len) return
|
||||
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
|
||||
if(!imp) continue
|
||||
if(istype(imp, /obj/item/weapon/implant/loyalty))
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message("\red [M] has been implanted by the [src.name].", 1)
|
||||
|
||||
if(imp.implanted(M))
|
||||
imp.loc = M
|
||||
imp.imp_in = M
|
||||
imp.implanted = 1
|
||||
implant_list -= imp
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
add_implants()
|
||||
for(var/i=0, i<src.max_implants, i++)
|
||||
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
|
||||
implant_list += I
|
||||
|
||||
|
||||
/obj/machinery/implantchair/New()
|
||||
..()
|
||||
add_implants()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/health_text = ""
|
||||
if(src.occupant)
|
||||
if(src.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
|
||||
health_text = "[round(src.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=\ref[src];replenish=1'>Replenish</A>"]<BR>"
|
||||
if(src.occupant)
|
||||
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=implant")
|
||||
onclose(user, "implant")
|
||||
|
||||
|
||||
/obj/machinery/implantchair/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["implant"])
|
||||
if(src.occupant)
|
||||
injecting = 1
|
||||
go_out()
|
||||
ready = 0
|
||||
spawn(injection_cooldown)
|
||||
ready = 1
|
||||
|
||||
verb
|
||||
get_out()
|
||||
set name = "Eject occupant"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
src.go_out(usr)
|
||||
add_fingerprint(usr)
|
||||
if(href_list["replenish"])
|
||||
ready = 0
|
||||
spawn(replenish_cooldown)
|
||||
add_implants()
|
||||
ready = 1
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(!ismob(G.affecting))
|
||||
return
|
||||
|
||||
|
||||
move_inside()
|
||||
set name = "Move Inside"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
put_mob(usr)
|
||||
var/mob/M = G.affecting
|
||||
if(M.buckled_mob)
|
||||
usr << "[M] will not fit into [src] because they have a slime latched onto their head."
|
||||
return
|
||||
if(put_mob(M))
|
||||
qdel(G)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/go_out(mob/M)
|
||||
if(!( src.occupant ))
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
if(injecting)
|
||||
implant(src.occupant)
|
||||
injecting = 0
|
||||
src.occupant = null
|
||||
icon_state = "implantchair"
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/put_mob(mob/living/carbon/M)
|
||||
if(!iscarbon(M))
|
||||
usr << "<span class='warning'>The [src.name] cannot hold this!</span>"
|
||||
return
|
||||
if(src.occupant)
|
||||
usr << "<span class='warning'>The [src.name] is already occupied!</span>"
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.add_fingerprint(usr)
|
||||
icon_state = "implantchair_on"
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/implant(mob/M)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if(!implant_list.len) return
|
||||
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
|
||||
if(!imp) continue
|
||||
if(istype(imp, /obj/item/weapon/implant/loyalty))
|
||||
M.visible_message("<span class='warning'>[M] has been implanted by the [src.name].</span>")
|
||||
|
||||
if(imp.implant(M))
|
||||
implant_list -= imp
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/add_implants()
|
||||
for(var/i=0, i<src.max_implants, i++)
|
||||
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
|
||||
implant_list += I
|
||||
return
|
||||
|
||||
/obj/machinery/implantchair/verb/get_out()
|
||||
set name = "Eject occupant"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
src.go_out(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/implantchair/verb/move_inside()
|
||||
set name = "Move Inside"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
put_mob(usr)
|
||||
return
|
||||
|
||||
@@ -1,206 +1,84 @@
|
||||
/obj/item/weapon/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 1
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
origin_tech = "materials=1;biotech=3;programming=2"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/living/carbon/M, mob/user)
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attemping to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_after(user, 50, target = M)))
|
||||
if(user && M && (get_turf(M) == T) && src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
user << "<span class='notice'>You implant yourself.</span>"
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_hand() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
|
||||
/obj/item/weapon/implanter/New()
|
||||
..()
|
||||
update()
|
||||
|
||||
/obj/item/weapon/implanter/proc/update()
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update()
|
||||
if (src.imp)
|
||||
src.icon_state = "implanter1"
|
||||
src.origin_tech = src.imp.origin_tech
|
||||
else
|
||||
src.icon_state = "implanter0"
|
||||
src.origin_tech = initial(src.origin_tech)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if (user && src.imp)
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message("\red [user] is attemping to implant [M].", 1)
|
||||
|
||||
var/turf/T1 = get_turf(M)
|
||||
if (T1 && ((M == user) || do_after(user, 50, target = M)))
|
||||
if(user && M && (get_turf(M) == T1) && src && src.imp)
|
||||
for (var/mob/O in viewers(M, null))
|
||||
O.show_message("\red [M] has been implanted by [user].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [key_name(user)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [key_name(M)]</font>")
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
user.show_message("\red You implanted the implant into [M].")
|
||||
if(src.imp.implanted(M, user))
|
||||
src.imp.loc = M
|
||||
src.imp.imp_in = M
|
||||
src.imp.implanted = 1
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
||||
affected.implants += src.imp
|
||||
imp.part = affected
|
||||
H.sec_hud_set_implants()
|
||||
M:implanting = 0
|
||||
src.imp = null
|
||||
update()
|
||||
spawn(1)
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/traitor
|
||||
name = "implanter (Mindslave)"
|
||||
desc = "Divide and Conquer."
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/traitor(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/loyalty
|
||||
name = "implanter (Loyalty)"
|
||||
|
||||
/obj/item/weapon/implanter/loyalty/New()
|
||||
src.imp = new /obj/item/weapon/implant/loyalty( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/dexplosive
|
||||
name = "implanter (Microbomb)"
|
||||
|
||||
/obj/item/weapon/implanter/dexplosive/New()
|
||||
src.imp = new /obj/item/weapon/implant/dexplosive( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/explosive
|
||||
name = "implanter (Explosive)"
|
||||
|
||||
/obj/item/weapon/implanter/explosive/New()
|
||||
src.imp = new /obj/item/weapon/implant/explosive( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (Adrenaline)"
|
||||
name = "implanter (adrenalin)"
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin/New()
|
||||
src.imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed
|
||||
name = "implanter (Compressed)"
|
||||
icon_state = "cimplanter1"
|
||||
|
||||
var/list/forbidden_types=list(
|
||||
// /obj/item/weapon/storage/bible // VG #11 - Recursion.
|
||||
)
|
||||
|
||||
/obj/item/weapon/implanter/compressed/New()
|
||||
imp = new /obj/item/weapon/implant/compressed( src )
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed/update()
|
||||
if (imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if(!c.scanned)
|
||||
icon_state = "cimplanter1"
|
||||
else
|
||||
icon_state = "cimplanter2"
|
||||
else
|
||||
icon_state = "cimplanter0"
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed/attack(mob/M as mob, mob/user as mob)
|
||||
// Attacking things in your hands tends to make this fuck up.
|
||||
if(!istype(M))
|
||||
return
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if (!c) return
|
||||
if (c.scanned == null)
|
||||
user << "Please scan an object with the implanter first."
|
||||
return
|
||||
imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implanter/compressed/afterattack(var/obj/item/I, mob/user as mob)
|
||||
if(is_type_in_list(I,forbidden_types))
|
||||
user << "\red A red light flickers on the implanter."
|
||||
return
|
||||
if(istype(I) && imp)
|
||||
var/obj/item/weapon/implant/compressed/c = imp
|
||||
if (c.scanned)
|
||||
user << "\red Something is already scanned inside the implant!"
|
||||
return
|
||||
if(user)
|
||||
user.unEquip(I)
|
||||
user.update_icons() //update our overlays
|
||||
c.scanned = I
|
||||
c.scanned.loc = c
|
||||
update()
|
||||
|
||||
/obj/item/weapon/implanter/deadman
|
||||
name = "implanter (Deadman)"
|
||||
desc = "Switch it."
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/deadman(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/death_alarm
|
||||
name = "implanter (Death Alarm)"
|
||||
desc = "Announces the death of the implanted person over radio"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/death_alarm(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/emp(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
/obj/item/weapon/implanter/emp/New()
|
||||
imp = new /obj/item/weapon/implant/emp(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implanter/freedom
|
||||
name = "implanter (Freedom)"
|
||||
/obj/item/weapon/implanter/traitor
|
||||
name = "implanter (Mindslave)"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/freedom(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
/obj/item/weapon/implanter/traitor/New()
|
||||
imp = new /obj/item/weapon/implant/traitor(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implanter/uplink
|
||||
name = "implanter (Uplink)"
|
||||
|
||||
New()
|
||||
src.imp = new /obj/item/weapon/implant/uplink(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
@@ -1,73 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/weapon/implant/freedom
|
||||
name = "freedom"
|
||||
desc = "Use this to escape from those evil Red Shirts."
|
||||
item_color = "r"
|
||||
var/activation_emote = "chuckle"
|
||||
origin_tech = "materials=2;magnets=3;biotech=3;syndicate=4"
|
||||
var/uses = 4
|
||||
|
||||
|
||||
New()
|
||||
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
trigger(emote, mob/living/carbon/source as mob)
|
||||
if (src.uses < 1) return 0
|
||||
if (emote == src.activation_emote)
|
||||
src.uses--
|
||||
source << "You feel a faint click."
|
||||
if (source.handcuffed)
|
||||
var/obj/item/weapon/W = source.handcuffed
|
||||
source.handcuffed = null
|
||||
if(source.buckled && source.buckled.buckle_requires_restraints)
|
||||
source.buckled.unbuckle_mob()
|
||||
source.update_inv_handcuffed()
|
||||
if (source.client)
|
||||
source.client.screen -= W
|
||||
if (W)
|
||||
W.loc = source.loc
|
||||
dropped(source)
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
if (source.legcuffed)
|
||||
var/obj/item/weapon/W = source.legcuffed
|
||||
source.legcuffed = null
|
||||
source.update_inv_legcuffed()
|
||||
if (source.client)
|
||||
source.client.screen -= W
|
||||
if (W)
|
||||
W.loc = source.loc
|
||||
dropped(source)
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
return
|
||||
|
||||
|
||||
implanted(mob/living/carbon/source)
|
||||
source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
|
||||
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>
|
||||
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
|
||||
life can drive down to only 1 use.<HR>
|
||||
No Implant Specifics"}
|
||||
return dat
|
||||
|
||||
|
||||
@@ -1,85 +1,61 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/weapon/implantpad
|
||||
name = "implantpad"
|
||||
desc = "Used to modify implants."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantpad-0"
|
||||
item_state = "electronic"
|
||||
throw_speed = 1
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
var/obj/item/weapon/implantcase/case = null
|
||||
|
||||
/obj/item/weapon/implantpad/Destroy()
|
||||
if(case)
|
||||
dropcase()
|
||||
return ..()
|
||||
var/broadcasting = null
|
||||
var/listening = 1
|
||||
|
||||
|
||||
/obj/item/weapon/implantpad/update_icon()
|
||||
if(case)
|
||||
src.icon_state = "implantpad-1"
|
||||
icon_state = "implantpad-1"
|
||||
else
|
||||
src.icon_state = "implantpad-0"
|
||||
return
|
||||
|
||||
/obj/item/weapon/implantpad/proc/addcase(mob/user as mob, obj/item/weapon/implantcase/C as obj)
|
||||
if(!user || !C)
|
||||
return
|
||||
if(case)
|
||||
user << "<span class='warning'>There's already an implant in the pad!</span>"
|
||||
return
|
||||
user.unEquip(C)
|
||||
C.forceMove(src)
|
||||
case = C
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implantpad/proc/dropcase(mob/user as mob)
|
||||
if(!case)
|
||||
user << "<span class='warning'>There's no implant in the pad!</span>"
|
||||
return
|
||||
if(user)
|
||||
if(user.put_in_hands(case))
|
||||
add_fingerprint(user)
|
||||
case.add_fingerprint(user)
|
||||
case = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
case.forceMove(get_turf(src))
|
||||
case = null
|
||||
update_icon()
|
||||
icon_state = "implantpad-0"
|
||||
|
||||
/obj/item/weapon/implantpad/verb/remove_implant()
|
||||
set category = "Object"
|
||||
set name = "Remove Implant"
|
||||
set src in usr
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
dropcase(usr)
|
||||
|
||||
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob, params)
|
||||
if(istype(C, /obj/item/weapon/implantcase))
|
||||
addcase(user, C)
|
||||
/obj/item/weapon/implantpad/attack_hand(mob/user)
|
||||
if(case && (user.l_hand == src || user.r_hand == src))
|
||||
user.put_in_active_hand(case)
|
||||
|
||||
case.add_fingerprint(user)
|
||||
case = null
|
||||
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implantpad/attack_self(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C, mob/user, params)
|
||||
..()
|
||||
if(istype(C, /obj/item/weapon/implantcase))
|
||||
if(!case)
|
||||
if(!user.unEquip(C))
|
||||
return
|
||||
C.loc = src
|
||||
case = C
|
||||
else
|
||||
return
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/implantpad/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Implant Mini-Computer:</B><HR>"
|
||||
if (case)
|
||||
if(case)
|
||||
if(case.imp)
|
||||
if(istype(case.imp, /obj/item/weapon/implant))
|
||||
dat += "<A href='byond://?src=\ref[src];removecase=1'>Remove Case</A><HR>"
|
||||
dat += case.imp.get_data()
|
||||
if(istype(case.imp, /obj/item/weapon/implant/tracking))
|
||||
var/obj/item/weapon/implant/tracking/T = case.imp
|
||||
dat += {"ID (1-100):
|
||||
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
|
||||
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [T.id]
|
||||
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
|
||||
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
|
||||
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
|
||||
else
|
||||
@@ -88,22 +64,26 @@
|
||||
dat += "Please insert an implant casing!"
|
||||
user << browse(dat, "window=implantpad")
|
||||
onclose(user, "implantpad")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implantpad/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/mob/living/user = usr
|
||||
if (href_list["tracking_id"])
|
||||
if(case && case.imp)
|
||||
..()
|
||||
if(usr.stat)
|
||||
return
|
||||
if((usr.contents.Find(src)) || ((in_range(src, usr) && istype(loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["tracking_id"])
|
||||
var/obj/item/weapon/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
|
||||
|
||||
if(istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
add_fingerprint(usr)
|
||||
else
|
||||
usr << browse(null, "window=implantpad")
|
||||
|
||||
@@ -1,25 +1,35 @@
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
name = "uplink implant"
|
||||
desc = "Summon things."
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
origin_tech = "materials=2;magnets=4;programming=4;biotech=4;syndicate=8;bluespace=5"
|
||||
var/activation_emote = "chuckle"
|
||||
|
||||
/obj/item/weapon/implant/uplink/New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/uplink/implanted(mob/source)
|
||||
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
hidden_uplink.uplink_owner="[source]"
|
||||
return 1
|
||||
/obj/item/weapon/implant/uplink/implant(mob/source)
|
||||
var/obj/item/weapon/implant/imp_e = locate(src.type) in source
|
||||
if(imp_e && imp_e != src)
|
||||
imp_e.hidden_uplink.uses += hidden_uplink.uses
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
if(..())
|
||||
hidden_uplink.uplink_owner="[source.key]"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/uplink/activate()
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.check_trigger(imp_in)
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink/trigger(emote, mob/source as mob)
|
||||
if(hidden_uplink && usr == source) // Let's not have another people activate our uplink
|
||||
hidden_uplink.check_trigger(source, emote, activation_emote)
|
||||
return
|
||||
/obj/item/weapon/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
|
||||
/obj/item/weapon/implanter/uplink/New()
|
||||
imp = new /obj/item/weapon/implant/uplink(src)
|
||||
..()
|
||||
@@ -56,6 +56,7 @@
|
||||
new /obj/item/weapon/implanter/emp(src)
|
||||
new /obj/item/weapon/implanter/adrenalin(src)
|
||||
new /obj/item/weapon/implanter/explosive(src)
|
||||
new /obj/item/weapon/implanter/storage(src)
|
||||
return
|
||||
|
||||
if("hacker")
|
||||
@@ -86,42 +87,6 @@
|
||||
desc = "A sleek, sturdy box"
|
||||
icon_state = "box_of_doom"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_freedom
|
||||
name = "Freedom Implant (with injector)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_freedom/New()
|
||||
..()
|
||||
var/obj/item/weapon/implanter/O = new(src)
|
||||
O.imp = new /obj/item/weapon/implant/freedom(O)
|
||||
O.update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress
|
||||
name = "box (C)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_compress/New()
|
||||
new /obj/item/weapon/implanter/compressed(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive
|
||||
name = "box (E)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_explosive/New()
|
||||
new /obj/item/weapon/implanter/explosive(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
|
||||
name = "Uplink Implant (with injector)"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_uplink/New()
|
||||
..()
|
||||
var/obj/item/weapon/implanter/O = new(src)
|
||||
O.imp = new /obj/item/weapon/implant/uplink(O)
|
||||
O.update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/space
|
||||
name = "Boxed Space Suit and Helmet"
|
||||
can_hold = list("/obj/item/clothing/suit/space/syndicate/black/red", "/obj/item/clothing/head/helmet/space/syndicate/black/red")
|
||||
@@ -164,24 +129,6 @@
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/imp_adrenal
|
||||
name = "boxed adrenal implant (with injector)"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/implanter/O = new(src)
|
||||
O.imp = new /obj/item/weapon/implant/adrenalin(O)
|
||||
O.update()
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/mindslave
|
||||
name = "box (MS)"
|
||||
|
||||
New()
|
||||
..()
|
||||
var/obj/item/weapon/implanter/O = new(src)
|
||||
O.imp = new /obj/item/weapon/implant/traitor(O)
|
||||
O.update()
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/boolets
|
||||
name = "Shotgun shells"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user