From 276b83589e40ed66f5ea9d6a90f9ee843fa0b70b Mon Sep 17 00:00:00 2001 From: Erthilo Date: Fri, 25 May 2012 22:32:26 +0100 Subject: [PATCH] TG: Added an emergency shutdown proc to the holodeck control computer. - Destroying, damaging or emping the computer will now cause the holodeck to revert to its original state. Meaning this should help stop people taking eswords out of the holodeck. The detective's gun renaming verb moved from the BYOND default 'you did not set a category' tab into the 'objects' tab Mob.dm's stripping proc was a single very looooooooooooong line of code. It is now multiple lines of code. Revision: r3649 Author: johnsonmt88 --- .../machinery/computer/HolodeckControl.dm | 38 +++++++++++++++++++ code/modules/mob/mob.dm | 14 ++++++- .../projectiles/guns/projectile/revolver.dm | 7 ++-- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index ff74b59b712..fae6eb72e4e 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -52,6 +52,7 @@ dat += "(Disable Safety Protocols?)
" dat += "
" dat += "Safety Protocols are ENABLED
" + user << browse(dat, "window=computer;size=400x500") onclose(user, "computer") @@ -119,6 +120,8 @@ /obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) +//Warning, uncommenting this can have concequences. For example, deconstructing the computer may cause holographic eswords to never derez + /* if(istype(D, /obj/item/weapon/screwdriver)) playsound(src.loc, 'Screwdriver.ogg', 50, 1) if(do_after(user, 20)) @@ -166,6 +169,30 @@ // if(target) // loadProgram(target) +//This could all be done better, but it works for now. +/obj/machinery/computer/HolodeckControl/Del() + emergencyShutdown() + ..() + +/obj/machinery/computer/HolodeckControl/meteorhit(var/obj/O as obj) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/emp_act(severity) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/ex_act(severity) + emergencyShutdown() + ..() + + +/obj/machinery/computer/HolodeckControl/blob_act() + emergencyShutdown() + ..() + /obj/machinery/computer/HolodeckControl/process() @@ -282,7 +309,18 @@ T.hotspot_expose(50000,50000,1) +/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown() + //Get rid of any items + for(var/item in holographic_items) + derez(item) + //Turn it back to the regular non-holographic room + target = locate(/area/holodeck/source_plating) + if(target) + loadProgram(target) + var/area/targetsource = locate(/area/holodeck/source_plating) + targetsource.copy_contents_to(linkedholodeck , 1) + active = 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 114c569fdca..06ccb4af05f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -243,7 +243,19 @@ /mob/proc/show_inv(mob/user as mob) user.machine = src - var/dat = text("\n[]
\n\tHead(Mask): []
\n\tLeft Hand: []
\n\tRight Hand: []
\n\tBack: []
\n\t[]
\n\t[]
\n\t[]
\n\tEmpty Pockets
\nClose
\n
", name, src, (wear_mask ? text("[]", wear_mask) : "Nothing"), src, (l_hand ? text("[]", l_hand) : "Nothing"), src, (r_hand ? text("[]", r_hand) : "Nothing"), src, (back ? text("[]", back) : "Nothing"), ((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : ""), (internal ? text("Remove Internal", src) : ""), (handcuffed ? text("Handcuffed", src) : text("Not Handcuffed", src)), src, user, name) + var/dat = {" +
[name]
+

+
Head(Mask): [(wear_mask ? wear_mask : "Nothing")] +
Left Hand: [(l_hand ? l_hand : "Nothing")] +
Right Hand: [(r_hand ? r_hand : "Nothing")] +
Back: [(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))] +
[(internal ? text("Remove Internal") : "")] +
Empty Pockets +
Refresh +
Close +
"} user << browse(dat, text("window=mob[];size=325x500", name)) onclose(user, "mob[name]") return diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 32614de3a1d..fada38243e0 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -1,6 +1,6 @@ /obj/item/weapon/gun/projectile/detective desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds." - name = "\improper Revolver" + name = "revolver" icon_state = "detective" caliber = "357" origin_tech = "combat=2;materials=2" @@ -18,7 +18,8 @@ verb/rename_gun() set name = "Name Gun" - set desc = "Click to rename your gun." + set category = "Object" + set desc = "Click to rename your gun. If you're the detective." var/mob/M = usr if(!M.mind) return 0 @@ -38,7 +39,7 @@ /obj/item/weapon/gun/projectile/mateba - name = "\improper Mateba" + name = "mateba" desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo." icon_state = "mateba" origin_tech = "combat=2;materials=2" \ No newline at end of file