From abb10ca69594613344bc2c880b000a0d4205c7f7 Mon Sep 17 00:00:00 2001 From: AbsFree Date: Tue, 17 Dec 2024 09:46:50 +0100 Subject: [PATCH] clearing overlays before changing file --- code/modules/atmospherics/machinery/portable/canister.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 0c940d250d..3085a56b9d 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -400,7 +400,11 @@ name = initial(replacement.name) desc = initial(replacement.desc) // GS13 - edit - icon = initial(replacement.icon) // GS13 - added for the canister to change the icon file + cut_overlays() // removes all overlays (connector, tank...). + icon = initial(replacement.icon) // changes icon file + // you may notice that we do not add the overlays back after removing them, + // yet they stay when we relabel a can. How? I have no idea. But it works, + // and as such, I won't question it // GS13 - end edit icon_state = initial(replacement.icon_state) if("restricted")