Fixed so autolathe quantity can't be set to negative, ported over emergency walllockers from old bs12

Signed-off-by: CaelAislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
CaelAislinn
2012-01-02 22:42:04 +10:00
parent 9fa489a0d1
commit 2bc92e68eb
3 changed files with 39 additions and 0 deletions

View File

@@ -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)

View File

@@ -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

BIN
icons/obj/lockwall.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB