Fixed sometimes using items on full storage items (#36711)

* Fixed sometimes using items on full storage items

* Removed redundant code and fixed spray being used on container
This commit is contained in:
John Ginnane
2018-04-04 00:02:44 +01:00
committed by CitadelStationBot
parent 5dddb2db45
commit 80fee95dab
2 changed files with 4 additions and 4 deletions
+1 -3
View File
@@ -423,9 +423,7 @@
return //Robots can't interact with storage items.
if(!can_be_inserted(W, 0 , user))
if(contents.len >= storage_slots) //don't use items on the backpack if they don't fit
return 1
return 0
return 1
handle_item_insertion(W, 0 , user)
@@ -207,7 +207,9 @@
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
if(user in src)
return
if(!src.tool_interact(W,user))
if(src.tool_interact(W,user))
return 1 // No afterattack
else
return ..()
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldnt be continued (because tool was used/closet was of wrong type), FALSE if otherwise