From 6d979ae17bf24dc0b709048403188909e04500bf Mon Sep 17 00:00:00 2001 From: cib Date: Tue, 20 Mar 2012 03:53:12 -0800 Subject: [PATCH 1/3] Toolboxes have a chance to swing open. --- code/defines/obj/storage.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm index d58a0bce4e4..55a0e9e500c 100644 --- a/code/defines/obj/storage.dm +++ b/code/defines/obj/storage.dm @@ -322,6 +322,17 @@ w_class = 4.0 origin_tech = "combat=1" + var/selfdamage = 0 + + afterattack(atom/target as mob|obj|turf|area, mob/user as mob) + if(contents.len) + // have a chance to swing open + user.visible_message("\red \The [src] swings wide open and its contents are scattered on the floor!") + for(var/obj/O in contents) + O.loc = user.loc + if(prob(50)) step_rand(O) + ..() + /obj/item/weapon/storage/toolbox/emergency name = "emergency toolbox" desc = "A toolbox for emergencies" From c2bea1f31534e162c2e306f0b38638ac9c7975dc Mon Sep 17 00:00:00 2001 From: cib Date: Tue, 20 Mar 2012 03:53:32 -0800 Subject: [PATCH 2/3] Broken APC covers can be removed with a screwdriver. --- code/modules/power/apc.dm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a4b566dc44e..3e45201d16a 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -275,6 +275,15 @@ user << "\red There is nothing to secure." return updateicon() + else if((stat & BROKEN) || malfhack) + opened = 2 + + user.visible_message("\red [user] starts removing the broken APC cover with \the [W]!", \ + "\red You start removing the broken APC cover!") + if(do_after(user, 50)) + user.visible_message("\red The broken APC cover was removed with \the [W] by [user.name]!", \ + "\red You remove the broken APC cover with your [W.name]!") + updateicon() else if(emagged) user << "The interface is broken." else @@ -423,6 +432,7 @@ opened = 1 updateicon() else + if ( ((stat & BROKEN) || malfhack) \ && !opened \ && W.force >= 5 \ @@ -431,7 +441,7 @@ opened = 2 user.visible_message("\red The APC cover was knocked down with the [W.name] by [user.name]!", \ "\red You knock down the APC cover with your [W.name]!", \ - "You hear bang") + "You hear a loud bang!") updateicon() else if (istype(user, /mob/living/silicon)) From 1c5d305bc68454159e74ec0b306b2e4d7f36c7f8 Mon Sep 17 00:00:00 2001 From: cib Date: Tue, 20 Mar 2012 04:40:54 -0800 Subject: [PATCH 3/3] Fixes to the toolbox and APC commits. --- code/defines/obj/storage.dm | 2 +- code/modules/power/apc.dm | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm index 6ad39c4b95a..bf2aafec82d 100644 --- a/code/defines/obj/storage.dm +++ b/code/defines/obj/storage.dm @@ -323,7 +323,7 @@ var/selfdamage = 0 afterattack(atom/target as mob|obj|turf|area, mob/user as mob) - if(contents.len) + if(contents.len && prob(10)) // have a chance to swing open user.visible_message("\red \The [src] swings wide open and its contents are scattered on the floor!") for(var/obj/O in contents) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 3e45201d16a..9a6e4cd3a0e 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -48,6 +48,7 @@ var/equip_consumption = 0 //not used var/environ_consumption = 0 //not used var/wiresexposed = 0 + var/cover_unscrewed = 0 // used for dismantling broken APC covers var/apcwires = 15 netnum = -1 // set so that APCs aren't found as powernet nodes var/malfhack = 0 //New var for my changes to AI malf. --NeoFite @@ -215,7 +216,7 @@ user << "\red Disconnect wires first." return playsound(src.loc, 'Crowbar.ogg', 50, 1) - user << "You trying to remove the power control board..." + user << "You try to remove the power control board..." if(do_after(user, 50)) has_electronics = 0 if ((stat & BROKEN) || malfhack) @@ -232,6 +233,18 @@ else if (opened!=2) //cover isn't removed opened = 0 updateicon() + else if (istype(W, /obj/item/weapon/crowbar) && ((stat & BROKEN) || malfhack) ) + if(cover_unscrewed) + user.visible_message("\red [user] starts removing the broken APC cover with \the [W]!", \ + "\red You start removing the broken APC cover!") + if(do_after(user, 50)) + user.visible_message("\red The broken APC cover was removed with \the [W] by [user.name]!", \ + "\red You remove the broken APC cover with your [W.name]!") + opened = 2 + cover_unscrewed = 0 + updateicon() + else + user << "\red You need to unscrew the cover first!" else if (istype(W, /obj/item/weapon/crowbar) && !((stat & BROKEN) || malfhack) ) if(coverlocked && !(stat & MAINT)) user << "\red The cover is locked and cannot be opened." @@ -258,7 +271,7 @@ else if (istype(W, /obj/item/weapon/screwdriver)) // haxing if(opened) if (cell) - user << "\red Close the APC first." //Less hints more mystery! + user << "\red Remove the power cell first." //FUCK YOU, USEFUL MESSAGES ARE GOOD return else if (has_electronics==1 && terminal) @@ -276,13 +289,13 @@ return updateicon() else if((stat & BROKEN) || malfhack) - opened = 2 - user.visible_message("\red [user] starts removing the broken APC cover with \the [W]!", \ - "\red You start removing the broken APC cover!") + user.visible_message("\red [user] starts unscrewing the broken APC cover with \the [W]!", \ + "\red You start unscrewing the broken APC cover!") if(do_after(user, 50)) - user.visible_message("\red The broken APC cover was removed with \the [W] by [user.name]!", \ - "\red You remove the broken APC cover with your [W.name]!") + user.visible_message("\red The broken APC cover was unscrewed with \the [W] by [user.name]!", \ + "\red You unscrew the broken APC cover with your [W.name]!") + cover_unscrewed = 1 updateicon() else if(emagged) user << "The interface is broken." @@ -332,7 +345,7 @@ user << "You fail to [ locked ? "unlock" : "lock"] the APC interface." else if (istype(W, /obj/item/weapon/cable_coil) && !terminal && opened && has_electronics!=2) if (src.loc:intact) - user << "\red You must remove the floor plating in front of the APC first." + user << "\red There is no floor with the plating revealed in front of the APC." return var/obj/item/weapon/cable_coil/C = W if(C.amount < 10) @@ -372,7 +385,7 @@ "You cut cables and dismantle the power terminal.") del(terminal) else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) - user << "You trying to insert the power control board into the frame..." + user << "You try to insert the power control board into the frame..." playsound(src.loc, 'Deconstruct.ogg', 50, 1) if(do_after(user, 10)) has_electronics = 1