Add planetary atmos

This commit is contained in:
Mark van Alphen
2019-04-27 18:52:50 +02:00
parent 4423962a2a
commit 36d251574f
7 changed files with 56 additions and 2 deletions
+17
View File
@@ -203,6 +203,10 @@ What are the archived variables for?
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
//Copies variables from sample
/datum/gas_mixture/proc/copy_from_turf(turf/model)
//Copies all gas info from the turf into the gas list along with temperature
//Returns: 1 if we are mutable, 0 otherwise
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
//Performs air sharing calculations between two gas_mixtures assuming only 1 boundary length
//Return: amount of gas exchanged (+ if sharer received)
@@ -343,6 +347,19 @@ What are the archived variables for?
return 1
/datum/gas_mixture/copy_from_turf(turf/model)
oxygen = model.oxygen
carbon_dioxide = model.carbon_dioxide
nitrogen = model.nitrogen
toxins = model.toxins
//acounts for changes in temperature
var/turf/model_parent = model.parent_type
if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
temperature = model.temperature
return 1
/datum/gas_mixture/check_turf(turf/model, atmos_adjacent_turfs = 4)
var/delta_oxygen = (oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)