Game folder
This commit is contained in:
@@ -33,14 +33,15 @@
|
||||
var/material_drop_amount = 2
|
||||
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
|
||||
var/anchorable = TRUE
|
||||
var/icon_welded = "welded"
|
||||
|
||||
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
. = ..()
|
||||
update_icon()
|
||||
PopulateContents()
|
||||
if(mapload && !opened)
|
||||
take_contents()
|
||||
|
||||
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
|
||||
/obj/structure/closet/proc/PopulateContents()
|
||||
@@ -59,7 +60,7 @@
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
add_overlay(icon_welded)
|
||||
if(secure && !broken)
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
@@ -73,7 +74,7 @@
|
||||
else
|
||||
add_overlay("[icon_state]_open")
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
/obj/structure/closet/examine(mob/living/user)
|
||||
..()
|
||||
if(welded)
|
||||
to_chat(user, "<span class='notice'>It's welded shut.</span>")
|
||||
@@ -83,6 +84,8 @@
|
||||
to_chat(user, "<span class='notice'>The parts are <b>welded</b> together.</span>")
|
||||
else if(secure && !opened)
|
||||
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
|
||||
if(user.has_trait(TRAIT_SKITTISH))
|
||||
to_chat(user, "<span class='notice'>Ctrl-Shift-click [src] to jump inside.</span>")
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
if(wall_mounted)
|
||||
@@ -167,8 +170,6 @@
|
||||
var/obj/item/I = AM
|
||||
if (I.item_flags & NODROP)
|
||||
return
|
||||
else if(istype(AM, /obj/effect))
|
||||
return
|
||||
else if(!allow_objects && !istype(AM, /obj/effect/dummy/chameleon))
|
||||
return
|
||||
if(!allow_dense && AM.density)
|
||||
@@ -249,6 +250,7 @@
|
||||
if(opened)
|
||||
return
|
||||
welded = !welded
|
||||
after_weld(welded)
|
||||
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unwelded"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -267,6 +269,9 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/structure/closet/proc/after_weld(weld_state)
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
|
||||
if(!istype(O) || O.anchored || istype(O, /obj/screen))
|
||||
return
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
delivery_icon = "deliverybox"
|
||||
anchorable = FALSE
|
||||
var/move_speed_multiplier = 1
|
||||
var/use_mob_movespeed = FALSE
|
||||
var/move_delay = FALSE
|
||||
var/egged = 0
|
||||
|
||||
@@ -23,7 +22,7 @@
|
||||
return
|
||||
move_delay = TRUE
|
||||
if(step(src, direction))
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), (use_mob_movespeed ? user.movement_delay() : CONFIG_GET(number/walk_delay)) * move_speed_multiplier)
|
||||
addtimer(CALLBACK(src, .proc/ResetMoveDelay), CONFIG_GET(number/movedelay/walk_delay) * move_speed_multiplier)
|
||||
else
|
||||
ResetMoveDelay()
|
||||
|
||||
|
||||
@@ -20,3 +20,4 @@
|
||||
new /obj/item/door_remote/quartermaster(src)
|
||||
new /obj/item/circuitboard/machine/techfab/department/cargo(src)
|
||||
new /obj/item/storage/photo_album/QM(src)
|
||||
new /obj/item/circuitboard/machine/ore_silo(src)
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
|
||||
|
||||
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
|
||||
do_sparks(5, TRUE, src)
|
||||
qdel(src)//no need for QDEL_IN if we already have a timer
|
||||
do_sparks(5, TRUE, src)
|
||||
qdel(src)//no need for QDEL_IN if we already have a timer
|
||||
|
||||
/obj/structure/closet/supplypod/Destroy()//make some sparks b4 deletion
|
||||
QDEL_NULL(SupplyOrder)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
material_drop_amount = 5
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
add_overlay("securecrateg")
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof))
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
boom()
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/boom(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user