From 2bc92e68eb20102493b420cfc3c3078f0072bbda Mon Sep 17 00:00:00 2001 From: CaelAislinn Date: Mon, 2 Jan 2012 22:42:04 +1000 Subject: [PATCH] Fixed so autolathe quantity can't be set to negative, ported over emergency walllockers from old bs12 Signed-off-by: CaelAislinn --- code/game/machinery/autolathe.dm | 2 ++ code/game/machinery/walllockers.dm | 37 +++++++++++++++++++++++++++++ icons/obj/lockwall.dmi | Bin 0 -> 1092 bytes 3 files changed, 39 insertions(+) create mode 100644 code/game/machinery/walllockers.dm create mode 100644 icons/obj/lockwall.dmi diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e090455a96..8e9066b5a1 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -178,6 +178,8 @@ container.layer = initial(container.layer) if(href_list["modifyOutputAmount"]) outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create","")) + if(outputAmount < 1) + outputAmount = 1 if (!busy) if(href_list["make"]) makeDir = get_dir(src,usr) diff --git a/code/game/machinery/walllockers.dm b/code/game/machinery/walllockers.dm new file mode 100644 index 0000000000..e3373f7b21 --- /dev/null +++ b/code/game/machinery/walllockers.dm @@ -0,0 +1,37 @@ +/obj/walllocker + name = "Wall Locker" + icon = 'lockwall.dmi' + icon_state = "emerg" + var/list/spawnitems = list() + anchored = 1 + var/amount = 3 // spawns each items X times. +/obj/walllocker/attack_hand(mob/user as mob) + if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to + return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) + if(!amount) + usr << "It's empty.." + return + if(amount) + for(var/path in spawnitems) + new path(src.loc) + amount-- + return +/obj/walllocker/emerglocker + name = "Emergency Locker" + spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar) +/obj/walllocker/emerglocker/north + pixel_y = 32 + dir = SOUTH +/obj/walllocker/emerglocker/south + pixel_y = -32 + dir = NORTH +/obj/walllocker/emerglocker/west + pixel_x = -32 + dir = WEST +/obj/walllocker/emerglocker/east + pixel_x = 32 + dir = EAST + + + + diff --git a/icons/obj/lockwall.dmi b/icons/obj/lockwall.dmi new file mode 100644 index 0000000000000000000000000000000000000000..25d96436d191173670816656fc2d7c529d49a584 GIT binary patch literal 1092 zcmV-K1iSl*P)cn->FexsdV!mzuHxn9F)}g{6dAhZ{SXrv%Y+qo00001bW%=J06^y0W&i*Hb$V1- zbVOxyV{&P5bZKvH004NLQ&wt^s~`-9iy~vSwMwU_nfHIs4Fr)x z0GEf0*~{P6PTR<5h#|o_oemvZBLXUxnKLRuG%|dixr)IHP>B!EnF&)WzhZQ4kI~cS z9K8mW=SAkd=?!B|6Q#HM>XG3YGijJSV)Vnz}*S4-j?{(>-;ny|mR8BOqbNlonnKPvtCkJ+tQ2$zGV z{|e#s)3^$6omiAIfT#HyJl})3uM^O9+>xAFNhfT|nayjw(>=DPd!29V?zd~#K6L2N z|0%z44Em*iHeY8dEOPc}s|day*a-o{v$*w{5Z5jWxavHFT%P(vSY&BeRDIu9MNr?V z+2}xjaR(2SjOObL+7F?j?}GmMd@wp}bWCq-J>Si&I<6iwIMRM3T?(PAUrk>ZbjLNS zrv-E-_v#a1j5Y7ZlLC7GQFOg034Jg0tT4Ks7Vlzxb)-+e2lSucAE1AGk+JF8`3Qa7 z3#RD4dsIDha7iC$h{k=|$NCv*()!BcQ(?4N&poqq?;1=x{is5lsH9C`L3!f=DRM>&x@(k zG2id-pB8^LB{t8dwLIQL7OY&2(({ch*0gm_W*2wmk#@0000< KMNUMnLSTaVmKI|G literal 0 HcmV?d00001