diff --git a/code/__DEFINES/overlays.dm b/code/__DEFINES/overlays.dm
index aa2cc455b0e..626ef5e628d 100644
--- a/code/__DEFINES/overlays.dm
+++ b/code/__DEFINES/overlays.dm
@@ -28,9 +28,9 @@
*/
-// Layer offsets for closets
-#define CLOSET_OLAY_OFFSET_CONTENTS 0.01
-#define CLOSET_OLAY_OFFSET_DOOR 0.02
-#define CLOSET_OLAY_OFFSET_LOCK 0.03
-#define CLOSET_OLAY_OFFSET_WELDED 0.04
+// Float layers for closets
+#define CLOSET_OLAY_LAYER_CONTENTS -4
+#define CLOSET_OLAY_LAYER_DOOR -3
+#define CLOSET_OLAY_LAYER_LOCK -2
+#define CLOSET_OLAY_LAYER_WELDED -1
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index e1203da8a50..3a49b72df2a 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -126,9 +126,6 @@
/// Whether a moth's wings are burnt
#define STATUS_EFFECT_BURNT_WINGS /datum/status_effect/burnt_wings
-/// If a moth is in a cocoon
-#define STATUS_EFFECT_COCOONED /datum/status_effect/cocooned
-
//human status effects
// incapacitating
#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 16e48aa76b7..2e0f9d9f766 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -1,7 +1,7 @@
-#define BUTTON_LAYER_OFFSET_ICON (HUD_LAYER + 0.1)
-#define BUTTON_LAYER_OFFSET_UNAVAILABLE (HUD_LAYER + 0.2)
-#define BUTTON_LAYER_OFFSET_MAPTEXT (HUD_LAYER + 0.3)
-#define BUTTON_LAYER_OFFSET_SELECTOR (HUD_LAYER + 0.4)
+#define BUTTON_LAYER_ICON -4
+#define BUTTON_LAYER_UNAVAILABLE -3
+#define BUTTON_LAYER_MAPTEXT -2
+#define BUTTON_LAYER_SELECTOR -1
/datum/action
var/name = "Generic Action"
@@ -178,7 +178,7 @@
/datum/action/proc/apply_unavailable_effect()
- var/static/mutable_appearance/unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', "template", BUTTON_LAYER_OFFSET_UNAVAILABLE, alpha = 200, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
+ var/static/mutable_appearance/unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', "template", BUTTON_LAYER_UNAVAILABLE, alpha = 200, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
button.add_overlay(unavailable_effect)
@@ -186,7 +186,7 @@
button.cut_overlays()
if(!icon_icon || !button_icon_state)
return
- var/mutable_appearance/new_icon = mutable_appearance(icon_icon, button_icon_state, BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/mutable_appearance/new_icon = mutable_appearance(icon_icon, button_icon_state, BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
button.add_overlay(new_icon)
@@ -231,7 +231,7 @@
return ..()
if(!target)
return
- var/mutable_appearance/new_icon = mutable_appearance(target.icon, target.icon_state, BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/mutable_appearance/new_icon = mutable_appearance(target.icon, target.icon_state, BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
new_icon.copy_overlays(target)
button.add_overlay(new_icon)
@@ -522,7 +522,7 @@
/datum/action/item_action/toggle_research_scanner/ApplyIcon()
button.cut_overlays()
- var/static/mutable_appearance/new_icon = mutable_appearance('icons/mob/actions/actions.dmi', "scan_mode", BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/new_icon = mutable_appearance('icons/mob/actions/actions.dmi', "scan_mode", BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
button.add_overlay(new_icon)
@@ -684,7 +684,7 @@
var/obj/effect/proc_holder/spell/spell = target
if(!istype(spell) || !spell.need_active_overlay)
return
- var/static/mutable_appearance/selector = mutable_appearance('icons/mob/screen_gen.dmi', "selector", BUTTON_LAYER_OFFSET_SELECTOR, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/selector = mutable_appearance('icons/mob/screen_gen.dmi', "selector", BUTTON_LAYER_SELECTOR, appearance_flags = RESET_COLOR|RESET_ALPHA)
if(spell.active)
button.add_overlay(selector)
else
@@ -695,7 +695,7 @@
button.cut_overlays()
if(!button_icon || !button_icon_state)
return
- var/mutable_appearance/new_icon = mutable_appearance(button_icon, button_icon_state, BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/mutable_appearance/new_icon = mutable_appearance(button_icon, button_icon_state, BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
button.add_overlay(new_icon)
@@ -703,11 +703,11 @@
var/obj/effect/proc_holder/spell/spell = target
if(!istype(spell))
return ..()
- var/mutable_appearance/unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', "template", BUTTON_LAYER_OFFSET_UNAVAILABLE, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
+ var/mutable_appearance/unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', "template", BUTTON_LAYER_UNAVAILABLE, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
unavailable_effect.alpha = spell.cooldown_handler.get_cooldown_alpha()
button.add_overlay(unavailable_effect)
// Make a holder for the charge text
- var/static/mutable_appearance/maptext_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_OFFSET_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/maptext_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
var/text = spell.cooldown_handler.statpanel_info()
maptext_holder.maptext = "
[text]
"
button.add_overlay(maptext_holder)
@@ -750,7 +750,7 @@
/datum/action/innate/research_scanner/ApplyIcon()
button.cut_overlays()
- var/static/mutable_appearance/new_icon = mutable_appearance('icons/mob/actions/actions.dmi', "scan_mode", BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/new_icon = mutable_appearance('icons/mob/actions/actions.dmi', "scan_mode", BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
button.add_overlay(new_icon)
@@ -788,7 +788,7 @@
button.cut_overlays()
if(!mmi)
return
- var/mutable_appearance/new_icon = mutable_appearance(mmi.icon, mmi.icon_state, BUTTON_LAYER_OFFSET_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/mutable_appearance/new_icon = mutable_appearance(mmi.icon, mmi.icon_state, BUTTON_LAYER_ICON, appearance_flags = RESET_COLOR|RESET_ALPHA)
new_icon.copy_overlays(mmi)
button.add_overlay(new_icon)
@@ -928,7 +928,7 @@
var/progress = get_availability_percentage()
if(progress == 1)
no_count = TRUE
- var/mutable_appearance/unavailable_effect = mutable_appearance(coold_overlay_icon, coold_overlay_icon_state, BUTTON_LAYER_OFFSET_UNAVAILABLE, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
+ var/mutable_appearance/unavailable_effect = mutable_appearance(coold_overlay_icon, coold_overlay_icon_state, BUTTON_LAYER_UNAVAILABLE, appearance_flags = RESET_COLOR|RESET_ALPHA, color = "#000000")
unavailable_effect.alpha = no_count ? 80 : 220 - 140 * progress
button.add_overlay(unavailable_effect)
if(!no_count && charge_type != ADV_ACTION_TYPE_CHARGES)
@@ -940,14 +940,14 @@
/datum/action/item_action/advanced/proc/add_percentage_overlay(progress)
// Make a holder for the charge text
- var/static/mutable_appearance/count_down_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_OFFSET_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/count_down_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
count_down_holder.maptext = "[round_down(progress * 100)]%
"
button.add_overlay(count_down_holder)
/datum/action/item_action/advanced/proc/add_charges_overlay()
// Make a holder for the charge text
- var/static/mutable_appearance/charges_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_OFFSET_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
+ var/static/mutable_appearance/charges_holder = mutable_appearance('icons/effects/effects.dmi', "nothing", BUTTON_LAYER_MAPTEXT, appearance_flags = RESET_COLOR|RESET_ALPHA)
charges_holder.maptext = "[charge_counter]/[charge_max]
"
button.add_overlay(charges_holder)
@@ -994,8 +994,8 @@
UpdateButtonIcon()
-#undef BUTTON_LAYER_OFFSET_ICON
-#undef BUTTON_LAYER_OFFSET_UNAVAILABLE
-#undef BUTTON_LAYER_OFFSET_MAPTEXT
-#undef BUTTON_LAYER_OFFSET_SELECTOR
+#undef BUTTON_LAYER_ICON
+#undef BUTTON_LAYER_UNAVAILABLE
+#undef BUTTON_LAYER_MAPTEXT
+#undef BUTTON_LAYER_SELECTOR
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 212cb990bdd..260259c040a 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -347,18 +347,18 @@ GLOBAL_LIST_EMPTY(closets)
. = ..()
if(opened)
if(custom_open_overlay)
- . += mutable_appearance(icon, "[custom_open_overlay]_open", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[custom_open_overlay]_open", CLOSET_OLAY_LAYER_DOOR)
else
- . += mutable_appearance(icon, "[icon_state]_open", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[icon_state]_open", CLOSET_OLAY_LAYER_DOOR)
else
for(var/olay in apply_contents_overlays())
. += olay
if(custom_door_overlay)
- . += mutable_appearance(icon, "[custom_door_overlay]_door", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[custom_door_overlay]_door", CLOSET_OLAY_LAYER_DOOR)
else
- . += mutable_appearance(icon, "[icon_state]_door", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[icon_state]_door", CLOSET_OLAY_LAYER_DOOR)
if(welded)
- . += mutable_appearance(icon, "welded", src.layer + CLOSET_OLAY_OFFSET_WELDED)
+ . += mutable_appearance(icon, "welded", CLOSET_OLAY_LAYER_WELDED)
/**
@@ -486,16 +486,16 @@ GLOBAL_LIST_EMPTY(closets)
. = list()
if(!opened)
if(transparent)
- . += mutable_appearance(icon, "[initial(icon_state)]_door_trans", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[initial(icon_state)]_door_trans", CLOSET_OLAY_LAYER_DOOR)
else
- . += mutable_appearance(icon, "[initial(icon_state)]_door", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[initial(icon_state)]_door", CLOSET_OLAY_LAYER_DOOR)
if(welded)
- . += mutable_appearance(icon, "welded", src.layer + CLOSET_OLAY_OFFSET_WELDED)
+ . += mutable_appearance(icon, "welded", CLOSET_OLAY_LAYER_WELDED)
else
if(transparent)
- . += mutable_appearance(icon, "[initial(icon_state)]_open_trans", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[initial(icon_state)]_open_trans", CLOSET_OLAY_LAYER_DOOR)
else
- . += mutable_appearance(icon, "[initial(icon_state)]_open", src.layer + CLOSET_OLAY_OFFSET_DOOR)
+ . += mutable_appearance(icon, "[initial(icon_state)]_open", CLOSET_OLAY_LAYER_DOOR)
/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
index 339166fe662..de8303f7bf0 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/guncabinet.dm
@@ -32,7 +32,7 @@
shottas--
choise = "projectile"
if(choise)
- var/mutable_appearance/gun_olay = mutable_appearance(icon, choise, src.layer + CLOSET_OLAY_OFFSET_CONTENTS)
- gun_olay.pixel_x = i * 4
+ var/mutable_appearance/gun_olay = mutable_appearance(icon, choise, CLOSET_OLAY_LAYER_CONTENTS)
+ gun_olay.pixel_w = i * 4
. += gun_olay
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index 0e9a1621fe8..dab4d249e28 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -116,9 +116,9 @@
. = ..()
if(!opened && !broken)
if(locked)
- . += mutable_appearance(icon, overlay_locked, src.layer + CLOSET_OLAY_OFFSET_LOCK)
+ . += mutable_appearance(icon, overlay_locked, CLOSET_OLAY_LAYER_LOCK)
else
- . += mutable_appearance(icon, overlay_unlocked, src.layer + CLOSET_OLAY_OFFSET_LOCK)
+ . += mutable_appearance(icon, overlay_unlocked, CLOSET_OLAY_LAYER_LOCK)
/obj/structure/closet/secure_closet/update_desc(updates = ALL)
diff --git a/code/modules/antagonists/space_ninja/suit/suit.dm b/code/modules/antagonists/space_ninja/suit/suit.dm
index 4e26cec2ce7..82da717df67 100644
--- a/code/modules/antagonists/space_ninja/suit/suit.dm
+++ b/code/modules/antagonists/space_ninja/suit/suit.dm
@@ -22,7 +22,7 @@
armor = list("melee" = 40, "bullet" = 30, "laser" = 20,"energy" = 30, "bomb" = 30, "bio" = 100, "rad" = 30, "fire" = 100, "acid" = 100)
strip_delay = 12
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
- flags_inv = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL
+ flags_inv = HIDEJUMPSUIT|HIDETAIL
actions = list()
action_icon = list()
action_icon_state = list()
diff --git a/code/modules/mob/living/carbon/human/species/moth.dm b/code/modules/mob/living/carbon/human/species/moth.dm
index 97b32fd6780..b07c5470b07 100644
--- a/code/modules/mob/living/carbon/human/species/moth.dm
+++ b/code/modules/mob/living/carbon/human/species/moth.dm
@@ -213,9 +213,7 @@
icon_state = pick("cocoon1", "cocoon2", "cocoon3")
/obj/structure/moth/cocoon/Destroy()
- if(!preparing_to_emerge)
- visible_message("[src] splits open from within!")
- else
+ if(preparing_to_emerge)
visible_message("[src] is smashed open, harming the Nian within!")
for(var/mob/living/carbon/human/H in contents)
H.forceMove(loc)
@@ -225,9 +223,11 @@
H.AdjustWeakened(10 SECONDS)
return ..()
+ visible_message("[src] splits open from within!")
for(var/mob/living/carbon/human/H in contents)
H.forceMove(loc)
H.adjust_nutrition(COCOON_NUTRITION_AMOUNT)
+ H.remove_status_effect(STATUS_EFFECT_BURNT_WINGS)
REMOVE_TRAIT(H, TRAIT_KNOCKEDOUT, COCOONED_TRAIT)
return ..()
@@ -246,9 +246,6 @@
owner.UpdateAppearance()
return ..()
-/datum/status_effect/cocooned
- id = "cocooned"
- alert_type = null
#undef COCOON_WEAVE_DELAY
#undef COCOON_EMERGE_DELAY
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index be2eda78ac7..68ab7d71b9c 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -824,6 +824,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
if(belt.sprite_sheets?[dna.species.name])
standing.icon = belt.sprite_sheets[dna.species.name]
+ overlays_standing[BELT_LAYER] = standing
+
apply_overlay(BELT_LAYER)
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 0286a79cb2e..3c8679432f0 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -347,13 +347,15 @@
. = ..()
if(!beaker)
- return
-
- if(!icon_beaker)
- icon_beaker = mutable_appearance(icon, "disp_beaker")
-
- icon_beaker.pixel_x = rand(-10, 5) // randomize beaker overlay position
- . += icon_beaker
+ return .
+
+ var/static/list/beaker_cache = list()
+ var/random_pixel = rand(-10, 5) // randomize beaker overlay position
+ if(!beaker_cache["[random_pixel]"])
+ var/mutable_appearance/beaker_olay = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker")
+ beaker_olay.pixel_w = random_pixel
+ beaker_cache["[random_pixel]"] = beaker_olay
+ . += beaker_cache["[random_pixel]"]
/obj/machinery/chem_dispenser/soda