From e020a8716bb9b3d45b225c6b3f5c506da03334b3 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:50:54 +0200 Subject: [PATCH 1/7] Holodeck rack exploit fix --- _maps/map_files/cyberiad/z2.dmm | 6 +- .../machinery/computer/HolodeckControl.dm | 337 ++++++++---------- 2 files changed, 148 insertions(+), 195 deletions(-) diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm index fb42cd3ed3d..b6735bb7be1 100644 --- a/_maps/map_files/cyberiad/z2.dmm +++ b/_maps/map_files/cyberiad/z2.dmm @@ -71,8 +71,8 @@ "bs" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/unsimulated/wall{tag = "icon-iron3"; icon_state = "iron3"},/area/space) "bt" = (/obj/structure/flora/ausbushes/fullgrass,/turf/simulated/floor/holofloor/grass,/area/holodeck/source_picnicarea) "bu" = (/obj/structure/flora/ausbushes/sparsegrass,/turf/simulated/floor/holofloor/grass,/area/holodeck/source_picnicarea) -"bv" = (/obj/structure/rack,/obj/item/clothing/under/dress/dress_saloon,/obj/item/clothing/head/hairflower,/turf/simulated/floor/holofloor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) -"bw" = (/obj/effect/landmark/costume,/obj/structure/rack,/turf/simulated/floor/holofloor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) +"bv" = (/obj/effect/landmark/costume,/obj/structure/rack/holorack,/turf/simulated/floor/holofloor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) +"bw" = (/obj/structure/rack/holorack,/obj/item/clothing/under/dress/dress_saloon,/obj/item/clothing/head/hairflower,/turf/simulated/floor/holofloor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) "bx" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Holodeck Projector Floor"},/area/holodeck/source_wildlife) "by" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Holodeck Projector Floor"},/area/holodeck/source_plating) "bz" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Burn-Mix Floor"; nitrogen = 0; oxygen = 2500; temperature = 370; toxins = 5000},/area/holodeck/source_burntest) @@ -1821,7 +1821,7 @@ (1,1,1) = {" aaabacadaeafagahaaaiajakalamanaoagafajacadahakaeamaiaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKawaxayazaAaBaCaDaEaFaLaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaMaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaOaPaPaPaPaPaQaPaPaPaPaPaQaPaPaPaPaPaQaPaPaPaPaPaQaPaPaPaPaPaQaPaPaPaPaPaQaPaPaPaPaPaR -ajaSaTaUaVaWaXaYaZbabbbcbdbebfbgaXaWbbaTaUaYbcaVbebaabatauavbhbibjbkaAblbmbnapaqarasatauavbhbibjbkboblbmbnapaqarasataJaLaMaSaTaUaVaWaXaYaZbabbbcbdbebfbgaXaWbbaTaUaYaMaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNa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eckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index a0111fabfbf..98d4cd9a5fc 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -12,153 +12,144 @@ light_color = LIGHT_COLOR_CYAN - - attack_ai(var/mob/user as mob) - return src.attack_hand(user) +/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob) + return attack_hand(user) - attack_hand(var/mob/user as mob) +/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) + if(..()) + return 1 + + user.set_machine(src) + var/dat - if(..()) - return - user.set_machine(src) - var/dat + dat += "Holodeck Control System
" + dat += "
Current Loaded Programs:
" - - dat += "Holodeck Control System
" - dat += "
Current Loaded Programs:
" - - dat += "((Empty Court))
" - dat += "((Boxing Court))
" - dat += "((Basketball Court))
" - dat += "((Thunderdome Court))
" - dat += "((Beach))
" - dat += "((Desert))
" - dat += "((Space))
" - dat += "((Picnic Area))
" - dat += "((Snow Field))
" - dat += "((Theatre))
" - dat += "((Meeting Hall))
" + dat += "((Empty Court))
" + dat += "((Boxing Court))
" + dat += "((Basketball Court))
" + dat += "((Thunderdome Court))
" + dat += "((Beach))
" + dat += "((Desert))
" + dat += "((Space))
" + dat += "((Picnic Area))
" + dat += "((Snow Field))
" + dat += "((Theatre))
" + dat += "((Meeting Hall))
" // dat += "((Shutdown System))
" - dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
" + dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
" - if(emagged) + if(emagged) /* dat += "(Begin Atmospheric Burn Simulation)
" - dat += "Ensure the holodeck is empty before testing.
" - dat += "
"*/ - dat += "(Begin Wildlife Simulation)
" - dat += "Ensure the holodeck is empty before testing.
" - dat += "
" - if(issilicon(user)) - dat += "(Re-Enable Safety Protocols?)
" - dat += "Safety Protocols are DISABLED
" - else - if(issilicon(user)) - dat += "(Override Safety Protocols?)
" - dat += "
" - dat += "Safety Protocols are ENABLED
" + dat += "Ensure the holodeck is empty before testing.
" + dat += "
"*/ + dat += "(Begin Wildlife Simulation)
" + dat += "Ensure the holodeck is empty before testing.
" + dat += "
" + if(issilicon(user)) + dat += "(Re-Enable Safety Protocols?)
" + dat += "Safety Protocols are DISABLED
" + else + if(issilicon(user)) + dat += "(Override Safety Protocols?)
" + dat += "
" + dat += "Safety Protocols are ENABLED
" - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return +/obj/machinery/computer/HolodeckControl/Topic(href, href_list) + if(..()) + return 1 - return + if(href_list["emptycourt"]) + target = locate(/area/holodeck/source_emptycourt) + if(target) + loadProgram(target) + else if(href_list["boxingcourt"]) + target = locate(/area/holodeck/source_boxingcourt) + if(target) + loadProgram(target) - 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) + else if(href_list["basketball"]) + target = locate(/area/holodeck/source_basketball) + if(target) + loadProgram(target) - if(href_list["emptycourt"]) - target = locate(/area/holodeck/source_emptycourt) - if(target) - loadProgram(target) + else if(href_list["thunderdomecourt"]) + target = locate(/area/holodeck/source_thunderdomecourt) + if(target) + loadProgram(target) - else if(href_list["boxingcourt"]) - target = locate(/area/holodeck/source_boxingcourt) - if(target) - loadProgram(target) + else if(href_list["beach"]) + target = locate(/area/holodeck/source_beach) + if(target) + loadProgram(target) - else if(href_list["basketball"]) - target = locate(/area/holodeck/source_basketball) - if(target) - loadProgram(target) + else if(href_list["desert"]) + target = locate(/area/holodeck/source_desert) + if(target) + loadProgram(target) - else if(href_list["thunderdomecourt"]) - target = locate(/area/holodeck/source_thunderdomecourt) - if(target) - loadProgram(target) + else if(href_list["space"]) + target = locate(/area/holodeck/source_space) + if(target) + loadProgram(target) - else if(href_list["beach"]) - target = locate(/area/holodeck/source_beach) - if(target) - loadProgram(target) + else if(href_list["picnicarea"]) + target = locate(/area/holodeck/source_picnicarea) + if(target) + loadProgram(target) - else if(href_list["desert"]) - target = locate(/area/holodeck/source_desert) - if(target) - loadProgram(target) + else if(href_list["snowfield"]) + target = locate(/area/holodeck/source_snowfield) + if(target) + loadProgram(target) - else if(href_list["space"]) - target = locate(/area/holodeck/source_space) - if(target) - loadProgram(target) + else if(href_list["theatre"]) + target = locate(/area/holodeck/source_theatre) + if(target) + loadProgram(target) - else if(href_list["picnicarea"]) - target = locate(/area/holodeck/source_picnicarea) - if(target) - loadProgram(target) + else if(href_list["meetinghall"]) + target = locate(/area/holodeck/source_meetinghall) + if(target) + loadProgram(target) - else if(href_list["snowfield"]) - target = locate(/area/holodeck/source_snowfield) - if(target) - loadProgram(target) - - else if(href_list["theatre"]) - target = locate(/area/holodeck/source_theatre) - if(target) - loadProgram(target) - - else if(href_list["meetinghall"]) - target = locate(/area/holodeck/source_meetinghall) - if(target) - loadProgram(target) - - else if(href_list["turnoff"]) - target = locate(/area/holodeck/source_plating) - if(target) - loadProgram(target) + else if(href_list["turnoff"]) + target = locate(/area/holodeck/source_plating) + if(target) + loadProgram(target) /* - else if(href_list["burntest"]) - if(!emagged) return - target = locate(/area/holodeck/source_burntest) - if(target) - loadProgram(target) + else if(href_list["burntest"]) + if(!emagged) return + target = locate(/area/holodeck/source_burntest) + if(target) + loadProgram(target) */ - else if(href_list["wildlifecarp"]) - if(!emagged) return - target = locate(/area/holodeck/source_wildlife) - if(target) - loadProgram(target) - - else if(href_list["AIoverride"]) - if(!issilicon(usr)) return - emagged = !emagged - if(emagged) - message_admins("[key_name_admin(usr)] overrode the holodeck's safeties") - log_game("[key_name(usr)] overrided the holodeck's safeties") - else - message_admins("[key_name_admin(usr)] restored the holodeck's safeties") - log_game("[key_name(usr)] restored the holodeck's safeties") - - src.add_fingerprint(usr) - src.updateUsrDialog() - return + else if(href_list["wildlifecarp"]) + if(!emagged) return + target = locate(/area/holodeck/source_wildlife) + if(target) + loadProgram(target) + else if(href_list["AIoverride"]) + if(!issilicon(usr)) return + emagged = !emagged + if(emagged) + message_admins("[key_name_admin(usr)] overrode the holodeck's safeties") + log_game("[key_name(usr)] overrided the holodeck's safeties") + else + message_admins("[key_name_admin(usr)] restored the holodeck's safeties") + log_game("[key_name(usr)] restored the holodeck's safeties") + add_fingerprint(usr) + updateUsrDialog() + return /obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params) return @@ -189,12 +180,10 @@ emergencyShutdown() ..() - /obj/machinery/computer/HolodeckControl/ex_act(severity) emergencyShutdown() ..() - /obj/machinery/computer/HolodeckControl/blob_act() emergencyShutdown() ..() @@ -206,8 +195,8 @@ if(!..()) return + if(active) - if(!checkInteg(linkedholodeck)) damaged = 1 target = locate(/area/holodeck/source_plating) @@ -332,14 +321,7 @@ targetsource.copy_contents_to(linkedholodeck , 1) active = 0 - - - - - - // Holographic Items! - /turf/simulated/floor/holofloor/ thermal_conductivity = 0 @@ -363,53 +345,24 @@ return // HOLOFLOOR DOES NOT GIVE A FUCK - - - - - - - - - /obj/structure/table/holotable name = "table" - desc = "A square piece of metal standing on four metal legs. It can not move." - icon = 'icons/obj/structures.dmi' - icon_state = "table" - density = 1 - anchored = 1.0 - layer = 2.8 - throwpass = 1 //You can throw objects over this, despite it's density. - -/obj/structure/table/holotable/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N +/obj/structure/table/holotable/attack_alien(mob/user as mob) return attack_hand(user) -/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N +/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) return attack_hand(user) /obj/structure/table/holotable/attack_hand(mob/user as mob) return // HOLOTABLE DOES NOT GIVE A FUCK - /obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) - var/obj/item/weapon/grab/G = W - if(G.state<2) - user << "\red You need a better grip to do that!" - return - G.affecting.loc = src.loc - G.affecting.Weaken(5) - visible_message("\red [G.assailant] puts [G.affecting] on the table.") - qdel(W) - return + if (istype(W, /obj/item/weapon/grab)) + return ..() if (istype(W, /obj/item/weapon/wrench)) - user << "It's a holotable! There are no bolts!" - return - - if(isrobot(user)) + user << "It's a holotable! There are no bolts!" return /obj/structure/table/holotable/wood @@ -418,7 +371,6 @@ icon = 'icons/obj/structures.dmi' icon_state = "wood_table" - /obj/item/clothing/gloves/boxing/hologlove name = "boxing gloves" desc = "Because you really needed another excuse to punch your crewmates." @@ -435,10 +387,23 @@ pressure_resistance = 4*ONE_ATMOSPHERE anchored = 1.0 flags = ON_BORDER + +/obj/structure/rack/holorack + name = "rack" +/obj/structure/rack/holorack/attack_alien(mob/user as mob) + return attack_hand(user) -/obj/structure/holowindow/Destroy() - return ..() +/obj/structure/rack/holorack/attack_animal(mob/living/simple_animal/user as mob) + return attack_hand(user) + +/obj/structure/rack/holorack/attack_hand(mob/user as mob) + return // HOLORACK DOES NOT GIVE A FUCK + +/obj/structure/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if (istype(W, /obj/item/weapon/wrench)) + user << "It's a holorack! There are no bolts!" + return /obj/item/weapon/holo damtype = STAMINA @@ -454,22 +419,17 @@ flags = NOSHIELD var/active = 0 -/obj/item/weapon/holo/esword/green - New() - _color = "green" +/obj/item/weapon/holo/esword/green/New() + _color = "green" -/obj/item/weapon/holo/esword/red - New() - _color = "red" +/obj/item/weapon/holo/esword/red/New() + _color = "red" /obj/item/weapon/holo/esword/IsShield() if(active) return 1 return 0 -/obj/item/weapon/holo/esword/attack(target as mob, mob/user as mob) - ..() - /obj/item/weapon/holo/esword/New() _color = pick("red","blue","green","purple") @@ -480,13 +440,13 @@ icon_state = "sword[_color]" w_class = 4 playsound(user, 'sound/weapons/saberon.ogg', 50, 1) - user << "\blue [src] is now active." + user << "[src] is now active." else force = 3 icon_state = "sword0" w_class = 2 playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) - user << "\blue [src] can now be concealed." + user << "[src] can now be concealed." if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() @@ -495,7 +455,6 @@ return //BASKETBALL OBJECTS - /obj/item/weapon/beach_ball/holoball icon = 'icons/obj/basketball.dmi' icon_state = "basketball" @@ -506,7 +465,7 @@ /obj/structure/holohoop name = "basketball hoop" - desc = "Boom, Shakalaka!." + desc = "Boom, Shakalaka!" icon = 'icons/obj/basketball.dmi' icon_state = "hoop" anchored = 1 @@ -517,16 +476,16 @@ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W if(G.state<2) - user << "\red You need a better grip to do that!" + user << "You need a better grip to do that!" return G.affecting.loc = src.loc G.affecting.Weaken(5) - visible_message("\red [G.assailant] dunks [G.affecting] into the [src]!", 3) + visible_message("[G.assailant] dunks [G.affecting] into the [src]!", 3) qdel(W) return else if (istype(W, /obj/item) && get_dist(src,user)<2) user.drop_item(src) - visible_message("\blue [user] dunks [W] into the [src]!", 3) + visible_message("[user] dunks [W] into the [src]!", 3) return /obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) @@ -536,14 +495,13 @@ return if(prob(50)) I.loc = src.loc - visible_message("\blue Swish! \the [I] lands in \the [src].", 3) + visible_message("Swish! \the [I] lands in \the [src].", 3) else - visible_message("\red \the [I] bounces off of \the [src]'s rim!", 3) + visible_message("\The [I] bounces off of \the [src]'s rim!", 3) return 0 else return ..(mover, target, height, air_group) - /obj/machinery/readybutton name = "Ready Declaration Device" desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!" @@ -563,10 +521,6 @@ user << "The station AI is not to interact with these devices" return -/obj/machinery/readybutton/New() - ..() - - /obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob, params) user << "The device is a solid button, there's nothing you can do with it!" @@ -604,7 +558,6 @@ icon_state = "auth_off" /obj/machinery/readybutton/proc/begin_event() - eventstarted = 1 for(var/obj/structure/holowindow/W in currentarea) From b770e8f2a0db3f4e268798c5965e71cff2c4e210 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:51:33 +0200 Subject: [PATCH 2/7] Implant fixes/updates --- code/_globalvars/lists/objects.dm | 5 +- code/game/machinery/Beacon.dm | 77 +- code/game/machinery/computer/prisoner.dm | 216 +++--- code/game/machinery/teleporter.dm | 4 +- code/game/mecha/mech_bay.dm | 2 +- .../objects/items/devices/radio/beacon.dm | 28 +- .../objects/items/weapons/implants/implant.dm | 730 +++++++++--------- .../items/weapons/implants/implantpad.dm | 161 ++-- .../objects/items/weapons/teleportation.dm | 105 +-- 9 files changed, 657 insertions(+), 671 deletions(-) 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 From 0f1db314c57bfe4d131d45773b010259cd244a06 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:51:43 +0200 Subject: [PATCH 3/7] Fix fingerless gloves --- icons/mob/hands.dmi | Bin 9487 -> 9357 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/mob/hands.dmi b/icons/mob/hands.dmi index 5ba7e9decdfc22aa81b11a724f8b3c98c7dddb80..b11cdc50f300441c1fff135a2461f945123257be 100644 GIT binary patch literal 9357 zcmd6NcUV)|);G$CS1gR8Vgp7I7+?fxA~j0yy(ka@(gc*yLMJ#Xdg)3;2q37GK!8N) zJt89r0-=RSAVhjkq=b@?;%Sb8^n!Yyb9Izx7)?-qPIQ zDE~Qr9v+^fMuxi9JUsgz0DrE3;saVL9$_?r3(-j1TOqoh!R|pm0UIN7waG1AXfeM|#Y&v6|2YwM!bm<+Mr6Qr(URt4 z>rGZ%bT!YHbzMGkOtr?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--- code/game/mecha/working/ripley.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 576442ac902..3eba9cc2132 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -73,6 +73,7 @@ desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE" name = "DEATH-RIPLEY" icon_state = "deathripley" + initial_icon = "deathripley" step_in = 2 opacity=0 max_temperature = 65000 From 551d4e898805f3f50043c6292a01661f692b6f59 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:51:59 +0200 Subject: [PATCH 5/7] Admin jump window fix --- code/modules/admin/verbs/adminjump.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index a9a07026a5d..14613d4567f 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -13,6 +13,8 @@ for(var/turf/T in A) if(T.density) continue + if(locate(/obj/structure/grille, T)) // Quick check to not spawn in windows + continue turfs.Add(T) var/turf/T = pick_n_take(turfs) From 039a79ff26acfcba72122a3d5c6b12c783b0e1d9 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:52:07 +0200 Subject: [PATCH 6/7] Research consoles auto sync fix --- code/modules/research/rdconsole.dm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 671fc9a369b..577397b70fc 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -102,8 +102,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, return return_name /obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any). - for(var/obj/machinery/r_n_d/D in oview(3,src)) - if(D.linked_console != null || D.disabled || D.panel_open) + for(var/obj/machinery/r_n_d/D in range(3,src)) + if(!isnull(D.linked_console) || D.disabled || D.panel_open) continue if(istype(D, /obj/machinery/r_n_d/destructive_analyzer)) if(linked_destroy == null) @@ -144,6 +144,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, break /obj/machinery/computer/rdconsole/initialize() + ..() SyncRDevices() /* Instead of calling this every tick, it is only being called when needed @@ -181,7 +182,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/Topic(href, href_list) if(..()) - return + return 1 + + if(!allowed(usr)) + return 1 add_fingerprint(usr) @@ -601,7 +605,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/attack_hand(mob/user as mob) if(..()) - return + return 1 + if(!allowed(user)) + user << "Access denied." + return 1 interact(user) /obj/machinery/computer/rdconsole/interact(mob/user) @@ -1113,15 +1120,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, name = "Robotics R&D Console" desc = "A console used to interface with R&D tools." id = 2 - req_access = null - req_access_txt = "29" + req_access = list(access_robotics) /obj/machinery/computer/rdconsole/mechanics name = "Mechanics R&D Console" desc = "A console used to interface with R&D tools." id = 4 - req_access = null - req_access_txt = "70" + req_access = list(access_mechanic) /obj/machinery/computer/rdconsole/core name = "Core R&D Console" @@ -1131,4 +1136,5 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/experiment name = "E.X.P.E.R.I-MENTOR R&D Console" desc = "A console used to interface with R&D tools." - id = 3 \ No newline at end of file + id = 3 + \ No newline at end of file From bf2cabeca31f966018874dea82926c244b9c3094 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 03:08:38 +0200 Subject: [PATCH 7/7] Tab --- code/game/objects/items/devices/radio/beacon.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index 6a3a270b000..6fd44abe517 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -93,4 +93,3 @@ playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) qdel(src) return - \ No newline at end of file