LINDA, Stage 1

This commit ports the base system of LINDA from TG. This version of linda
is the original version, with none of -tg-'s fixes, rewrites, or other
such improvements attached.

The mob ignite system has been 100% removed, as LINDA does not support
this normally. It may be added back in when the improvements and refactors
to LINDA have been ported.
This commit is contained in:
Tigercat2000
2015-04-28 08:43:42 -07:00
parent 141577f3e9
commit 4f1053f5b7
121 changed files with 15821 additions and 15986 deletions
@@ -51,6 +51,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -148,6 +148,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -168,6 +169,7 @@
return
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
@@ -178,6 +178,7 @@
air_contents.merge(filtered_out)
loc.assume_air(removed)
air_update_turf()
if(network)
network.update = 1
@@ -191,6 +192,7 @@
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
air_contents.merge(removed)
air_update_turf()
if(network)
network.update = 1
-3
View File
@@ -135,8 +135,6 @@ datum/pipe_network
gas.trace_gases += corresponding
corresponding.moles = trace_gas.moles*gas.volume/air_transient.volume
gas.update_values()
air_transient.update_values()
return 1
proc/equalize_gases(datum/gas_mixture/list/gases)
@@ -199,6 +197,5 @@ proc/equalize_gases(datum/gas_mixture/list/gases)
gas.trace_gases += corresponding
corresponding.moles = trace_gas.moles*gas.volume/total_volume
gas.update_values()
return 1
+11 -37
View File
@@ -52,7 +52,6 @@ datum/pipeline
member.air_temporary.trace_gases += corresponding
corresponding.moles = trace_gas.moles*member.volume/air.volume
member.air_temporary.update_values()
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
air = new
@@ -130,27 +129,16 @@ datum/pipeline
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
air_sample.volume = mingle_volume
if(istype(target) && target.zone)
//Have to consider preservation of group statuses
var/datum/gas_mixture/turf_copy = new
var/datum/gas_mixture/turf_air = target.return_air()
turf_copy.copy_from(target.zone.air)
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
equalize_gases(list(air_sample, turf_copy))
air.merge(air_sample)
turf_copy.subtract(target.zone.air)
target.zone.air.merge(turf_copy)
else
var/datum/gas_mixture/turf_air = target.return_air()
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
equalize_gases(list(air_sample, turf_air))
air.merge(air_sample)
//turf_air already modified by equalize_gases()
if(istype(target))
if(target.air)
if(target.air.check_tile_graphic())
target.update_visuals(target.air)
if(network)
network.update = 1
@@ -176,12 +164,8 @@ datum/pipeline
var/delta_temperature = 0
var/sharer_heat_capacity = 0
if(modeled_location.zone)
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
else
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
delta_temperature = (air.temperature - modeled_location.air.temperature)
sharer_heat_capacity = modeled_location.air.heat_capacity()
var/self_temperature_delta = 0
var/sharer_temperature_delta = 0
@@ -197,10 +181,7 @@ datum/pipeline
air.temperature += self_temperature_delta
if(modeled_location.zone)
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
else
modeled_location.air.temperature += sharer_temperature_delta
modeled_location.air.temperature += sharer_temperature_delta
else
@@ -211,12 +192,5 @@ datum/pipeline
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
proc/radiate_heat(surface, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/heat = STEFAN_BOLTZMANN_CONSTANT * surface * air.temperature ** 4 * thermal_conductivity
air.temperature = max(0, air.temperature - heat / total_heat_capacity)
if(network)
network.update = 1
+5 -4
View File
@@ -21,11 +21,12 @@
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
else
parent.radiate_heat(surface, 1)
environment_temperature = loc:temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
// BubbleWrap