Improves cardboard box consistency. (#53525)

* Improves cardboard box consistency

* Also gives them cardboard datum mats.
This commit is contained in:
ArcaneMusic
2020-09-08 23:09:01 -04:00
committed by GitHub
parent 128230f557
commit c6ed8a7fad
3 changed files with 32 additions and 2 deletions
+13 -2
View File
@@ -17,9 +17,11 @@
/obj/item/storage/fancy
icon = 'icons/obj/food/containers.dmi'
resistance_flags = FLAMMABLE
custom_materials = list(/datum/material/cardboard = 2000)
var/icon_type = "donut"
var/spawn_type = null
var/fancy_open = FALSE
var/obj/fold_result = /obj/item/stack/sheet/cardboard
/obj/item/storage/fancy/PopulateContents()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
@@ -44,6 +46,11 @@
fancy_open = !fancy_open
update_icon()
. = ..()
if(!contents.len)
new fold_result(user.drop_location())
to_chat(user, "<span class='notice'>You fold the [src] into [initial(fold_result.name)].</span>")
user.put_in_active_hand(fold_result)
qdel(src)
/obj/item/storage/fancy/Exited()
. = ..()
@@ -149,8 +156,12 @@
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 5
/obj/item/storage/fancy/candle_box/attack_self(mob_user)
return
/obj/item/storage/fancy/candle_box/attack_self(mob/user)
if(!contents.len)
new fold_result(user.drop_location())
to_chat(user, "<span class='notice'>You fold the [src] into [initial(fold_result.name)].</span>")
user.put_in_active_hand(fold_result)
qdel(src)
////////////
//CIG PACK//