diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index ee8a5470d8b..f9697207c60 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -75,21 +75,31 @@ connection var/list/connections = air_master.turfs_with_connections[ref_A] connections.Remove(src) - //Ensure we delete the right values by sanity checkign right before deletion. - Sanitize() - - //Remove connection from current zones. + //Remove connection from zones. if(A) if(A.zone && A.zone.connections) A.zone.connections.Remove(src) if(!A.zone.connections.len) A.zone.connections = null + + if(istype(zone_A) && (!A || A.zone != zone_A)) + if(zone_A.connections) + zone_A.connections.Remove(src) + if(!zone_A.connections.len) + zone_A.connections = null + if(B) if(B.zone && B.zone.connections) B.zone.connections.Remove(src) if(!B.zone.connections.len) B.zone.connections = null + if(istype(zone_B) && (!B || B.zone != zone_B)) + if(zone_B.connections) + zone_B.connections.Remove(src) + if(!zone_B.connections.len) + zone_B.connections = null + //Disconnect zones while handling unusual conditions. // e.g. loss of a zone on a turf if(A && A.zone && B && B.zone) diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index 66937ec6727..2f5d564b3b4 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -385,7 +385,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output) // slowly than small rooms, preserving our good old "hollywood-style" // oh-shit effect when large rooms get breached, but still having small // rooms remain pressurized for long enough to make escape possible. - share_size = max(1, max(size - 5, 1) + unsimulated_tiles.len) + share_size = max(1, max(size + 3, 1) + unsimulated_tiles.len) correction_ratio = share_size / unsimulated_tiles.len for(var/turf/T in unsimulated_tiles) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 0329bbe8baf..469c6c18f49 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -48,7 +48,10 @@ #define RCON_YES 3 //1000 joules equates to about 1 degree every 2 seconds for a single tile of air. -#define MAX_ENERGY_CHANGE 2000 +#define MAX_ENERGY_CHANGE 1000 + +#define MAX_TEMPERATURE 90 +#define MIN_TEMPERATURE -40 //all air alarms in area are connected via magic /area @@ -137,18 +140,21 @@ var/datum/gas_mixture/environment = location.return_air() //Handle temperature adjustment here. - if(environment.temperature < target_temperature - 10 || environment.temperature > target_temperature + 10 || regulating_temperature) + if(environment.temperature < target_temperature - 2 || environment.temperature > target_temperature + 2 || regulating_temperature) //If it goes too far, we should adjust ourselves back before stopping. + if(get_danger_level(target_temperature, TLV["temperature"])) + return + if(!regulating_temperature) regulating_temperature = 1 visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ "You hear a click and a faint electronic hum.") - if(target_temperature > T0C + 90) - target_temperature = T0C + 90 + if(target_temperature > T0C + MAX_TEMPERATURE) + target_temperature = T0C + MAX_TEMPERATURE - if(target_temperature < T0C - 40) - target_temperature = T0C - 40 + if(target_temperature < T0C + MIN_TEMPERATURE) + target_temperature = T0C + MIN_TEMPERATURE var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles) var/heat_capacity = gas.heat_capacity() @@ -709,7 +715,7 @@ Toxins: [plasma_percent]%
else if (other_dangerlevel==1) output += "Notice: Low Concentration of Unknown Particles Detected
" - output += "Temperature: [environment.temperature]K
" + output += "Temperature: [environment.temperature]K ([round(environment.temperature - T0C, 0.1)]C)
" //Overall status output += "Local Status: " @@ -727,7 +733,7 @@ Toxins: [plasma_percent]%
return output proc/rcon_text() - var/dat = "Remote Control:
" + var/dat = "" + + //Hackish, I know. I didn't feel like bothering to rework all of this. + dat += "
Remote Control:
" if(rcon_setting == RCON_NO) dat += "Off" else @@ -741,7 +747,11 @@ Toxins: [plasma_percent]%
if(rcon_setting == RCON_YES) dat += "On" else - dat += "On" + dat += "On
Thermostat:
[target_temperature - T0C]C
" + return dat proc/return_controls() @@ -985,10 +995,6 @@ table tr:first-child th:first-child { border: none;} if(selected[3] > selected[4]) selected[3] = selected[4] - //Sets the temperature the built-in heater/cooler tries to maintain. - if(env == "temperature") - target_temperature = (selected[2] + selected[3])/2 - apply_mode() if(href_list["screen"]) @@ -1015,6 +1021,13 @@ table tr:first-child th:first-child { border: none;} mode = text2num(href_list["mode"]) apply_mode() + if(href_list["temperature"]) + var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [MIN_TEMPERATURE]C and [MAX_TEMPERATURE]C)", "Thermostat Controls") as num|null + if(!input_temperature || input_temperature > MAX_TEMPERATURE || input_temperature < MIN_TEMPERATURE) + usr << "Temperature must be between [MIN_TEMPERATURE]C and [MAX_TEMPERATURE]C" + else + target_temperature = input_temperature + T0C + if (href_list["AAlarmwires"]) var/t1 = text2num(href_list["AAlarmwires"]) if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) )) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index ec044dbed16..e5ced14d63b 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -5,7 +5,7 @@ temperature = TCMB thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT - heat_capacity = 700000 +// heat_capacity = 700000 No. /turf/space/New() if(!istype(src, /turf/space/transit))