diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm
index 2e748d40b7b..c832bcc03d4 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -22,4 +22,7 @@ var/global/list/rcd_list = list() //list of Rapid Construction Devices.
var/global/list/apcs = list()
var/global/list/air_alarms = list()
-var/global/list/power_monitors = list()
\ No newline at end of file
+var/global/list/power_monitors = list()
+
+var/global/list/tracking_implants = list() //list of all tracking implants to work out what treks everyone are on. Sadly not on lavaworld not implemented...
+var/global/list/beacons = list()
\ No newline at end of file
diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm
index f6b39cb5f38..a8b3b4f218e 100644
--- a/code/game/machinery/Beacon.dm
+++ b/code/game/machinery/Beacon.dm
@@ -1,5 +1,4 @@
/obj/machinery/bluespace_beacon
-
icon = 'icons/obj/objects.dmi'
icon_state = "floor_beaconf"
name = "Bluespace Gigabeacon"
@@ -12,47 +11,45 @@
var/syndicate = 0
var/obj/item/device/radio/beacon/Beacon
- New()
- ..()
+/obj/machinery/bluespace_beacon/New()
+ ..()
+ var/turf/T = loc
+ Beacon = new /obj/item/device/radio/beacon
+ Beacon.invisibility = INVISIBILITY_MAXIMUM
+ Beacon.loc = T
+ Beacon.syndicate = syndicate
+
+ hide(T.intact)
+
+/obj/machinery/bluespace_beacon/Destroy()
+ if(Beacon)
+ qdel(Beacon)
+ Beacon = null
+ return ..()
+
+// update the invisibility and icon
+/obj/machinery/bluespace_beacon/hide(var/intact)
+ invisibility = intact ? 101 : 0
+ update_icon()
+
+// update the icon_state
+/obj/machinery/bluespace_beacon/update_icon()
+ var/state="floor_beacon"
+
+ if(invisibility)
+ icon_state = "[state]f"
+
+ else
+ icon_state = "[state]"
+
+/obj/machinery/bluespace_beacon/process()
+ if(!Beacon)
var/turf/T = loc
Beacon = new /obj/item/device/radio/beacon
Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.loc = T
- Beacon.syndicate = syndicate
-
- hide(T.intact)
-
- Destroy()
- if(Beacon)
- qdel(Beacon)
- Beacon = null
- return ..()
-
- // update the invisibility and icon
- hide(var/intact)
- invisibility = intact ? 101 : 0
- updateicon()
-
- // update the icon_state
- proc/updateicon()
- var/state="floor_beacon"
-
- if(invisibility)
- icon_state = "[state]f"
-
- else
- icon_state = "[state]"
-
- process()
- if(!Beacon)
- var/turf/T = loc
- Beacon = new /obj/item/device/radio/beacon
- Beacon.invisibility = INVISIBILITY_MAXIMUM
- Beacon.loc = T
- if(Beacon)
- if(Beacon.loc != loc)
- Beacon.loc = loc
-
- updateicon()
-
+ if(Beacon)
+ if(Beacon.loc != loc)
+ Beacon.loc = loc
+ update_icon()
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index d144eebac2c..af429a3014b 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -17,126 +17,118 @@
light_color = LIGHT_COLOR_DARKRED
+/obj/machinery/computer/prisoner/attack_ai(var/mob/user as mob)
+ return src.attack_hand(user)
- attack_ai(var/mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/computer/prisoner/attack_hand(var/mob/user as mob)
+ if(..())
+ return 1
+ user.set_machine(src)
+ var/dat
+ dat += "Prisoner Implant Manager System
"
+ if(screen == 0)
+ dat += "
Unlock Console"
+ else if(screen == 1)
+ if(istype(inserted_id))
+ var/p = inserted_id:points
+ var/g = inserted_id:goal
+ dat += text("[inserted_id]
")
+ dat += text("Collected points: [p]. Reset.
")
+ dat += text("Card goal: [g]. Set
")
+ dat += text("Space Law recommends sentences of 100 points per minute they would normally serve in the brig.
")
+ else
+ dat += text("Insert Prisoner ID
")
+ dat += "
Chemical Implants
"
+ var/turf/Tr = null
+ for(var/obj/item/weapon/implant/chem/C in tracking_implants)
+ Tr = get_turf(C)
+ if((Tr) && (Tr.z != src.z)) continue//Out of range
+ if(!C.implanted) continue
+ // AUTOFIXED BY fix_string_idiocy.py
+ // C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\computer\prisoner.dm:41: dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
+ dat += {"[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject:
+ ((1))
+ ((5))
+ ((10))
+ ********************************
"}
+ // END AUTOFIX
+ dat += "
Tracking Implants
"
+ for(var/obj/item/weapon/implant/tracking/T in tracking_implants)
+ Tr = get_turf(T)
+ if((Tr) && (Tr.z != src.z)) continue//Out of range
+ if(!T.implanted) continue
+ var/loc_display = "Unknown"
+ var/mob/living/carbon/M = T.imp_in
+ if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
+ var/turf/mob_loc = get_turf(M)
+ loc_display = mob_loc.loc
+ if(T.malfunction)
+ loc_display = pick(teleportlocs)
+ dat += "ID: [T.id] | Location: [loc_display]
"
+ dat += "(Message Holder) |
"
+ dat += "********************************
"
+ dat += "
Lock Console"
+ user << browse(dat, "window=computer;size=400x500")
+ onclose(user, "computer")
+ return
+/obj/machinery/computer/prisoner/process()
+ if(!..())
+ src.updateDialog()
+ return
- attack_hand(var/mob/user as mob)
- if(..())
- return
- user.set_machine(src)
- var/dat
- dat += "Prisoner Implant Manager System
"
- if(screen == 0)
- dat += "
Unlock Console"
- else if(screen == 1)
- if(istype(inserted_id))
- var/p = inserted_id:points
- var/g = inserted_id:goal
- dat += text("[inserted_id]
")
- dat += text("Collected points: [p]. Reset.
")
- dat += text("Card goal: [g]. Set
")
- dat += text("Space Law recommends sentences of 100 points per minute they would normally serve in the brig.
")
- else
- dat += text("Insert Prisoner ID.
")
- dat += "
Chemical Implants
"
- var/turf/Tr = null
- for(var/obj/item/weapon/implant/chem/C in world)
- Tr = get_turf(C)
- if((Tr) && (Tr.z != src.z)) continue//Out of range
- if(!C.implanted) continue
+/obj/machinery/computer/prisoner/Topic(href, href_list)
+ if(..())
+ return 1
+
+ usr.set_machine(src)
- // AUTOFIXED BY fix_string_idiocy.py
- // C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\computer\prisoner.dm:41: dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
- dat += {"[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject:
- ((1))
- ((5))
- ((10))
- ********************************
"}
- // END AUTOFIX
- dat += "
Tracking Implants
"
- for(var/obj/item/weapon/implant/tracking/T in world)
- Tr = get_turf(T)
- if((Tr) && (Tr.z != src.z)) continue//Out of range
- if(!T.implanted) continue
- var/loc_display = "Unknown"
- var/mob/living/carbon/M = T.imp_in
- if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
- var/turf/mob_loc = get_turf(M)
- loc_display = mob_loc.loc
- if(T.malfunction)
- loc_display = pick(teleportlocs)
- dat += "ID: [T.id] | Location: [loc_display]
"
- dat += "(Message Holder) |
"
- dat += "********************************
"
- dat += "
Lock Console"
+ if(href_list["id"])
+ switch(href_list["id"])
+ if("0")
+ var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
+ if(istype(I))
+ usr.drop_item()
+ I.loc = src
+ inserted_id = I
+ else usr << "\red No valid ID."
+ if("1")
+ inserted_id.loc = get_step(src,get_turf(usr))
+ inserted_id = null
+ if("2")
+ inserted_id.points = 0
+ if("3")
+ var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
+ if(num >= 0)
+ inserted_id.goal = num
+ if(href_list["inject1"])
+ var/obj/item/weapon/implant/I = locate(href_list["inject1"])
+ if(I) I.activate(1)
- user << browse(dat, "window=computer;size=400x500")
- onclose(user, "computer")
- return
+ else if(href_list["inject5"])
+ var/obj/item/weapon/implant/I = locate(href_list["inject5"])
+ if(I) I.activate(5)
+ else if(href_list["inject10"])
+ var/obj/item/weapon/implant/I = locate(href_list["inject10"])
+ if(I) I.activate(10)
- process()
- if(!..())
- src.updateDialog()
- return
-
-
- Topic(href, href_list)
- if(..())
- return
- if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if(href_list["id"])
- switch(href_list["id"])
- if("0")
- var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
- if(istype(I))
- usr.drop_item()
- I.loc = src
- inserted_id = I
- else usr << "\red No valid ID."
- if("1")
- inserted_id.loc = get_step(src,get_turf(usr))
- inserted_id = null
- if("2")
- inserted_id.points = 0
- if("3")
- var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null)
- if(num >= 0)
- inserted_id.goal = num
- if(href_list["inject1"])
- var/obj/item/weapon/implant/I = locate(href_list["inject1"])
- if(I) I.activate(1)
-
- else if(href_list["inject5"])
- var/obj/item/weapon/implant/I = locate(href_list["inject5"])
- if(I) I.activate(5)
-
- else if(href_list["inject10"])
- var/obj/item/weapon/implant/I = locate(href_list["inject10"])
- if(I) I.activate(10)
-
- else if(href_list["lock"])
- if(src.allowed(usr))
- screen = !screen
- else
- usr << "Unauthorized Access."
-
- else if(href_list["warn"])
- var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
- if(!warning) return
- var/obj/item/weapon/implant/I = locate(href_list["warn"])
- if((I)&&(I.imp_in))
- var/mob/living/carbon/R = I.imp_in
- R << "\green You hear a voice in your head saying: '[warning]'"
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
+ else if(href_list["lock"])
+ if(src.allowed(usr))
+ screen = !screen
+ else
+ usr << "Unauthorized access."
+ else if(href_list["warn"])
+ var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
+ if(!warning) return
+ var/obj/item/weapon/implant/I = locate(href_list["warn"])
+ if((I)&&(I.imp_in))
+ var/mob/living/carbon/R = I.imp_in
+ R << "You hear a voice in your head saying: '[warning]'"
+ src.add_fingerprint(usr)
+ src.updateUsrDialog()
+ return
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index a1f8d2ee5fa..4aaaf47f8c7 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -177,7 +177,7 @@
var/list/L = list()
var/list/areaindex = list()
- for(var/obj/item/device/radio/beacon/R in world)
+ for(var/obj/item/device/radio/beacon/R in beacons)
var/turf/T = get_turf(R)
if (!T)
continue
@@ -192,7 +192,7 @@
areaindex[tmpname] = 1
L[tmpname] = R
- for (var/obj/item/weapon/implant/tracking/I in world)
+ for (var/obj/item/weapon/implant/tracking/I in tracking_implants)
if (!I.implanted || !ismob(I.loc))
continue
else
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index 42837d06aba..a3ec474fb08 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -20,7 +20,7 @@
recharge_port.recharge_floor = null
recharge_port = null
recharging_mecha = null
- ..()
+ return ..()
/turf/simulated/floor/mech_bay_recharge_floor/Entered(var/obj/mecha/mecha)
. = ..()
diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm
index f370cf3dd01..6a3a270b000 100644
--- a/code/game/objects/items/devices/radio/beacon.dm
+++ b/code/game/objects/items/devices/radio/beacon.dm
@@ -3,10 +3,19 @@
desc = "A beacon used by a teleporter."
icon_state = "beacon"
item_state = "signaler"
- var/code = "electronic"
+ var/code = "Beacon"
origin_tech = "bluespace=1"
var/emagged = 0
var/syndicate = 0
+
+/obj/item/device/radio/beacon/New()
+ ..()
+ code = "[code] ([beacons.len + 1])"
+ beacons += src
+
+/obj/item/device/radio/beacon/Destroy()
+ beacons -= src
+ return ..()
/obj/item/device/radio/beacon/emag_act(user as mob)
if(!emagged)
@@ -21,28 +30,26 @@
/obj/item/device/radio/beacon/send_hear()
return null
-
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
set name = "Alter Beacon's Signal"
set category = "Object"
set src in usr
+
+ if (usr.stat || usr.restrained())
+ return
- if ((usr.canmove && !( usr.restrained() )))
- src.code = t
- if (!( src.code ))
- src.code = "beacon"
+ code = t
+ if (isnull(code))
+ code = initial(code)
src.add_fingerprint(usr)
return
-
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
proc/digest_delay()
spawn(600)
qdel(src)
-
// SINGULO BEACON SPAWNER
-
/obj/item/device/radio/beacon/syndicate
name = "suspicious beacon"
desc = "A label on it reads: Activate to have a singularity beacon teleported to your location."
@@ -85,4 +92,5 @@
new /obj/machinery/telepad_cargo(user.loc)
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
qdel(src)
- return
\ No newline at end of file
+ return
+
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 820a3311cff..447e862c751 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -12,53 +12,60 @@
var/allow_reagents = 0
var/malfunction = 0
- proc/trigger(emote, source as mob)
- return
+/obj/item/weapon/implant/proc/trigger(emote, source as mob)
+ return
- proc/activate()
- 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.)
- proc/implanted(var/mob/source)
- return 1
+// 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)
+ return 1
- proc/get_data()
- return "No information available"
+/obj/item/weapon/implant/proc/get_data()
+ return "No information available"
- proc/hear(message, source as mob)
- return
+/obj/item/weapon/implant/proc/hear(message, source as mob)
+ return
- proc/islegal()
- return 0
+/obj/item/weapon/implant/proc/islegal()
+ return 1
- 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/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
- Destroy()
- if(part)
- part.implants.Remove(src)
- return ..()
+/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 ..()
-
- get_data()
- var/dat = {"Implant Specifications:
+/obj/item/weapon/implant/tracking/get_data()
+ var/dat = {"Implant Specifications:
Name: Tracking Beacon
Life: 10 minutes after death of host
Important Notes: None
@@ -72,24 +79,23 @@ disintegrate into bio-safe elements.
Integrity: Gradient creates slight risk of being overcharged and frying the
circuitry. As a result neurotoxins can cause massive damage.
Implant Specifics:
"}
- return dat
+ return dat
- emp_act(severity)
- if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
- return
- malfunction = MALFUNCTION_TEMPORARY
+/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--
+ 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"
@@ -97,8 +103,8 @@ Implant Specifics:
"}
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
icon_state = "implant_evil"
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/dexplosive/get_data()
+ var/dat = {"
Implant Specifications:
Name: Robust Corp RX-78 Employee Management Implant
Life: Activates upon death.
@@ -108,23 +114,22 @@ Implant Specifics:
"}
Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
Special Features: Explodes
Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
+ return dat
- trigger(emote, source as mob)
- if(emote == "deathgasp")
- src.activate("death")
- return
+/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()
- 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()
-
- islegal()
- return 0
+/obj/item/weapon/implant/dexplosive/islegal()
+ return 0
//BS12 Explosive
/obj/item/weapon/implant/explosive
@@ -135,8 +140,8 @@ Implant Specifics:
"}
var/phrase = "supercalifragilisticexpialidocious"
icon_state = "implant_evil"
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/explosive/get_data()
+ var/dat = {"
Implant Specifications:
Name: Robust Corp RX-78 Intimidation Class Implant
Life: Activates upon codephrase.
@@ -146,112 +151,112 @@ Implant Specifics:
"}
Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
Special Features: Explodes
Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
+ return dat
- hear_talk(mob/M as mob, msg)
- hear(msg)
+/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
- hear(var/msg)
- var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
- msg = sanitize_simple(msg, replacechars)
- if(findtext(msg,phrase))
- activate()
- qdel(src)
+ 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
- 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)
-
- 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]'', say [src.phrase] to attempt to activate.", 0, 0)
- usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate."
- return 1
-
- 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--
-
- islegal()
- return 0
-
- 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(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()
- explosion(get_turf(imp_in), -1, -1, 2, 3)
- qdel(src)
+ 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]'', say [src.phrase] to attempt to activate.", 0, 0)
+ usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] 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"
@@ -259,8 +264,8 @@ Implant Specifics:
"}
origin_tech = "materials=3;biotech=4"
allow_reagents = 1
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/chem/get_data()
+ var/dat = {"
Implant Specifications:
Name: Robust Corp MJ-420 Prisoner Management Implant
Life: Deactivates upon death but remains within the body.
@@ -275,56 +280,58 @@ the implant releases the chemicals directly into the blood stream.
Can only be loaded while still in its original case.
Integrity: Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,
the implant may become unstable and either pre-maturely inject the subject or simply break."}
- return dat
+ 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 ..()
- New()
- ..()
- var/datum/reagents/R = new/datum/reagents(50)
- reagents = R
- R.my_atom = src
+/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
- trigger(emote, source as mob)
- if(emote == "deathgasp")
- src.activate(src.reagents.total_volume)
+/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)
- 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
-
- 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--
+ spawn(20)
+ malfunction--
/obj/item/weapon/implant/loyalty
name = "loyalty"
desc = "Makes you loyal or such."
origin_tech = "materials=2;biotech=4;programming=4"
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/loyalty/get_data()
+ var/dat = {"
Implant Specifications:
Name: Nanotrasen Employee Management Implant
Life: Ten years.
@@ -334,27 +341,27 @@ the implant may become unstable and either pre-maturely inject the subject or si
Function: Contains a small pod of nanobots that manipulate the host's mental functions.
Special Features: Will prevent and cure most forms of brainwashing.
Integrity: Implant will last so long as the nanobots are inside the bloodstream."}
- return dat
+ return dat
- 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("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!")
- return 0
- else if(H.mind in ticker.mode:revolutionaries)
- ticker.mode:remove_revolutionary(H.mind)
- H << "You feel a surge of loyalty towards Nanotrasen."
- return 1
+/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("[H] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!")
+ return 0
+ else if(H.mind in ticker.mode:revolutionaries)
+ ticker.mode:remove_revolutionary(H.mind)
+ H << "You feel a surge of loyalty towards Nanotrasen."
+ return 1
/obj/item/weapon/implant/traitor
name = "Mindslave Implant"
desc = "Divide and Conquer"
icon_state = "implant_evil"
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/traitor/get_data()
+ var/dat = {"
Implant Specifications:
Name: Mind-Slave Implant
Life: ???
@@ -364,50 +371,53 @@ the implant may become unstable and either pre-maturely inject the subject or si
Function: Contains a small pod of nanobots that manipulate the host's mental functions.
Special Features: Diplomacy was never so easy.
Integrity: Implant will last so long as the nanobots are inside the bloodstream."}
- return dat
+ return dat
- 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 << "Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot."
- 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("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
- return 0
- if(locate(/obj/item/weapon/implant/traitor) in H.contents)
- H.visible_message("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
- return 0
- H.implanting = 1
- H << "You feel completely loyal to [user.name]."
- 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 << "You're now completely loyal to [user.name]! You now must lay down your life to protect them and assist in their goals at any cost."
- 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 << "Objective #1: [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/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 << "Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot."
+ 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("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
+ return 0
+ if(locate(/obj/item/weapon/implant/traitor) in H.contents)
+ H.visible_message("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
+ return 0
+ H.implanting = 1
+ H << "You feel completely loyal to [user.name]."
+ 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 << "You're now completely loyal to [user.name]! You now must lay down your life to protect them and assist in their goals at any cost."
+ 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 << "Objective #1: [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"
@@ -415,8 +425,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
var/uses = 3
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/adrenalin/get_data()
+ var/dat = {"
Implant Specifications:
Name: Cybersun Industries Adrenalin Implant
Life: Five days.
@@ -426,41 +436,38 @@ the implant may become unstable and either pre-maturely inject the subject or si
Function: Removes stuns, increases speed, and has a mild healing effect.
Special Features: Will prevent and cure most forms of brainwashing.
Integrity: Implant can only be used three times before the nanobots are depleted."}
- return dat
+ 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()
- 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)
- source.reagents.add_reagent("synaptizine", 10)
- source.reagents.add_reagent("omnizine", 10)
- source.reagents.add_reagent("stimulative_agent", 10)
-
- return
-
-
- implanted(mob/source)
- source.mind.store_memory("A implant can be activated by using the pale emote, say *pale to attempt to activate.", 0, 0)
- source << "The implanted freedom implant can be activated by using the pale emote, say *pale to attempt to activate."
- return 1
+ return
+/obj/item/weapon/implant/adrenalin/implanted(mob/source)
+ source.mind.store_memory("A implant can be activated by using the pale emote, say *pale to attempt to activate.", 0, 0)
+ source << "The implanted freedom implant can be activated by using the pale emote, say *pale 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"
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/death_alarm/get_data()
+ var/dat = {"
Implant Specifications:
Name: Nanotrasen \"Profit Margin\" Class Employee Lifesign Sensor
Life: Activates upon death.
@@ -470,61 +477,61 @@ the implant may become unstable and either pre-maturely inject the subject or si
Function: Contains a compact radio signaler that triggers when the host's lifesigns cease.
Special Features: Alerts crew to crewmember death.
Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
+ return dat
- process()
- if (!implanted) return
- var/mob/M = imp_in
+/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")
+ if(isnull(M)) // If the mob got gibbed
+ activate()
+ else if(M.stat == 2)
+ activate("death")
- 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)
+/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
- 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)
-
- 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
+ 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)
- spawn(20)
- malfunction--
+/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
- implanted(mob/source as mob)
- mobname = source.real_name
- processing_objects.Add(src)
- return 1
+ 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"
@@ -534,8 +541,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
var/activation_emote = "sigh"
var/obj/item/scanned = null
- get_data()
- var/dat = {"
+/obj/item/weapon/implant/compressed/get_data()
+ var/dat = {"
Implant Specifications:
Name: Nanotrasen \"Profit Margin\" Class Employee Lifesign Sensor
Life: Activates upon death.
@@ -545,40 +552,39 @@ the implant may become unstable and either pre-maturely inject the subject or si
Function: Contains a compact radio signaler that triggers when the host's lifesigns cease.
Special Features: Alerts crew to crewmember death.
Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
- return dat
+ return dat
- 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()
-
- activate()
- var/turf/t = get_turf(src)
- if (imp_in)
- imp_in.put_in_hands(scanned)
- else
- scanned.loc = t
- qdel(src)
-
- 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, say *[src.activation_emote] to attempt to activate.", 0, 0)
- source << "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- return 1
-
- islegal()
+/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
+ 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, say *[src.activation_emote] to attempt to activate.", 0, 0)
+ source << "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] 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."
@@ -599,6 +605,6 @@ the implant may become unstable and either pre-maturely inject the subject or si
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, say *[src.activation_emote] to attempt to activate.", 0, 0)
- source << "The implanted EMP implant can be activated [uses] time\s by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
- return 1
\ No newline at end of file
+ source.mind.store_memory("EMP implant can be activated [uses] time\s by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
+ source << "The implanted EMP implant can be activated [uses] time\s by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate."
+ return 1
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index b589c68eea7..f5e281bbb32 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -10,89 +10,100 @@
throw_range = 5
w_class = 2.0
var/obj/item/weapon/implantcase/case = null
- var/broadcasting = null
- var/listening = 1.0
- proc
- update()
+
+/obj/item/weapon/implantpad/Destroy()
+ if(case)
+ dropcase()
+ return ..()
-
- update()
- if (src.case)
- src.icon_state = "implantpad-1"
- else
- src.icon_state = "implantpad-0"
+/obj/item/weapon/implantpad/update_icon()
+ if(case)
+ src.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
-
-
- attack_hand(mob/user as mob)
- if ((src.case && (user.l_hand == src || user.r_hand == src)))
- user.put_in_active_hand(case)
-
- src.case.add_fingerprint(user)
- src.case = null
-
- src.add_fingerprint(user)
- update()
- else
- return ..()
+ if(case)
+ user << "There's already an implant in the pad!"
return
-
-
- attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob, params)
- ..()
- if(istype(C, /obj/item/weapon/implantcase))
- if(!( src.case ))
- user.drop_item()
- C.loc = src
- src.case = C
- else
+ user.unEquip(C)
+ C.forceMove(src)
+ case = C
+ update_icon()
+
+/obj/item/weapon/implantpad/proc/dropcase(mob/user as mob)
+ if(!case)
+ user << "There's no implant in the pad!"
+ return
+ if(user)
+ if(user.put_in_hands(case))
+ add_fingerprint(user)
+ case.add_fingerprint(user)
+ case = null
+ update_icon()
return
- src.update()
+
+ case.forceMove(get_turf(src))
+ case = null
+ update_icon()
+
+/obj/item/weapon/implantpad/verb/remove_implant()
+ set category = "Object"
+ set name = "Remove Implant"
+ set src in view(1)
+
+ 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)
+ else
+ return ..()
- attack_self(mob/user as mob)
- user.set_machine(src)
- var/dat = "Implant Mini-Computer:
"
- if (src.case)
- if(src.case.imp)
- if(istype(src.case.imp, /obj/item/weapon/implant))
- dat += src.case.imp.get_data()
- if(istype(src.case.imp, /obj/item/weapon/implant/tracking))
- dat += {"ID (1-100):
- -
- - [case.imp:id]
- +
- +
"}
- else
- dat += "The implant casing is empty."
+/obj/item/weapon/implantpad/attack_self(mob/user as mob)
+ add_fingerprint(user)
+ user.set_machine(src)
+ var/dat = "Implant Mini-Computer:
"
+ if (case)
+ if(case.imp)
+ if(istype(case.imp, /obj/item/weapon/implant))
+ dat += "Remove Case
"
+ 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):
+ -
+ - [T.id]
+ +
+ +
"}
else
- dat += "Please insert an implant casing!"
- user << browse(dat, "window=implantpad")
- onclose(user, "implantpad")
- return
+ 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.set_machine(src)
- if (href_list["tracking_id"])
- var/obj/item/weapon/implant/tracking/T = src.case.imp
- T.id += text2num(href_list["tracking_id"])
- T.id = min(100, T.id)
- T.id = max(1, T.id)
+/obj/item/weapon/implantpad/Topic(href, href_list)
+ if(..())
+ return 1
- 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)
- else
- usr << browse(null, "window=implantpad")
- return
- return
+ var/mob/living/user = usr
+ if (href_list["tracking_id"])
+ if(case && case.imp)
+ 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
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 5b99f645368..637e882bdbb 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -25,9 +25,9 @@
origin_tech = "magnets=1"
/obj/item/weapon/locator/attack_self(mob/user as mob)
- user.set_machine(src)
+ add_fingerprint(usr)
var/dat
- if (src.temp)
+ if (temp)
dat = "[src.temp]
Clear"
else
dat = {"
@@ -44,80 +44,49 @@ Frequency:
return
/obj/item/weapon/locator/Topic(href, href_list)
- ..()
- if (usr.stat || usr.restrained())
- return
+ if(..())
+ return 1
+
var/turf/current_location = get_turf(usr)//What turf is the user on?
- if(!current_location||(current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
- usr << "The [src] is malfunctioning."
- return
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
- usr.set_machine(src)
- if (href_list["refresh"])
- src.temp = "Persistent Signal Locator
"
- var/turf/sr = get_turf(src)
+ if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
+ usr << "\The [src] is malfunctioning."
+ return 1
+
+ if (href_list["refresh"])
+ temp = "Persistent Signal Locator
"
+ var/turf/sr = get_turf(src)
- if (sr)
- src.temp += "Located Beacons:
"
+ if (sr)
+ temp += "Located Beacons:
"
- for(var/obj/item/device/radio/beacon/W in world)
- if (W.frequency == src.frequency)
- 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 < 5)
- direct = "very strong"
- else
- if (direct < 10)
- direct = "strong"
- else
- if (direct < 20)
- direct = "weak"
- else
- direct = "very weak"
- src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]
"
+ for(var/obj/item/device/radio/beacon/W in beacons)
+ if (W.frequency == frequency && !W.syndicate)
+ if (W && W.z == z)
+ var/turf/TB = get_turf(W)
+ temp += "[W.code]: [TB.x], [TB.y], [TB.z]
"
- src.temp += "Extranneous Signals:
"
- for (var/obj/item/weapon/implant/tracking/W in world)
- if (!W.implanted || !(istype(W.loc,/obj/item/organ/external) || ismob(W.loc)))
- continue
- else
- var/mob/M = W.loc
- if (M.stat == 2)
- if (M.timeofdeath + 6000 < world.time)
- continue
+ temp += "Located Implants:
"
+ for (var/obj/item/weapon/implant/tracking/T in tracking_implants)
+ if (!T.implanted || !T.imp_in)
+ 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"
- else
- if (direct < 10)
- direct = "strong"
- else
- direct = "weak"
- src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]
"
+ if (T && T.z == z)
+ temp += "[T.id]: [T.imp_in.x], [T.imp_in.y], [T.imp_in.z]
"
- src.temp += "You are at \[[sr.x],[sr.y],[sr.z]\] in orbital coordinates.
Refresh
"
- else
- src.temp += "Processing Error: Unable to locate orbital position.
"
+ temp += "You are at \[[sr.x],[sr.y],[sr.z]\]."
+ temp += "
Refresh
"
else
- if (href_list["freq"])
- src.frequency += text2num(href_list["freq"])
- src.frequency = sanitize_frequency(src.frequency)
- else
- if (href_list["temp"])
- src.temp = null
- if (istype(src.loc, /mob))
- attack_self(src.loc)
+ temp += "Processing error: Unable to locate orbital position.
"
+ else
+ if (href_list["freq"])
+ frequency += text2num(href_list["freq"])
+ frequency = sanitize_frequency(frequency)
else
- for(var/mob/M in viewers(1, src))
- if (M.client)
- src.attack_self(M)
- return
+ if (href_list["temp"])
+ temp = null
+ attack_self(usr)
+ return 1
/*
* Hand-tele
@@ -171,5 +140,5 @@ Frequency:
P.creator = src
try_move_adjacent(P)
active_portals++
- src.add_fingerprint(user)
+ add_fingerprint(user)
return