Merge pull request #9242 from Spookerton/spkrtn/fix/misc-overlays

fix some misc hits on direct overlays access
This commit is contained in:
Atermonera
2023-09-11 22:51:28 -08:00
committed by GitHub
8 changed files with 20 additions and 35 deletions

View File

@@ -471,14 +471,11 @@
randpixel_xy()
/obj/item/reagent_containers/food/condiment/carton/update_icon()
overlays.Cut()
cut_overlays()
if(reagents.total_volume)
var/image/filling = image('icons/obj/food.dmi', src, "[icon_state]10")
filling.icon_state = "[icon_state]-[clamp(round(100 * reagents.total_volume / volume, 25), 0, 100)]"
overlays += filling
add_overlay(filling)
/obj/item/reagent_containers/food/condiment/carton/flour/rustic
name = "flour sack"

View File

@@ -166,21 +166,24 @@
holder.trans_to(I, weights[I] / total)
/obj/item/reagent_containers/cooking_container/update_icon()
overlays.Cut()
cut_overlays()
if(food_items)
var/image/filling = image('icons/obj/cooking_machines.dmi', src, "[icon_state]10")
var/percent = round((food_items / max_space) * 100)
switch(percent)
if(0 to 2) filling.icon_state = "[icon_state]"
if(3 to 24) filling.icon_state = "[icon_state]1"
if(25 to 49) filling.icon_state = "[icon_state]2"
if(50 to 74) filling.icon_state = "[icon_state]3"
if(75 to 79) filling.icon_state = "[icon_state]4"
if(80 to INFINITY) filling.icon_state = "[icon_state]5"
overlays += filling
if(0 to 2)
filling.icon_state = "[icon_state]"
if(3 to 24)
filling.icon_state = "[icon_state]1"
if(25 to 49)
filling.icon_state = "[icon_state]2"
if(50 to 74)
filling.icon_state = "[icon_state]3"
if(75 to 79)
filling.icon_state = "[icon_state]4"
if(80 to INFINITY)
filling.icon_state = "[icon_state]5"
add_overlay(filling)
/obj/item/reagent_containers/cooking_container/oven
name = "oven dish"

View File

@@ -225,8 +225,7 @@
/obj/item/honey_frame/update_icon()
..()
overlays.Cut()
cut_overlays()
if(honey > 0)
add_overlay("honeycomb")

View File

@@ -41,7 +41,7 @@
// appearance = ma
// If your simple mob's update_icon() call calls overlays.Cut(), this needs to be called after this, or manually apply modifier_overly to overlays.
// Call this if your simple mob cuts overlays.
/mob/living/simple_mob/update_modifier_visuals()
var/image/effects = null
if(modifier_overlay)

View File

@@ -89,12 +89,10 @@
if(is_infesting)
icon = infested.icon
copy_overlays(infested)
// overlays = infested.overlays
var/mutable_appearance/blob_head_overlay = mutable_appearance('icons/mob/blob.dmi', "blob_head")
if(overmind)
blob_head_overlay.color = overmind.blob_type.complementary_color
color = initial(color)//looks better.
// overlays += blob_head_overlay
add_overlay(blob_head_overlay, TRUE)
/mob/living/simple_mob/blob/spore/handle_special()

View File

@@ -144,15 +144,3 @@
//Constructs levitate, can fall from a shuttle with no harm, and are piloted by either damned spirits or some otherworldly entity. Let 'em float in space.
/mob/living/simple_mob/construct/Process_Spacemove(var/check_drift = 0)
return TRUE
/*
// Glowing Procs
/mob/living/simple_mob/construct/proc/add_glow()
var/image/eye_glow = image(icon,"glow-[icon_state]")
eye_glow.plane = PLANE_LIGHTING_ABOVE
overlays += eye_glow
set_light(2, -2, l_color = "#FFFFFF")
/mob/living/simple_mob/construct/proc/remove_glow()
overlays.Cut()
*/