From 1ea153f5042973fbb16748ded98a28f3eb43284a Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Mon, 26 Mar 2012 22:39:05 +0100 Subject: [PATCH] TG: Emitters can be emag'd. You need to swipe and ID to lock an emitter, PDAs will no longer have a popup when you attempt to put an ID into them. PDAs have an Update Info button just below the ID slot when an ID is in it. r2867 --- baystation12.dme | 1 + code/modules/power/singularity/emitter.dm | 69 +++++++++++++++-------- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 9135cfd9877..86c8206ee1c 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -194,6 +194,7 @@ #define FILE_DIR "icons/vending_icons" #define FILE_DIR "interface" #define FILE_DIR "maps" +#define FILE_DIR "maps/backup" #define FILE_DIR "sound" #define FILE_DIR "sound/ambience" #define FILE_DIR "sound/announcer" diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 30a450db302..3de1d4897e3 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -6,16 +6,20 @@ anchored = 0 density = 1 req_access = list(access_engine) - var/active = 0 - var/fire_delay = 100 - var/last_shot = 0 - var/shot_number = 0 - var/state = 0 - var/locked = 0 + use_power = 1 idle_power_usage = 10 active_power_usage = 300 + var + active = 0 + fire_delay = 100 + last_shot = 0 + shot_number = 0 + state = 0 + locked = 0 + + verb/rotate() set name = "Rotate" set category = "Object" @@ -56,9 +60,9 @@ src.use_power = 2 update_icon() else - user << "The controls are locked!" + user << "\red The controls are locked!" else - user << "The [src] needs to be firmly secured to the floor first." + user << "\red The [src] needs to be firmly secured to the floor first." return 1 @@ -113,6 +117,7 @@ attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/weapon/wrench)) if(active) user << "Turn off the [src] first." @@ -123,27 +128,26 @@ playsound(src.loc, 'Ratchet.ogg', 75, 1) user.visible_message("[user.name] secures [src.name] to the floor.", \ "You secure the external reinforcing bolts to the floor.", \ - "You hear ratchet") + "You hear a ratchet") src.anchored = 1 if(1) state = 0 playsound(src.loc, 'Ratchet.ogg', 75, 1) user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \ "You undo the external reinforcing bolts.", \ - "You hear ratchet") + "You hear a ratchet") src.anchored = 0 if(2) user << "\red The [src.name] needs to be unwelded from the floor." - return + return - else if(istype(W, /obj/item/weapon/weldingtool) && W:welding) + if(istype(W, /obj/item/weapon/weldingtool) && W:welding) if(active) user << "Turn off the [src] first." return switch(state) if(0) user << "\red The [src.name] needs to be wrenched to the floor." - return if(1) if (W:remove_fuel(0,user)) W:welding = 2 @@ -156,8 +160,7 @@ user << "You weld the [src] to the floor." W:welding = 1 else - user << "\blue You need more welding fuel to complete this task." - return + user << "\red You need more welding fuel to complete this task." if(2) if (W:remove_fuel(0,user)) W:welding = 2 @@ -170,20 +173,36 @@ user << "You cut the [src] free from the floor." W:welding = 1 else - user << "\blue You need more welding fuel to complete this task." - return - else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) - if (src.allowed(user)) - src.locked = !src.locked - user << "Controls are now [src.locked ? "locked." : "unlocked."]" + user << "\red You need more welding fuel to complete this task." + return + + if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) + if(emagged) + user << "\red The lock seems to be broken" + return + if(src.allowed(user)) + if(active) + src.locked = !src.locked + user << "The controls are now [src.locked ? "locked." : "unlocked."]" + else + src.locked = 0 //just in case it somehow gets locked + user << "\red The controls can only be locked when the [src] is online" else user << "\red Access denied." - return - else - ..() return + if(istype(W, /obj/item/weapon/card/emag) && !emagged) + locked = 0 + emagged = 1 + user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.") + return + + ..() + return + + power_change() ..() - update_icon() \ No newline at end of file + update_icon() + return \ No newline at end of file