mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Merge pull request #25685 from Cyberboss/patch-21
Improves SSU item dispensing
This commit is contained in:
@@ -375,18 +375,13 @@
|
||||
if("dispense")
|
||||
if(!state_open)
|
||||
return
|
||||
switch(params["item"])
|
||||
if("helmet")
|
||||
helmet.loc = loc
|
||||
helmet = null
|
||||
if("suit")
|
||||
suit.loc = loc
|
||||
suit = null
|
||||
if("mask")
|
||||
mask.loc = loc
|
||||
mask = null
|
||||
if("storage")
|
||||
storage.loc = loc
|
||||
storage = null
|
||||
|
||||
var/static/list/valid_items = list("helmet", "suit", "mask", "storage")
|
||||
var/item_name = params["item"]
|
||||
if(item_name in valid_items)
|
||||
var/obj/item/I = vars[item_name]
|
||||
vars[item_name] = null
|
||||
if(I)
|
||||
I.forceMove(loc)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
Reference in New Issue
Block a user