mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge branch 'airfixes' of https://www.github.com/SkyMarshal/Baystation12
This commit is contained in:
@@ -141,7 +141,10 @@
|
|||||||
|
|
||||||
//Sets the temperature the built-in heater/cooler tries to maintain.
|
//Sets the temperature the built-in heater/cooler tries to maintain.
|
||||||
if(env == "temperature")
|
if(env == "temperature")
|
||||||
current.target_temperature = (selected[2] + selected[3])/2
|
if(current.target_temperature < selected[2])
|
||||||
|
current.target_temperature = selected[2]
|
||||||
|
if(current.target_temperature > selected[3])
|
||||||
|
current.target_temperature = selected[3]
|
||||||
|
|
||||||
spawn(1)
|
spawn(1)
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
|||||||
@@ -75,21 +75,31 @@ connection
|
|||||||
var/list/connections = air_master.turfs_with_connections[ref_A]
|
var/list/connections = air_master.turfs_with_connections[ref_A]
|
||||||
connections.Remove(src)
|
connections.Remove(src)
|
||||||
|
|
||||||
//Ensure we delete the right values by sanity checkign right before deletion.
|
//Remove connection from zones.
|
||||||
Sanitize()
|
|
||||||
|
|
||||||
//Remove connection from current zones.
|
|
||||||
if(A)
|
if(A)
|
||||||
if(A.zone && A.zone.connections)
|
if(A.zone && A.zone.connections)
|
||||||
A.zone.connections.Remove(src)
|
A.zone.connections.Remove(src)
|
||||||
if(!A.zone.connections.len)
|
if(!A.zone.connections.len)
|
||||||
A.zone.connections = null
|
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)
|
||||||
if(B.zone && B.zone.connections)
|
if(B.zone && B.zone.connections)
|
||||||
B.zone.connections.Remove(src)
|
B.zone.connections.Remove(src)
|
||||||
if(!B.zone.connections.len)
|
if(!B.zone.connections.len)
|
||||||
B.zone.connections = null
|
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.
|
//Disconnect zones while handling unusual conditions.
|
||||||
// e.g. loss of a zone on a turf
|
// e.g. loss of a zone on a turf
|
||||||
if(A && A.zone && B && B.zone)
|
if(A && A.zone && B && B.zone)
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ Attach to transfer valve and open. BOOM.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Some legacy definitions so fires can be started.
|
//Some legacy definitions so fires can be started.
|
||||||
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
return null
|
return null
|
||||||
@@ -19,12 +21,21 @@ atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed
|
|||||||
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||||
if(fire_protection > world.time-300) return
|
if(fire_protection > world.time-300) return
|
||||||
var/datum/gas_mixture/air_contents = return_air()
|
var/datum/gas_mixture/air_contents = return_air(1)
|
||||||
if(!air_contents || exposed_temperature < PLASMA_MINIMUM_BURN_TEMPERATURE)
|
if(!air_contents)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
/*if(active_hotspot)
|
||||||
|
if(soh)
|
||||||
|
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
|
||||||
|
if(active_hotspot.temperature < exposed_temperature)
|
||||||
|
active_hotspot.temperature = exposed_temperature
|
||||||
|
if(active_hotspot.volume < exposed_volume)
|
||||||
|
active_hotspot.volume = exposed_volume
|
||||||
|
return 1*/
|
||||||
var/igniting = 0
|
var/igniting = 0
|
||||||
if(locate(/obj/fire) in src)
|
if(locate(/obj/fire) in src)
|
||||||
return 1
|
return 1
|
||||||
@@ -36,8 +47,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(! (locate(/obj/fire) in src))
|
if(! (locate(/obj/fire) in src))
|
||||||
|
var/obj/fire/F = new(src,1000)
|
||||||
new /obj/fire(src,1000)
|
F.temperature = exposed_temperature
|
||||||
|
F.volume = CELL_VOLUME
|
||||||
|
|
||||||
//active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
|
//active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
|
||||||
//remove just_spawned protection if no longer processing this cell
|
//remove just_spawned protection if no longer processing this cell
|
||||||
@@ -59,7 +71,10 @@ obj
|
|||||||
layer = TURF_LAYER
|
layer = TURF_LAYER
|
||||||
|
|
||||||
var
|
var
|
||||||
|
volume = CELL_VOLUME
|
||||||
|
temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
|
||||||
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
||||||
|
archived_firelevel = 0
|
||||||
|
|
||||||
process()
|
process()
|
||||||
. = 1
|
. = 1
|
||||||
@@ -77,7 +92,7 @@ obj
|
|||||||
//Also get liquid fuels on the ground.
|
//Also get liquid fuels on the ground.
|
||||||
obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S
|
obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S
|
||||||
|
|
||||||
var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate)
|
var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25)
|
||||||
//The reason we're taking a part of the air instead of all of it is so that it doesn't jump to
|
//The reason we're taking a part of the air instead of all of it is so that it doesn't jump to
|
||||||
//the fire's max temperature instantaneously.
|
//the fire's max temperature instantaneously.
|
||||||
|
|
||||||
@@ -111,13 +126,10 @@ obj
|
|||||||
//Change icon depending on the fuel, and thus temperature.
|
//Change icon depending on the fuel, and thus temperature.
|
||||||
if(firelevel > 6)
|
if(firelevel > 6)
|
||||||
icon_state = "3"
|
icon_state = "3"
|
||||||
SetLuminosity(7)
|
|
||||||
else if(firelevel > 2.5)
|
else if(firelevel > 2.5)
|
||||||
icon_state = "2"
|
icon_state = "2"
|
||||||
SetLuminosity(5)
|
|
||||||
else
|
else
|
||||||
icon_state = "1"
|
icon_state = "1"
|
||||||
SetLuminosity(3)
|
|
||||||
|
|
||||||
//Ensure flow temperature is higher than minimum fire temperatures.
|
//Ensure flow temperature is higher than minimum fire temperatures.
|
||||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||||
@@ -125,7 +137,7 @@ obj
|
|||||||
//Burn the gas mixture.
|
//Burn the gas mixture.
|
||||||
flow.zburn(liquid)
|
flow.zburn(liquid)
|
||||||
if(fuel && fuel.moles <= 0.00001)
|
if(fuel && fuel.moles <= 0.00001)
|
||||||
air_contents.trace_gases.Remove(fuel)
|
del fuel
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -143,7 +155,7 @@ obj
|
|||||||
|
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/M in loc)
|
for(var/mob/living/carbon/human/M in loc)
|
||||||
M.FireBurn(firelevel) //Burn the humans!
|
M.FireBurn(temperature, min(max(0.1,firelevel / 20),10)) //Burn the humans!
|
||||||
|
|
||||||
|
|
||||||
New(newLoc,fl)
|
New(newLoc,fl)
|
||||||
@@ -153,14 +165,13 @@ obj
|
|||||||
del src
|
del src
|
||||||
|
|
||||||
dir = pick(cardinal)
|
dir = pick(cardinal)
|
||||||
SetLuminosity(3)
|
//sd_SetLuminosity(3,2,0)
|
||||||
firelevel = fl
|
firelevel = fl
|
||||||
air_master.active_hotspots.Add(src)
|
air_master.active_hotspots.Add(src)
|
||||||
|
|
||||||
|
|
||||||
Del()
|
Del()
|
||||||
if (istype(loc, /turf/simulated))
|
if (istype(loc, /turf/simulated))
|
||||||
SetLuminosity(0)
|
//sd_SetLuminosity(0)
|
||||||
|
|
||||||
loc = null
|
loc = null
|
||||||
air_master.active_hotspots.Remove(src)
|
air_master.active_hotspots.Remove(src)
|
||||||
@@ -168,34 +179,36 @@ obj
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
||||||
turf/proc/apply_fire_protection()
|
turf/proc/apply_fire_protection()
|
||||||
turf/simulated/apply_fire_protection()
|
turf/simulated/apply_fire_protection()
|
||||||
fire_protection = world.time
|
fire_protection = world.time
|
||||||
|
|
||||||
|
|
||||||
datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
||||||
//This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS.
|
//This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS.
|
||||||
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
|
if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE)
|
||||||
var
|
var
|
||||||
total_fuel = toxins
|
total_fuel = toxins
|
||||||
|
fuel_sources = 0 //We'll divide by this later so that fuel is consumed evenly.
|
||||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||||
|
|
||||||
if(fuel)
|
if(fuel)
|
||||||
//Volatile Fuel
|
//Volatile Fuel
|
||||||
total_fuel += fuel.moles
|
total_fuel += fuel.moles
|
||||||
|
fuel_sources++
|
||||||
|
|
||||||
if(liquid)
|
if(liquid)
|
||||||
//Liquid Fuel
|
//Liquid Fuel
|
||||||
if(liquid.amount <= 0)
|
if(liquid.amount <= 0)
|
||||||
del liquid
|
del liquid
|
||||||
else
|
else
|
||||||
total_fuel += liquid.amount*15
|
total_fuel += liquid.amount
|
||||||
|
fuel_sources++
|
||||||
|
|
||||||
if(! (fuel || toxins || liquid) )
|
//Toxins
|
||||||
return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
|
if(toxins > 0.3) fuel_sources++
|
||||||
|
|
||||||
|
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
|
||||||
|
|
||||||
if(oxygen > 0.3)
|
if(oxygen > 0.3)
|
||||||
|
|
||||||
@@ -205,54 +218,46 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
|||||||
//Reaches a maximum practical temperature of around 4500.
|
//Reaches a maximum practical temperature of around 4500.
|
||||||
|
|
||||||
//Increase temperature.
|
//Increase temperature.
|
||||||
temperature = max( vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24) , temperature )
|
temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature )
|
||||||
|
|
||||||
var/total_reactants = min(oxygen, 2*total_fuel) + total_fuel
|
|
||||||
|
|
||||||
//Consume some gas.
|
//Consume some gas.
|
||||||
var/consumed_gas = max( min( total_reactants, vsc.fire_gas_combustion_ratio*firelevel ), 0.2)
|
var/consumed_gas = min(oxygen,0.05*firelevel,total_fuel) / fuel_sources
|
||||||
|
|
||||||
oxygen -= min(oxygen, (total_reactants-total_fuel)*consumed_gas/total_reactants )
|
oxygen = max(0,oxygen-consumed_gas)
|
||||||
|
|
||||||
toxins -= min(toxins, toxins*consumed_gas/total_reactants )
|
toxins = max(0,toxins-consumed_gas)
|
||||||
|
|
||||||
carbon_dioxide += max(consumed_gas, 0)
|
carbon_dioxide += consumed_gas*2
|
||||||
|
|
||||||
if(fuel)
|
if(fuel)
|
||||||
fuel.moles -= fuel.moles*consumed_gas/total_reactants
|
fuel.moles -= consumed_gas
|
||||||
if(fuel.moles <= 0) del fuel
|
if(fuel.moles <= 0) del fuel
|
||||||
|
|
||||||
if(liquid)
|
if(liquid)
|
||||||
liquid.amount -= liquid.amount*consumed_gas/(total_reactants)
|
liquid.amount -= consumed_gas
|
||||||
if(liquid.amount <= 0) del liquid
|
if(liquid.amount <= 0) del liquid
|
||||||
|
|
||||||
update_values()
|
update_values()
|
||||||
return consumed_gas
|
return consumed_gas*fuel_sources
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
||||||
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
|
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
|
||||||
var
|
var
|
||||||
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
datum/gas/volatile_fuel/fuel = locate() in trace_gases
|
||||||
|
liquid_concentration = 0
|
||||||
|
|
||||||
var/total_fuel = toxins - 0.5
|
oxy_concentration = oxygen / volume
|
||||||
|
tox_concentration = toxins / volume
|
||||||
|
fuel_concentration = 0
|
||||||
|
|
||||||
if(liquid)
|
if(fuel) fuel_concentration = (fuel.moles) / volume
|
||||||
total_fuel += (liquid.amount*15)
|
if(liquid) liquid_concentration = (liquid.amount*15) / volume
|
||||||
|
return (oxy_concentration + tox_concentration + liquid_concentration + fuel_concentration)*100
|
||||||
|
|
||||||
if(fuel)
|
/mob/living/carbon/human/proc/FireBurn(last_temperature, mx as num)
|
||||||
total_fuel += fuel.moles
|
|
||||||
|
|
||||||
var/total_combustables = (total_fuel + oxygen)
|
|
||||||
if(total_fuel <= 0 || oxygen <= 0)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
return max( 0, vsc.fire_firelevel_multiplier*(total_combustables/(total_combustables + nitrogen))*log(2*total_combustables/oxygen)*log(total_combustables/total_fuel))
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/FireBurn(var/firelevel)
|
|
||||||
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
|
//Burns mobs due to fire. Respects heat transfer coefficients on various body parts.
|
||||||
//Due to TG reworking how fireprotection works, this is kinda less meaningful.
|
|
||||||
|
|
||||||
var
|
var
|
||||||
head_exposure = 1
|
head_exposure = 1
|
||||||
@@ -261,11 +266,8 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
|
|||||||
legs_exposure = 1
|
legs_exposure = 1
|
||||||
arms_exposure = 1
|
arms_exposure = 1
|
||||||
|
|
||||||
var/mx = min(max(0.1,firelevel / 20),10)
|
|
||||||
var/last_temperature = vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24)
|
|
||||||
|
|
||||||
//Get heat transfer coefficients for clothing.
|
//Get heat transfer coefficients for clothing.
|
||||||
//skytodo: kill anyone who breaks things then orders me to fix them
|
|
||||||
for(var/obj/item/clothing/C in src)
|
for(var/obj/item/clothing/C in src)
|
||||||
if(l_hand == C || r_hand == C)
|
if(l_hand == C || r_hand == C)
|
||||||
continue
|
continue
|
||||||
@@ -293,4 +295,3 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
|
|||||||
apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire")
|
apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire")
|
||||||
|
|
||||||
//flash_pain()
|
//flash_pain()
|
||||||
#undef ZAS_FIRE_CONSUMPTION_RATE
|
|
||||||
@@ -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"
|
// slowly than small rooms, preserving our good old "hollywood-style"
|
||||||
// oh-shit effect when large rooms get breached, but still having small
|
// oh-shit effect when large rooms get breached, but still having small
|
||||||
// rooms remain pressurized for long enough to make escape possible.
|
// 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
|
correction_ratio = share_size / unsimulated_tiles.len
|
||||||
|
|
||||||
for(var/turf/T in unsimulated_tiles)
|
for(var/turf/T in unsimulated_tiles)
|
||||||
|
|||||||
@@ -48,7 +48,10 @@
|
|||||||
#define RCON_YES 3
|
#define RCON_YES 3
|
||||||
|
|
||||||
//1000 joules equates to about 1 degree every 2 seconds for a single tile of air.
|
//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
|
//all air alarms in area are connected via magic
|
||||||
/area
|
/area
|
||||||
@@ -137,18 +140,21 @@
|
|||||||
var/datum/gas_mixture/environment = location.return_air()
|
var/datum/gas_mixture/environment = location.return_air()
|
||||||
|
|
||||||
//Handle temperature adjustment here.
|
//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 it goes too far, we should adjust ourselves back before stopping.
|
||||||
|
if(get_danger_level(target_temperature, TLV["temperature"]))
|
||||||
|
return
|
||||||
|
|
||||||
if(!regulating_temperature)
|
if(!regulating_temperature)
|
||||||
regulating_temperature = 1
|
regulating_temperature = 1
|
||||||
visible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
|
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.")
|
"You hear a click and a faint electronic hum.")
|
||||||
|
|
||||||
if(target_temperature > T0C + 90)
|
if(target_temperature > T0C + MAX_TEMPERATURE)
|
||||||
target_temperature = T0C + 90
|
target_temperature = T0C + MAX_TEMPERATURE
|
||||||
|
|
||||||
if(target_temperature < T0C - 40)
|
if(target_temperature < T0C + MIN_TEMPERATURE)
|
||||||
target_temperature = T0C - 40
|
target_temperature = T0C + MIN_TEMPERATURE
|
||||||
|
|
||||||
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
|
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
|
||||||
var/heat_capacity = gas.heat_capacity()
|
var/heat_capacity = gas.heat_capacity()
|
||||||
@@ -709,7 +715,7 @@ Toxins: <span class='dl[plasma_dangerlevel]'>[plasma_percent]</span>%<br>
|
|||||||
else if (other_dangerlevel==1)
|
else if (other_dangerlevel==1)
|
||||||
output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
|
output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
|
||||||
|
|
||||||
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K<br>"
|
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K ([round(environment.temperature - T0C, 0.1)]C)<br>"
|
||||||
|
|
||||||
//Overall status
|
//Overall status
|
||||||
output += "Local Status: "
|
output += "Local Status: "
|
||||||
@@ -727,7 +733,7 @@ Toxins: <span class='dl[plasma_dangerlevel]'>[plasma_percent]</span>%<br>
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
proc/rcon_text()
|
proc/rcon_text()
|
||||||
var/dat = "<b>Remote Control:</b><br>"
|
var/dat = "<table width=\"100%\"><td align=\"center\"><b>Remote Control:</b><br>"
|
||||||
if(rcon_setting == RCON_NO)
|
if(rcon_setting == RCON_NO)
|
||||||
dat += "<b>Off</b>"
|
dat += "<b>Off</b>"
|
||||||
else
|
else
|
||||||
@@ -741,7 +747,11 @@ Toxins: <span class='dl[plasma_dangerlevel]'>[plasma_percent]</span>%<br>
|
|||||||
if(rcon_setting == RCON_YES)
|
if(rcon_setting == RCON_YES)
|
||||||
dat += "<b>On</b>"
|
dat += "<b>On</b>"
|
||||||
else
|
else
|
||||||
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a>"
|
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a></td>"
|
||||||
|
|
||||||
|
//Hackish, I know. I didn't feel like bothering to rework all of this.
|
||||||
|
dat += "<td align=\"center\"><b>Thermostat:</b><br><a href='?src=\ref[src];temperature=1'>[target_temperature - T0C]C</a></td></table>"
|
||||||
|
|
||||||
return dat
|
return dat
|
||||||
|
|
||||||
proc/return_controls()
|
proc/return_controls()
|
||||||
@@ -985,10 +995,6 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
if(selected[3] > selected[4])
|
if(selected[3] > selected[4])
|
||||||
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()
|
apply_mode()
|
||||||
|
|
||||||
if(href_list["screen"])
|
if(href_list["screen"])
|
||||||
@@ -1015,6 +1021,16 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
mode = text2num(href_list["mode"])
|
mode = text2num(href_list["mode"])
|
||||||
apply_mode()
|
apply_mode()
|
||||||
|
|
||||||
|
if(href_list["temperature"])
|
||||||
|
var/list/selected = TLV["temperature"]
|
||||||
|
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
|
||||||
|
var/min_temperature = max(selected[2] - T0C, MIN_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"])
|
if (href_list["AAlarmwires"])
|
||||||
var/t1 = text2num(href_list["AAlarmwires"])
|
var/t1 = text2num(href_list["AAlarmwires"])
|
||||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
temperature = TCMB
|
temperature = TCMB
|
||||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||||
heat_capacity = 700000
|
// heat_capacity = 700000 No.
|
||||||
|
|
||||||
/turf/space/New()
|
/turf/space/New()
|
||||||
if(!istype(src, /turf/space/transit))
|
if(!istype(src, /turf/space/transit))
|
||||||
|
|||||||
Reference in New Issue
Block a user