mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Add planetary atmos
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user