Ported C++mos from yogs (help me)
This commit is contained in:
@@ -302,24 +302,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/total = new//Holders to assimilate air from nearby turfs
|
||||
var/list/total_gases = total.gases
|
||||
|
||||
for(var/T in atmos_adjacent_turfs)
|
||||
var/turf/open/S = T
|
||||
if(!S.air)
|
||||
continue
|
||||
var/list/S_gases = S.air.gases
|
||||
for(var/id in S_gases)
|
||||
total_gases[id] += S_gases[id]
|
||||
total.temperature += S.air.temperature
|
||||
total.merge(S.air)
|
||||
|
||||
air.copy_from(total)
|
||||
|
||||
var/list/air_gases = air.gases
|
||||
for(var/id in air_gases)
|
||||
air_gases[id] /= turf_count //Averages contents of the turfs, ignoring walls and the like
|
||||
|
||||
air.temperature /= turf_count
|
||||
air.copy_from(total.remove_ratio(1/turf_count))
|
||||
SSair.add_to_active(src)
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
|
||||
@@ -216,10 +216,10 @@
|
||||
. = air.heat_capacity()
|
||||
|
||||
/turf/open/proc/GetTemperature()
|
||||
. = air.temperature
|
||||
. = air.return_temperature()
|
||||
|
||||
/turf/open/proc/TakeTemperature(temp)
|
||||
air.temperature += temp
|
||||
air.set_temperature(air.return_temperature() + temp)
|
||||
air_update_turf()
|
||||
|
||||
/turf/open/proc/freon_gas_act()
|
||||
@@ -304,9 +304,8 @@
|
||||
|
||||
/turf/open/rad_act(pulse_strength)
|
||||
. = ..()
|
||||
if (air.gases[/datum/gas/carbon_dioxide] && air.gases[/datum/gas/oxygen])
|
||||
pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide]*1000,air.gases[/datum/gas/oxygen]*2000) //Ensures matter is conserved properly
|
||||
air.gases[/datum/gas/carbon_dioxide]=max(air.gases[/datum/gas/carbon_dioxide]-(pulse_strength/1000),0)
|
||||
air.gases[/datum/gas/oxygen]=max(air.gases[/datum/gas/oxygen]-(pulse_strength/2000),0)
|
||||
air.gases[/datum/gas/pluoxium]+=(pulse_strength/4000)
|
||||
GAS_GARBAGE_COLLECT(air.gases)
|
||||
if (air.get_moles(/datum/gas/carbon_dioxide) && air.get_moles(/datum/gas/oxygen))
|
||||
pulse_strength = min(pulse_strength,air.get_moles(/datum/gas/carbon_dioxide)*1000,air.get_moles(/datum/gas/oxygen)*2000) //Ensures matter is conserved properly
|
||||
air.set_moles(/datum/gas/carbon_dioxide, max(air.get_moles(/datum/gas/carbon_dioxide)-(pulse_strength/1000),0))
|
||||
air.set_moles(/datum/gas/oxygen, max(air.get_moles(/datum/gas/oxygen)-(pulse_strength/2000),0))
|
||||
air.adjust_moles(/datum/gas/pluoxium, pulse_strength/4000)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
/turf/open/Entered(atom/movable/AM)
|
||||
..()
|
||||
//melting
|
||||
if(isobj(AM) && air && air.temperature > T0C)
|
||||
if(isobj(AM) && air && air.return_temperature() > T0C)
|
||||
var/obj/O = AM
|
||||
if(O.obj_flags & FROZEN)
|
||||
O.make_unfrozen()
|
||||
|
||||
Reference in New Issue
Block a user