Doors now check for critter access.

Cleaned up the objectives a bit and made a new "kill" one for rev.
Cleaned up implants and implanters a bit.
Cleaned up the prisoner computer a bit.
Sec Huds can be placed on security helmets (Still needs a sprite)
The beachball now has in hand sprites (Kor)

Cult:
Heads other than the Captain and HoS are now able to start as or be converted to a cultist.
Loyalty implants will block conversion but will not unconvert cultists.

Rev:
Station Heads or Head Revs who leave z1 will count as dead so long as they are off of the z level.
Loyalty implants will block conversion and will unconvert revs upon injection.
Once a mind has been unconverted it may not be reconverted

New items:
Loyalty implants, small implant that prevents reving/cult
The Captain, Warden, Officers, and Detective all start with one already implanted
Loyalty Implanter machine on the prison station that implants loyalty implants and may regen implants after a cooldown.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2049 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-08-26 07:41:37 +00:00
parent 256cdd37d2
commit c9bb9c2e5f
40 changed files with 9892 additions and 9469 deletions
+14 -5
View File
@@ -40,18 +40,28 @@
if(iscarbon(M))
var/safety = M:eyecheck()
if(!safety)
if(safety <= 0)
if(M.weakened <= 10)
M.weakened = 10
flick("e_flash", M.flash)
if(ishuman(M))//&& (rerevcheckvargoeshere)) //Rev check
if(user.mind in ticker.mode.head_revolutionaries)
ticker.mode.add_revolutionary(M.mind)
if(ishuman(M))
var/revsafe = 0
for(var/obj/item/weapon/implant/loyalty/L in M)
if(L && L.implanted)
revsafe = 1
break
if(M.mind.has_been_rev)
revsafe = 1
if(!revsafe)
if(user.mind in ticker.mode.head_revolutionaries)
ticker.mode.add_revolutionary(M.mind)
M.mind.has_been_rev = 1
else
flashfail = 1
else if(isrobot(user))
M.weakened = max(user.weakened, rand(5,10))
spawn(0)
var/atom/movable/overlay/animation = new(user.loc)
animation.layer = user.layer + 1
@@ -61,7 +71,6 @@
flick("blspell", animation)
sleep(5)
del(animation)
M.weakened = max(user.weakened, 10)
if(!flashfail)
+57
View File
@@ -0,0 +1,57 @@
/obj/item/clothing/glasses/hud
name = "HUD"
desc = "A heads-up display that provides important info in (almost) real time."
flags = null //doesn't protect eyes because it's a monocle, duh
origin_tech = "magnets=3;biotech=2"
var
list/icon/current = list() //the current hud icons
proc
process_hud(var/mob/M) return
/obj/item/clothing/glasses/hud/health
name = "Health Scanner HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their health status."
icon_state = "healthhud"
/obj/item/clothing/glasses/hud/security
name = "Security HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status."
icon_state = "securityhud"
process_hud(var/mob/M)
if(!M) return
if(!M.client) return
var/client/C = M.client
var/icon/tempHud = 'hud.dmi'
for(var/mob/living/carbon/human/perp in view(M))
if(perp.wear_id)
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
C.images += image(tempHud,perp,"hudwanted")
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
C.images += image(tempHud,perp,"hudprisoner")
break
else
C.images += image(tempHud,perp,"hudunknown")
for(var/obj/item/weapon/implant/I in perp)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/tracking))
C.images += image(tempHud,perp,"hud_imp_tracking")
if(istype(I,/obj/item/weapon/implant/loyalty))
C.images += image(tempHud,perp,"hud_imp_loyal")
+7 -4
View File
@@ -163,19 +163,22 @@ FLASHBANG
eye_safety = M.eyecheck()
if(ishuman(M))
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
ear_safety = 1
ear_safety += 2
if(M.mutations & HULK)
ear_safety = 1
ear_safety += 1
if(istype(M:head, /obj/item/clothing/head/helmet))
ear_safety += 1
//Flashing everyone
if(!eye_safety)
if(eye_safety < 1)
flick("e_flash", M.flash)
M.eye_stat += rand(1, 3)
M.stunned = max(M.stunned,2)
M.weakened = max(M.weakened,10)
//Now applying sound
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
if(ear_safety)
if(ear_safety > 0)
M.stunned = max(M.stunned,2)
M.weakened = max(M.weakened,1)
else
-330
View File
@@ -1,330 +0,0 @@
/*
CONTAINS:
IMPLANT CASE
TRACKER IMPLANT
IMPLANT PAD
FREEDOM IMPLANT
IMPLANTER
*/
/obj/item/weapon/implantcase/proc/update()
if (src.imp)
src.icon_state = text("implantcase-[]", src.imp.color)
else
src.icon_state = "implantcase-0"
return
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
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.equipped() != I)
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(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.reagents.total_volume >= 10)
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))
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
/obj/item/weapon/implantcase/tracking/New()
src.imp = new /obj/item/weapon/implant/tracking( src )
..()
return
/obj/item/weapon/implantcase/explosive/New()
src.imp = new /obj/item/weapon/implant/explosive( src )
..()
return
/obj/item/weapon/implant/chem/New()
..()
var/datum/reagents/R = new/datum/reagents(10)
reagents = R
R.my_atom = src
/obj/item/weapon/implantcase/chem/New()
src.imp = new /obj/item/weapon/implant/chem( src )
..()
return
/obj/item/weapon/implantpad/proc/update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
/obj/item/weapon/implantpad/attack_hand(mob/user as mob)
if ((src.case && (user.l_hand == src || user.r_hand == src)))
if (user.hand)
user.l_hand = src.case
else
user.r_hand = src.case
src.case.loc = user
src.case.layer = 20
src.case.add_fingerprint(user)
src.case = null
user.update_clothing()
src.add_fingerprint(user)
update()
else
if (user.contents.Find(src))
spawn( 0 )
src.attack_self(user)
return
else
return ..()
return
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if (istype(C, /obj/item/weapon/implantcase))
if (!( src.case ))
user.drop_item()
C.loc = src
src.case = C
else
return
src.update()
return
/obj/item/weapon/implantpad/attack_self(mob/user as mob)
user.machine = src
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if (src.case.imp)
if (istype(src.case.imp, /obj/item/weapon/implant/tracking))
var/obj/item/weapon/implant/tracking/T = src.case.imp
dat += {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Tracking Beacon<BR>
<b>Zone:</b> Spinal Column> 2-5 vertebrae<BR>
<b>Power Source:</b> Nervous System Ion Withdrawl Gradient<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 on frequency- Useful for tracking.<BR>
Range: 35-40 meters<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:
Frequency (144.1-148.9):
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(T.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
ID (1-100):
<A href='byond://?src=\ref[src];id=-10'>-</A>
<A href='byond://?src=\ref[src];id=-1'>-</A> [T.id]
<A href='byond://?src=\ref[src];id=1'>+</A>
<A href='byond://?src=\ref[src];id=10'>+</A><BR>"}
else if (istype(src.case.imp, /obj/item/weapon/implant/freedom))
dat += {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Zone:</b> Right Hand> Near wrist<BR>
<b>Power Source:</b> Lithium Ion Battery<BR>
<b>Life:</b> optimum 5 uses<BR>
<b>Important Notes: <font color='red'>Illegal</font></b><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"}
else if (istype(src.case.imp, /obj/item/weapon/implant/explosive))
dat += {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Prisoner Management Implant<BR>
<b>Zone:</b> Spinal Column>Atlantis Vertebrae<BR>
<b>Power Source:</b> Nervous System Ion Withdrawl Gradient<BR>
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
<b>Important Notes:</b><BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal.<BR>
<b>Special Features:</b><BR>
<i>Direct-Interface</i>- You can use the prisoner management system to transmit short messages directly into the brain of the implanted subject.<BR>
<i>Safe-break</i>- Can be safely deactivated remotely.<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
else if (istype(src.case.imp, /obj/item/weapon/implant/chem))
dat += {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
<b>Zone:</b> Abdominal Cavity>Abdominal Aorta<BR>
<b>Power Source:</b> Techno-organtic Metabolization System<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><BR>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 25 units.<BR>
Can only be loaded while still in it's 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."}
else
dat += "Implant ID not in database"
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/weapon/implantpad/Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
if (href_list["freq"])
if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking)))
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.frequency += text2num(href_list["freq"])
T.frequency = sanitize_frequency(T.frequency)
if (href_list["id"])
if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking)))
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["id"])
T.id = min(100, T.id)
T.id = max(1, T.id)
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
//Foreach goto(290)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
return
/obj/item/weapon/implant/proc/trigger(emote, source as mob)
return
/obj/item/weapon/implant/proc/implanted(source as mob)
return
/obj/item/weapon/implant/freedom/New()
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return
/obj/item/weapon/implant/freedom/trigger(emote, mob/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.client)
source.client.screen -= W
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.layer = initial(W.layer)
/obj/item/weapon/implant/freedom/implanted(mob/source as mob)
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."
/obj/item/weapon/implanter/proc/update()
if (src.imp)
src.icon_state = "implanter1"
else
src.icon_state = "implanter0"
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 [M] has been implanted by [user].", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
src.imp.loc = M
src.imp.imp_in = M
src.imp.implanted = 1
src.imp.implanted(M)
src.imp = null
user.show_message("\red You implanted the implant into [M].")
src.icon_state = "implanter0"
/obj/item/weapon/implant/uplink
var/activation_emote = "chuckle"
var/obj/item/weapon/syndicate_uplink/uplink = null
New()
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
uplink = new /obj/item/weapon/syndicate_uplink/implanted(src)
..()
implanted(mob/source as mob)
source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate."
trigger(emote, mob/source as mob)
if(emote == activation_emote)
uplink.attack_self(source)
@@ -0,0 +1,202 @@
/obj/item/weapon/implant
name = "implant"
var
implanted = null
mob/imp_in = null
color = "b"
allow_reagents = 0
proc
trigger(emote, source as mob)
implanted(source as mob)
get_data()
trigger()
return
implanted(source as mob)
return
get_data()
return "No information available"
/obj/item/weapon/implant/uplink
name = "uplink"
desc = "Summon things."
var
activation_emote = "chuckle"
obj/item/weapon/syndicate_uplink/uplink = null
New()
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
uplink = new /obj/item/weapon/syndicate_uplink/implanted(src)
..()
return
implanted(mob/source as mob)
source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate."
return
trigger(emote, mob/source as mob)
if(emote == activation_emote)
uplink.attack_self(source)
return
/obj/item/weapon/implant/tracking
name = "tracking"
desc = "Track with this."
var
id = 1.0
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>
ID (1-100):
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [id]
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
return dat
Topic(href, href_list)
..()
if (usr.stat)
return
var/obj/item/weapon/implantpad/IP = (locate(/obj/item/weapon/implantpad) in usr)
if(IP)
if(IP.case)
if(IP.case.imp == src)
usr.machine = src
if (href_list["id"])
src.id += text2num(href_list["id"])
src.id = min(100, src.id)
src.id = max(1, src.id)
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
return
usr << browse(null, "window=implantpad")
return
/obj/item/weapon/implant/explosive
name = "explosive"
desc = "And boom goes the weasel."
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/chem
name = "chem"
desc = "Injects things."
allow_reagents = 1
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 25 units.<BR>
Can only be loaded while still in it's 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
New()
..()
var/datum/reagents/R = new/datum/reagents(10)
reagents = R
R.my_atom = src
trigger(var/number = 0)
if((!number) || (!src.imp_in)) return 0
var/mob/living/carbon/R = src.imp_in
src.reagents.trans_to(R, number)
R << "You hear a faint *beep*."
if(!src.reagents.total_volume)
R << "You hear a faint click from your chest."
spawn(0)
del(src)
return
/obj/item/weapon/implant/loyalty
name = "loyalty"
desc = "Makes you loyal or such."
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
implanted(M as mob)
if(!istype(M, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = M
if(H.mind in ticker.mode:head_revolutionaries)
for (var/mob/O in viewers(H, null))
O.show_message("\red [H] seems to resist the implant.", 1)
return
else if(H.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(H.mind)
H << "\blue You feel a surge of loyalty towards NanoTrasen."
return
@@ -0,0 +1,116 @@
/obj/item/weapon/implantcase
name = "Glass Case"
desc = "A case containing an implant."
icon_state = "implantcase-0"
item_state = "implantcase"
throw_speed = 1
throw_range = 5
w_class = 1.0
var
obj/item/weapon/implant/imp = null
proc
update()
update()
if (src.imp)
src.icon_state = text("implantcase-[]", src.imp.color)
else
src.icon_state = "implantcase-0"
return
attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
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.equipped() != I)
return
if((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(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.allow_reagents) return
if(src.imp.reagents.total_volume >= 10)
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))
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
/obj/item/weapon/implantcase/tracking
name = "Glass Case- 'Tracking'"
desc = "A case containing a tracking implant."
icon = 'items.dmi'
icon_state = "implantcase-b"
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 = 'items.dmi'
icon_state = "implantcase-r"
New()
src.imp = new /obj/item/weapon/implant/explosive( src )
..()
return
/obj/item/weapon/implantcase/chem
name = "Glass Case- 'Chem'"
desc = "A case containing a chemical implant."
icon = 'items.dmi'
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/chem/New()
src.imp = new /obj/item/weapon/implant/chem( src )
..()
return
/obj/item/weapon/implantcase/loyalty
name = "Glass Case- 'Loyalty'"
desc = "A case containing a loyalty implant."
icon = 'items.dmi'
icon_state = "implantcase-r"
New()
src.imp = new /obj/item/weapon/implant/loyalty( src )
..()
return
@@ -0,0 +1,165 @@
/obj/machinery/implantchair
name = "Loyalty Implanter"
desc = "Used to implant occupants with loyalty implants."
icon = 'implantchair.dmi'
icon_state = "implantchair"
density = 1
opacity = 0
anchored = 1
var
ready = 1
malfunction = 0
list/obj/item/weapon/implant/loyalty/implant_list = list()
max_implants = 5
injection_cooldown = 600
replenish_cooldown = 6000
replenishing = 0
mob/living/carbon/occupant = null
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.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>
<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>
<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>
[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>
"}
user.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"])
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)
if(istype(G, /obj/item/weapon/grab))
if(!ismob(G:affecting))
return
for(var/mob/living/carbon/metroid/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 Metroid latched onto their head."
return
var/mob/M = G:affecting
if(put_mob(M))
del(G)
src.updateUsrDialog()
return
go_out()
if(!( src.occupant ))
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.pulling = null
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
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)
imp.loc = M
imp.imp_in = M
imp.implanted = 1
imp.implanted(M)
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
return
verb
get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out()
add_fingerprint(usr)
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)
return
@@ -0,0 +1,47 @@
/obj/item/weapon/implanter
name = "implanter"
icon = 'items.dmi'
icon_state = "implanter0"
item_state = "syringe_0"
throw_speed = 1
throw_range = 5
w_class = 2.0
var
obj/item/weapon/implant/imp = null
proc
update()
update()
if (src.imp)
src.icon_state = "implanter1"
else
src.icon_state = "implanter0"
return
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 [M] has been implanted by [user].", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
src.imp.loc = M
src.imp.imp_in = M
src.imp.implanted = 1
src.imp.implanted(M)
src.imp = null
user.show_message("\red You implanted the implant into [M].")
src.icon_state = "implanter0"
return
/obj/item/weapon/implanter/loyalty
name = "implanter-loyalty"
New()
src.imp = new /obj/item/weapon/implant/loyalty( src )
..()
update()
return
@@ -0,0 +1,58 @@
/obj/item/weapon/implant/freedom
name = "freedom"
desc = "Use this to escape from those evil Red Shirts."
color = "r"
var
activation_emote = "chuckle"
uses = 1.0
New()
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return
trigger(emote, mob/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.client)
source.client.screen -= W
if (W)
W.loc = source.loc
dropped(source)
if (W)
W.layer = initial(W.layer)
return
implanted(mob/source as mob)
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
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
@@ -0,0 +1,101 @@
/obj/item/weapon/implantpad
name = "implantpad"
desc = "Used to modify implants."
icon = 'items.dmi'
icon_state = "implantpad-0"
item_state = "electronic"
throw_speed = 1
throw_range = 5
w_class = 2.0
var
obj/item/weapon/implantcase/case = null
broadcasting = null
listening = 1.0
proc
update()
update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
attack_hand(mob/user as mob)
if ((src.case && (user.l_hand == src || user.r_hand == src)))
if (user.hand)
user.l_hand = src.case
else
user.r_hand = src.case
src.case.loc = user
src.case.layer = 20
src.case.add_fingerprint(user)
src.case = null
user.update_clothing()
src.add_fingerprint(user)
update()
else
if (user.contents.Find(src))
spawn( 0 )
src.attack_self(user)
return
else
return ..()
return
attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
user.drop_item()
C.loc = src
src.case = C
else
return
src.update()
return
attack_self(mob/user as mob)
user.machine = src
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
if(istype(src.case.imp, /obj/item/weapon/implant))
dat += src.case.imp.get_data()
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
/*
Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
if (href_list["id"])
if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking)))
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["id"])
T.id = min(100, T.id)
T.id = max(1, T.id)
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
//Foreach goto(290)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
return*/
@@ -60,27 +60,26 @@ Frequency:
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/weapon/implant/tracking/W in world)
if (W.frequency == src.frequency)
if (!W.implanted || !ismob(W.loc))
continue
else
var/mob/M = W.loc
if (M.stat == 2)
if (M.timeofdeath + 6000 < world.time)
continue
if (!W.implanted || !ismob(W.loc))
continue
else
var/mob/M = W.loc
if (M.stat == 2)
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
if (direct < 10)
direct = "strong"
else
direct = "weak"
src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
direct = "weak"
src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
else
+13 -1
View File
@@ -62,4 +62,16 @@
user << "\red Its locked!"
else
..()
return
return
/obj/item/weapon/storage/lockbox/loyalty
name = "Lockbox (Loyalty Implants)"
req_access = list(access_security)
New()
..()
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)