reorganize xgm into its own module

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2015-06-02 16:29:23 +01:00
parent f378bd126c
commit c1ce2f02b7
5 changed files with 16 additions and 17 deletions

View File

@@ -198,6 +198,7 @@
#include "code\datums\wires\suit_storage_unit.dm" #include "code\datums\wires\suit_storage_unit.dm"
#include "code\datums\wires\vending.dm" #include "code\datums\wires\vending.dm"
#include "code\datums\wires\wires.dm" #include "code\datums\wires\wires.dm"
#include "code\defines\gases.dm"
#include "code\defines\obj.dm" #include "code\defines\obj.dm"
#include "code\defines\obj\weapon.dm" #include "code\defines\obj\weapon.dm"
#include "code\defines\procs\admin.dm" #include "code\defines\procs\admin.dm"
@@ -1697,6 +1698,8 @@
#include "code\modules\virus2\helpers.dm" #include "code\modules\virus2\helpers.dm"
#include "code\modules\virus2\isolator.dm" #include "code\modules\virus2\isolator.dm"
#include "code\modules\virus2\items_devices.dm" #include "code\modules\virus2\items_devices.dm"
#include "code\modules\xgm\xgm_gas_data.dm"
#include "code\modules\xgm\xgm_gas_mixture.dm"
#include "code\TriDimension\controller.dm" #include "code\TriDimension\controller.dm"
#include "code\TriDimension\controller_presets.dm" #include "code\TriDimension\controller_presets.dm"
#include "code\TriDimension\Movement.dm" #include "code\TriDimension\Movement.dm"
@@ -1705,8 +1708,6 @@
#include "code\TriDimension\Structures_presets.dm" #include "code\TriDimension\Structures_presets.dm"
#include "code\TriDimension\Turfs.dm" #include "code\TriDimension\Turfs.dm"
#include "code\ZAS\_docs.dm" #include "code\ZAS\_docs.dm"
#include "code\ZAS\_gas_mixture_xgm.dm"
#include "code\ZAS\_xgm_gas_data.dm"
#include "code\ZAS\Airflow.dm" #include "code\ZAS\Airflow.dm"
#include "code\ZAS\Atom.dm" #include "code\ZAS\Atom.dm"
#include "code\ZAS\Connection.dm" #include "code\ZAS\Connection.dm"
@@ -1716,7 +1717,6 @@
#include "code\ZAS\Debug.dm" #include "code\ZAS\Debug.dm"
#include "code\ZAS\Diagnostic.dm" #include "code\ZAS\Diagnostic.dm"
#include "code\ZAS\Fire.dm" #include "code\ZAS\Fire.dm"
#include "code\ZAS\Gas.dm"
#include "code\ZAS\Phoron.dm" #include "code\ZAS\Phoron.dm"
#include "code\ZAS\Turf.dm" #include "code\ZAS\Turf.dm"
#include "code\ZAS\Variable Settings.dm" #include "code\ZAS\Variable Settings.dm"

View File

@@ -1,4 +1,4 @@
/xgm_gas/oxygen /decl/xgm_gas/oxygen
id = "oxygen" id = "oxygen"
name = "Oxygen" name = "Oxygen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
@@ -6,19 +6,19 @@
flags = XGM_GAS_OXIDIZER flags = XGM_GAS_OXIDIZER
/xgm_gas/nitrogen /decl/xgm_gas/nitrogen
id = "nitrogen" id = "nitrogen"
name = "Nitrogen" name = "Nitrogen"
specific_heat = 20 // J/(mol*K) specific_heat = 20 // J/(mol*K)
molar_mass = 0.028 // kg/mol molar_mass = 0.028 // kg/mol
/xgm_gas/carbon_dioxide /decl/xgm_gas/carbon_dioxide
id = "carbon_dioxide" id = "carbon_dioxide"
name = "Carbon Dioxide" name = "Carbon Dioxide"
specific_heat = 30 // J/(mol*K) specific_heat = 30 // J/(mol*K)
molar_mass = 0.044 // kg/mol molar_mass = 0.044 // kg/mol
/xgm_gas/phoron /decl/xgm_gas/phoron
id = "phoron" id = "phoron"
name = "Phoron" name = "Phoron"
specific_heat = 200 // J/(mol*K) specific_heat = 200 // J/(mol*K)
@@ -32,7 +32,7 @@
overlay_limit = 0.7 overlay_limit = 0.7
flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT
/xgm_gas/volatile_fuel /decl/xgm_gas/volatile_fuel
id = "volatile_fuel" id = "volatile_fuel"
name = "Volatile Fuel" name = "Volatile Fuel"
specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough. specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough.
@@ -40,7 +40,7 @@
flags = XGM_GAS_FUEL flags = XGM_GAS_FUEL
/xgm_gas/sleeping_agent /decl/xgm_gas/sleeping_agent
id = "sleeping_agent" id = "sleeping_agent"
name = "Sleeping Agent" name = "Sleeping Agent"
specific_heat = 40 // J/(mol*K) specific_heat = 40 // J/(mol*K)
@@ -49,7 +49,7 @@
tile_overlay = "sleeping_agent" tile_overlay = "sleeping_agent"
overlay_limit = 1 overlay_limit = 1
/xgm_gas/oxygen_agent_b /decl/xgm_gas/oxygen_agent_b
id = "oxygen_agent_b" id = "oxygen_agent_b"
name = "Oxygen Agent-B" //what is this? name = "Oxygen Agent-B" //what is this?
specific_heat = 300 // J/(mol*K) specific_heat = 300 // J/(mol*K)

View File

@@ -1,6 +1,6 @@
/var/xgm_gas_data/gas_data /var/datum/xgm_gas_data/gas_data
/xgm_gas_data /datum/xgm_gas_data
//Simple list of all the gas IDs. //Simple list of all the gas IDs.
var/list/gases = list() var/list/gases = list()
//The friendly, human-readable name for the gas. //The friendly, human-readable name for the gas.
@@ -16,7 +16,7 @@
//Flags. //Flags.
var/list/flags = list() var/list/flags = list()
/xgm_gas /decl/xgm_gas
var/id = "" var/id = ""
var/name = "Unnamed Gas" var/name = "Unnamed Gas"
var/specific_heat = 20 // J/(mol*K) var/specific_heat = 20 // J/(mol*K)
@@ -29,8 +29,8 @@
/hook/startup/proc/generateGasData() /hook/startup/proc/generateGasData()
gas_data = new gas_data = new
for(var/p in (typesof(/xgm_gas) - /xgm_gas)) for(var/p in (typesof(/decl/xgm_gas) - /decl/xgm_gas))
var/xgm_gas/gas = new p var/decl/xgm_gas/gas = new p //avoid initial() because of potential New() actions
if(gas.id in gas_data.gases) if(gas.id in gas_data.gases)
error("Duplicate gas id `[gas.id]` in `[p]`") error("Duplicate gas id `[gas.id]` in `[p]`")

View File

@@ -1,5 +1,3 @@
#define QUANTIZE(variable) (round(variable,0.0001))
/datum/gas_mixture /datum/gas_mixture
//Associative list of gas moles. //Associative list of gas moles.
//Gases with 0 moles are not tracked and are pruned by update_values() //Gases with 0 moles are not tracked and are pruned by update_values()

View File

@@ -963,6 +963,7 @@ var/list/be_special_flags = list(
#define WALL_OPENING 2 #define WALL_OPENING 2
#define CLAMP01(x) max(0, min(1, x)) #define CLAMP01(x) max(0, min(1, x))
#define QUANTIZE(variable) (round(variable,0.0001))
#define DEFAULT_WALL_MATERIAL "steel" #define DEFAULT_WALL_MATERIAL "steel"