Wrapping Paper Stuff Bugfixes (#14282)

This commit is contained in:
VisVirific
2022-06-11 20:29:22 +02:00
committed by GitHub
parent 9c1dcc2217
commit affc0c913e
3 changed files with 69 additions and 32 deletions
@@ -122,6 +122,20 @@
qdel(src)
user.put_in_hands(trash)
/obj/item/storage/box/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/packageWrap))
var/total_storage_space = W.get_storage_cost()
for(var/obj/item/I in contents)
total_storage_space += I.get_storage_cost()
if(total_storage_space <= max_storage_space)
var/question = alert(user, "Will you want to wrap \the [src] or store the item inside?", "Wrap or Store", "Wrap", "Store")
if(question == "Wrap")
return
else if(question == "Store")
return ..()
else
..()
/obj/item/storage/box/survival
name = "emergency survival box"
desc = "A faithful box that will remain with you, no matter where you go, and probably save you."