From 2b0068e6384f4ae5343ae136a941b5b04f9b7cdb Mon Sep 17 00:00:00 2001 From: Cognition Date: Fri, 22 Jul 2022 14:41:50 -0600 Subject: [PATCH] Fixes cleanbots being invisible whenever they get turned on or off --- .../mob/living/simple_animal/bot/cleanbot.dm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 0ad684ab4b..1300777620 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -19,6 +19,7 @@ path_image_color = "#993299" weather_immunities = list("lava","ash") + var/base_icon = "cleanbot" var/clean_time = 50 //How long do we take to clean? var/upgrades = 0 @@ -126,13 +127,21 @@ /mob/living/simple_animal/bot/cleanbot/turn_on() ..() - icon_state = "cleanbot[on]" bot_core.updateUsrDialog() + update_icon() /mob/living/simple_animal/bot/cleanbot/turn_off() ..() - icon_state = "cleanbot[on]" bot_core.updateUsrDialog() + update_icon() + +/mob/living/simple_animal/bot/cleanbot/update_icon_state() + . = ..() + switch(mode) + if(BOT_CLEANING) + icon_state = "[base_icon]-c" + else + icon_state = "[base_icon][on]" /mob/living/simple_animal/bot/cleanbot/bot_reset() ..()