mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-16 20:16:09 +00:00
* Preset Boxes File De-concatenation Hey there, We had one file that was like eighteen-hundred (1800) lines full of just... box presets. There was no rhyme or reason to where anything was in the list, it just sorta got to the point where new features were found near the bottom with zero grouping. So, let's de-concatenate this massive file and give it some proper grouping. While I was in the area, I did some file cleanup, using `snake_case` instead of whatever the fuck some vars were, alphabetizing and cleaning up lists to have trailing commas, that sorta stuff. Let me know if I broke something somewhere. * documentations, var improvement * adds some documentation, clears up some variables
58 lines
1.9 KiB
Plaintext
58 lines
1.9 KiB
Plaintext
/// The common cardboard box.
|
|
/obj/item/storage/box
|
|
name = "box"
|
|
desc = "It's just an ordinary box."
|
|
icon_state = "box"
|
|
inhand_icon_state = "syringe_kit"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
resistance_flags = FLAMMABLE
|
|
drop_sound = 'sound/items/handling/cardboardbox_drop.ogg'
|
|
pickup_sound = 'sound/items/handling/cardboardbox_pickup.ogg'
|
|
/// What material do we get when we fold this box?
|
|
var/foldable = /obj/item/stack/sheet/cardboard
|
|
/// What drawing will we get on the face of the box?
|
|
var/illustration = "writing"
|
|
|
|
/obj/item/storage/box/Initialize(mapload)
|
|
. = ..()
|
|
atom_storage.max_specific_storage = WEIGHT_CLASS_SMALL
|
|
update_appearance()
|
|
|
|
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
|
|
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
|
if(myhead)
|
|
user.visible_message(span_suicide("[user] puts [user.p_their()] head into \the [src] and begins closing it! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
myhead.dismember()
|
|
myhead.forceMove(src) //force your enemies to kill themselves with your head collection box!
|
|
playsound(user, "desecration-01.ogg", 50, TRUE, -1)
|
|
return BRUTELOSS
|
|
user.visible_message(span_suicide("[user] is beating [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
return BRUTELOSS
|
|
|
|
/obj/item/storage/box/update_overlays()
|
|
. = ..()
|
|
if(illustration)
|
|
. += illustration
|
|
|
|
/obj/item/storage/box/attack_self(mob/user)
|
|
..()
|
|
|
|
if(!foldable || (flags_1 & HOLOGRAM_1))
|
|
return
|
|
if(contents.len)
|
|
balloon_alert(user, "items inside!")
|
|
return
|
|
if(!ispath(foldable))
|
|
return
|
|
|
|
balloon_alert(user, "folded")
|
|
var/obj/item/I = new foldable
|
|
qdel(src)
|
|
user.put_in_hands(I)
|
|
|
|
/obj/item/storage/box/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/stack/package_wrap))
|
|
return FALSE
|
|
return ..()
|