diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 2d2274894b..c359a74ad4 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -70,21 +70,22 @@ /obj/machinery/space_heater/process_atmos() if(!on || !is_operational()) if (on) // If it's broken, turn it off too - on = FALSE + toggle_power(FALSE) return PROCESS_KILL if(cell && cell.charge > 1 / efficiency) var/turf/L = loc - PerformHeating(L) + if(!PerformHeating(L)) + return PROCESS_KILL for(var/direction in GLOB.alldirs) L=get_step(src,direction) if(!locate(/turf/closed) in L) // we don't want to heat walls and cause jank - PerformHeating(L) + if(!PerformHeating(L)) + return PROCESS_KILL else - on = FALSE - update_icon() + toggle_power(FALSE) return PROCESS_KILL /obj/machinery/space_heater/proc/PerformHeating(turf/L) @@ -92,7 +93,7 @@ if(mode != HEATER_MODE_STANDBY) mode = HEATER_MODE_STANDBY update_icon() - return + return TRUE var/datum/gas_mixture/env = L.return_air() @@ -107,16 +108,16 @@ update_icon() if(mode == HEATER_MODE_STANDBY) - return + return TRUE var/heat_capacity = env.heat_capacity() var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity requiredPower = min(requiredPower, heatingPower) if(requiredPower < 1 || !cell.use(requiredPower / efficiency)) - on = FALSE + toggle_power(FALSE) update_icon() - return + return FALSE var/deltaTemperature = requiredPower / heat_capacity if(mode == HEATER_MODE_COOL) @@ -124,6 +125,7 @@ if(deltaTemperature) env.set_temperature(env.return_temperature() + deltaTemperature) air_update_turf() + return TRUE /obj/machinery/space_heater/RefreshParts() var/laser = 2 @@ -181,6 +183,7 @@ ..() default_unfasten_wrench(user, I, 5) return TRUE + /obj/machinery/space_heater/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -217,12 +220,8 @@ return switch(action) if("power") - on = !on - mode = HEATER_MODE_STANDBY - usr.visible_message("[usr] switches [on ? "on" : "off"] \the [src].", "You switch [on ? "on" : "off"] \the [src].") - update_icon() - if (on) - SSair.start_processing_machine(src) + toggle_power() + usr.visible_message(span_notice("[usr] switches [on ? "on" : "off"] \the [src]."), span_notice("You switch [on ? "on" : "off"] \the [src].")) . = TRUE if("mode") setMode = params["mode"] @@ -244,6 +243,17 @@ cell = null . = TRUE +/obj/machinery/space_heater/proc/toggle_power(state = !on) + if(state == on) + return + on = state + mode = HEATER_MODE_STANDBY + update_icon() + if(on) + SSair.start_processing_machine(src) + else + SSair.stop_processing_machine(src) + #undef HEATER_MODE_STANDBY #undef HEATER_MODE_HEAT #undef HEATER_MODE_COOL diff --git a/code/game/objects/items/armor_kits.dm b/code/game/objects/items/armor_kits.dm index 447878eef2..77a3ac217c 100644 --- a/code/game/objects/items/armor_kits.dm +++ b/code/game/objects/items/armor_kits.dm @@ -15,10 +15,10 @@ if(isobj(target) && istype(target, /obj/item/clothing/under)) var/obj/item/clothing/under/C = target if(C.damaged_clothes) - to_chat(user,"You should repair the damage done to [C] first.") + to_chat(user, span_warning("You should repair the damage done to [C] first.")) return - if(C.attached_accessories.len) - to_chat(user,"Kind of hard to sew around [C.attached_accessories.Join(", ")].") + if(length(C.attached_accessories)) + to_chat(user,span_warning("Kind of hard to sew around [english_list(C.attached_accessories)].")) return if(C.armor.getRating(MELEE) < 10) C.armor = C.armor.setRating(MELEE = 10) @@ -37,14 +37,14 @@ used = TRUE if(used) - user.visible_message("[user] reinforces [C] with [src].", \ - "You reinforce [C] with [src], making it as protective as a durathread jumpsuit.") + user.visible_message(span_notice("[user] reinforces [C] with [src]."), \ + span_notice("You reinforce [C] with [src], making it as protective as a durathread jumpsuit.")) C.name = "durathread [C.name]" C.upgrade_prefix = "durathread" // god i hope this works qdel(src) return else - to_chat(user, "You don't need to reinforce [C] any further.") + to_chat(user, span_notice("You don't need to reinforce [C] any further.")) return else return diff --git a/code/modules/atmospherics/gasmixtures/auxgm.dm b/code/modules/atmospherics/gasmixtures/auxgm.dm index 9c6a533646..9498683736 100644 --- a/code/modules/atmospherics/gasmixtures/auxgm.dm +++ b/code/modules/atmospherics/gasmixtures/auxgm.dm @@ -96,7 +96,8 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(GAS_O2, GAS_N2, GAS_CO2, GA visibility[g] = gas.moles_visible overlays[g] = new /list(FACTOR_GAS_VISIBLE_MAX) for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX) - var/obj/effect/overlay/gas/overlay = new(gas.gas_overlay) + var/obj/effect/overlay/gas/overlay = new + overlay.icon_state = gas.gas_overlay overlay.color = gas.color overlay.alpha = i * 255 / FACTOR_GAS_VISIBLE_MAX overlays[g][i] = overlay @@ -185,7 +186,3 @@ GLOBAL_DATUM_INIT(gas_data, /datum/auxgm, new) layer = FLY_LAYER appearance_flags = TILE_BOUND vis_flags = NONE - -/obj/effect/overlay/gas/Initialize(mapload, state) - . = ..() - icon_state = state