From 20784855943c49a54801b1bebd47576cbbf4e17d Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 11 Apr 2019 18:20:55 -0400 Subject: [PATCH] minor code cleanup + fixes plasma fixation --- code/__DEFINES/atmospherics.dm | 5 +---- code/datums/diseases/advance/symptoms/heal.dm | 2 +- code/modules/atmospherics/gasmixtures/gas_mixture.dm | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index e593cfef82..bb966e46e9 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -1,8 +1,5 @@ //LISTMOS //indices of values in gas lists. -#define MOLES 1 -#define ARCHIVE 2 -#define GAS_META 3 #define META_GAS_SPECIFIC_HEAT 1 #define META_GAS_NAME 2 #define META_GAS_MOLES_VISIBLE 3 @@ -243,7 +240,7 @@ //HELPERS #define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity()) -#define ADD_GAS(gas_id, out_list) out_list[gas_id] = 0; +#define ADD_GAS(gas_id, out_list) out_list[gas_id] = 0 #define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) }; diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 9f3049dddd..ff9eda0766 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -371,7 +371,7 @@ if(M.loc) environment = M.loc.return_air() if(environment) - plasmamount = environment.gases["plasma"] + plasmamount = environment.gases[/datum/gas/plasma] if(plasmamount && plasmamount > GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_MOLES_VISIBLE]) //if there's enough plasma in the air to see . += power * 0.5 if(M.reagents.has_reagent("plasma")) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 156798bb0d..0cf2718740 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm //PV = nRT -/datum/gas_mixture/proc/heat_capacity(data = MOLES) //joules per kelvin +/datum/gas_mixture/proc/heat_capacity() //joules per kelvin var/list/cached_gases = gases . = 0 for(var/id in cached_gases)