mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
Improves cardboard box consistency. (#53525)
* Improves cardboard box consistency * Also gives them cardboard datum mats.
This commit is contained in:
@@ -585,6 +585,7 @@
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonbox"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
custom_materials = list(/datum/material/cardboard = 2000)
|
||||
|
||||
/obj/item/storage/crayons/Initialize()
|
||||
. = ..()
|
||||
@@ -622,6 +623,17 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/crayons/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(contents.len > 0)
|
||||
to_chat(user, "<span class='warning'>You can't fold down [src] with crayons inside!</span>")
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/cardboard/cardboard = new /obj/item/stack/sheet/cardboard(user.drop_location())
|
||||
to_chat(user, "<span class='notice'>You fold the [src] into cardboard.</span>")
|
||||
user.put_in_active_hand(cardboard)
|
||||
qdel(src)
|
||||
|
||||
//Spraycan stuff
|
||||
|
||||
/obj/item/toy/crayon/spraycan
|
||||
|
||||
@@ -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//
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
inhand_icon_state = "pizzabox"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
custom_materials = list(/datum/material/cardboard = 2000)
|
||||
|
||||
var/open = FALSE
|
||||
var/can_open_on_fall = TRUE //if FALSE, this pizza box will never open if it falls from a stack
|
||||
@@ -106,6 +107,12 @@
|
||||
audible_message("<span class='warning'>[icon2html(src, hearers(src))] *beep*</span>")
|
||||
bomb_active = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(!open && !pizza && !bomb)
|
||||
var/obj/item/stack/sheet/cardboard/cardboard = new /obj/item/stack/sheet/cardboard(user.drop_location())
|
||||
to_chat(user, "<span class='notice'>You fold [src] into [cardboard].</span>")
|
||||
user.put_in_active_hand(cardboard)
|
||||
qdel(src)
|
||||
return
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
|
||||
Reference in New Issue
Block a user