mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-21 15:42:53 +00:00
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:
@@ -178,6 +178,8 @@
|
|||||||
container.layer = initial(container.layer)
|
container.layer = initial(container.layer)
|
||||||
if(href_list["modifyOutputAmount"])
|
if(href_list["modifyOutputAmount"])
|
||||||
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
|
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
|
||||||
|
if(outputAmount < 1)
|
||||||
|
outputAmount = 1
|
||||||
if (!busy)
|
if (!busy)
|
||||||
if(href_list["make"])
|
if(href_list["make"])
|
||||||
makeDir = get_dir(src,usr)
|
makeDir = get_dir(src,usr)
|
||||||
|
|||||||
37
code/game/machinery/walllockers.dm
Normal file
37
code/game/machinery/walllockers.dm
Normal 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
BIN
icons/obj/lockwall.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user