WIP
This commit is contained in:
@@ -58,30 +58,40 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
cut_overlays()
|
||||
if(opened & icon_door_override)
|
||||
add_overlay("[icon_door]_open")
|
||||
. = ..()
|
||||
if(!opened)
|
||||
layer = OBJ_LAYER
|
||||
return
|
||||
else if(opened)
|
||||
add_overlay("[icon_state]_open")
|
||||
return
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
else
|
||||
layer = BELOW_OBJ_LAYER
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
if(!secure)
|
||||
return
|
||||
if(broken)
|
||||
add_overlay("off")
|
||||
add_overlay("sparking")
|
||||
else if(locked)
|
||||
add_overlay("locked")
|
||||
|
||||
/obj/structure/closet/update_overlays()
|
||||
. = ..()
|
||||
closet_update_overlays(.)
|
||||
|
||||
/obj/structure/closet/proc/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
. += "[icon_door]_door"
|
||||
else
|
||||
. += "[icon_state]_door"
|
||||
if(welded)
|
||||
. += "welded"
|
||||
if(!secure)
|
||||
return
|
||||
if(broken)
|
||||
. += "off"
|
||||
. += "sparking"
|
||||
else if(locked)
|
||||
. += "locked"
|
||||
else
|
||||
. += "unlocked"
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
if(icon_door_override)
|
||||
. += "[icon_door]_open"
|
||||
else
|
||||
. += "[icon_state]_open"
|
||||
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
tagged = 0
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/body_bag/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/body_bag/update_overlays()
|
||||
. = ..()
|
||||
if (tagged)
|
||||
add_overlay("bodybag_label")
|
||||
. += "bodybag_label"
|
||||
|
||||
/obj/structure/closet/body_bag/close()
|
||||
if(..())
|
||||
|
||||
@@ -33,12 +33,13 @@
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/crate/update_icon()
|
||||
/obj/structure/closet/crate/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][opened ? "open" : ""]"
|
||||
|
||||
cut_overlays()
|
||||
/obj/structure/closet/crate/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/bin/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/crate/bin/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
cut_overlays()
|
||||
if(contents.len == 0)
|
||||
add_overlay("largebing")
|
||||
. += "largebing"
|
||||
else if(contents.len >= storage_capacity)
|
||||
add_overlay("largebinr")
|
||||
. += "largebinr"
|
||||
else
|
||||
add_overlay("largebino")
|
||||
. += "largebino"
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/bag/trash))
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/critter/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/closet/crate/critter/closet_update_overlays(list/new_overlays)
|
||||
. = new_overlays
|
||||
if(opened)
|
||||
add_overlay("crittercrate_door_open")
|
||||
. += "crittercrate_door_open"
|
||||
else
|
||||
add_overlay("crittercrate_door")
|
||||
. += "crittercrate_door"
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/critter/return_air()
|
||||
if(tank)
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/crate/secure/update_overlays()
|
||||
. += ..()
|
||||
if(broken)
|
||||
add_overlay("securecrateemag")
|
||||
. += "securecrateemag"
|
||||
else if(locked)
|
||||
add_overlay("securecrater")
|
||||
. += "securecrater"
|
||||
else
|
||||
add_overlay("securecrateg")
|
||||
. += "securecrateg"
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
|
||||
Reference in New Issue
Block a user