diff --git a/baystation12.dme b/baystation12.dme index e3e3f12ee1..a7f8a4defa 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -198,6 +198,7 @@ #include "code\datums\wires\suit_storage_unit.dm" #include "code\datums\wires\vending.dm" #include "code\datums\wires\wires.dm" +#include "code\defines\gases.dm" #include "code\defines\obj.dm" #include "code\defines\obj\weapon.dm" #include "code\defines\procs\admin.dm" @@ -1697,6 +1698,8 @@ #include "code\modules\virus2\helpers.dm" #include "code\modules\virus2\isolator.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_presets.dm" #include "code\TriDimension\Movement.dm" @@ -1705,8 +1708,6 @@ #include "code\TriDimension\Structures_presets.dm" #include "code\TriDimension\Turfs.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\Atom.dm" #include "code\ZAS\Connection.dm" @@ -1716,7 +1717,6 @@ #include "code\ZAS\Debug.dm" #include "code\ZAS\Diagnostic.dm" #include "code\ZAS\Fire.dm" -#include "code\ZAS\Gas.dm" #include "code\ZAS\Phoron.dm" #include "code\ZAS\Turf.dm" #include "code\ZAS\Variable Settings.dm" diff --git a/code/ZAS/Gas.dm b/code/defines/gases.dm similarity index 83% rename from code/ZAS/Gas.dm rename to code/defines/gases.dm index 0f3faa09b4..1f8c871ad3 100644 --- a/code/ZAS/Gas.dm +++ b/code/defines/gases.dm @@ -1,4 +1,4 @@ -/xgm_gas/oxygen +/decl/xgm_gas/oxygen id = "oxygen" name = "Oxygen" specific_heat = 20 // J/(mol*K) @@ -6,19 +6,19 @@ flags = XGM_GAS_OXIDIZER -/xgm_gas/nitrogen +/decl/xgm_gas/nitrogen id = "nitrogen" name = "Nitrogen" specific_heat = 20 // J/(mol*K) molar_mass = 0.028 // kg/mol -/xgm_gas/carbon_dioxide +/decl/xgm_gas/carbon_dioxide id = "carbon_dioxide" name = "Carbon Dioxide" specific_heat = 30 // J/(mol*K) molar_mass = 0.044 // kg/mol -/xgm_gas/phoron +/decl/xgm_gas/phoron id = "phoron" name = "Phoron" specific_heat = 200 // J/(mol*K) @@ -32,7 +32,7 @@ overlay_limit = 0.7 flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT -/xgm_gas/volatile_fuel +/decl/xgm_gas/volatile_fuel id = "volatile_fuel" name = "Volatile Fuel" specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough. @@ -40,7 +40,7 @@ flags = XGM_GAS_FUEL -/xgm_gas/sleeping_agent +/decl/xgm_gas/sleeping_agent id = "sleeping_agent" name = "Sleeping Agent" specific_heat = 40 // J/(mol*K) @@ -49,7 +49,7 @@ tile_overlay = "sleeping_agent" overlay_limit = 1 -/xgm_gas/oxygen_agent_b +/decl/xgm_gas/oxygen_agent_b id = "oxygen_agent_b" name = "Oxygen Agent-B" //what is this? specific_heat = 300 // J/(mol*K) diff --git a/code/ZAS/_xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm similarity index 83% rename from code/ZAS/_xgm_gas_data.dm rename to code/modules/xgm/xgm_gas_data.dm index fd732f9d7c..4ee3e1c501 100644 --- a/code/ZAS/_xgm_gas_data.dm +++ b/code/modules/xgm/xgm_gas_data.dm @@ -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. var/list/gases = list() //The friendly, human-readable name for the gas. @@ -16,7 +16,7 @@ //Flags. var/list/flags = list() -/xgm_gas +/decl/xgm_gas var/id = "" var/name = "Unnamed Gas" var/specific_heat = 20 // J/(mol*K) @@ -29,8 +29,8 @@ /hook/startup/proc/generateGasData() gas_data = new - for(var/p in (typesof(/xgm_gas) - /xgm_gas)) - var/xgm_gas/gas = new p + for(var/p in (typesof(/decl/xgm_gas) - /decl/xgm_gas)) + var/decl/xgm_gas/gas = new p //avoid initial() because of potential New() actions if(gas.id in gas_data.gases) error("Duplicate gas id `[gas.id]` in `[p]`") diff --git a/code/ZAS/_gas_mixture_xgm.dm b/code/modules/xgm/xgm_gas_mixture.dm similarity index 96% rename from code/ZAS/_gas_mixture_xgm.dm rename to code/modules/xgm/xgm_gas_mixture.dm index 8043be1579..5806237d04 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/modules/xgm/xgm_gas_mixture.dm @@ -1,5 +1,3 @@ -#define QUANTIZE(variable) (round(variable,0.0001)) - /datum/gas_mixture //Associative list of gas moles. //Gases with 0 moles are not tracked and are pruned by update_values() diff --git a/code/setup.dm b/code/setup.dm index 4df34404a5..4ffbf59800 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -963,6 +963,7 @@ var/list/be_special_flags = list( #define WALL_OPENING 2 #define CLAMP01(x) max(0, min(1, x)) +#define QUANTIZE(variable) (round(variable,0.0001)) #define DEFAULT_WALL_MATERIAL "steel"