diff --git a/aurorastation.dme b/aurorastation.dme index 7637a5ccc7a..5201d8961ba 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2975,6 +2975,7 @@ #include "code\modules\modular_computers\file_system\programs\command\teleporter.dm" #include "code\modules\modular_computers\file_system\programs\engineering\_engineering.dm" #include "code\modules\modular_computers\file_system\programs\engineering\atmoscontrol.dm" +#include "code\modules\modular_computers\file_system\programs\engineering\fusion_codex.dm" #include "code\modules\modular_computers\file_system\programs\engineering\lightingcontrol.dm" #include "code\modules\modular_computers\file_system\programs\engineering\powermonitor.dm" #include "code\modules\modular_computers\file_system\programs\engineering\rcon.dm" diff --git a/code/__DEFINES/atmos.dm b/code/__DEFINES/atmos.dm index a95de10357c..2e37835ad17 100644 --- a/code/__DEFINES/atmos.dm +++ b/code/__DEFINES/atmos.dm @@ -77,9 +77,13 @@ #define LIQUIDFUEL_AMOUNT_TO_MOL 0.45 //mol/volume unit // XGM gas flags. +/// Used by combustion reactions. #define XGM_GAS_FUEL 1 +/// Used by combustion reactions. #define XGM_GAS_OXIDIZER 2 +/// Attaches itself to certain objects/atoms. #define XGM_GAS_CONTAMINANT 4 +/// Used by nuclear fusion reactions. #define XGM_GAS_FUSION_FUEL 8 #define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking. @@ -118,13 +122,13 @@ #define GAS_PHORON "phoron" #define GAS_HYDROGEN "hydrogen" #define GAS_ALIEN "aliether" -#define GAS_STEAM "water" +#define GAS_WATERVAPOR "water_vapor" #define GAS_SULFUR "sulfur_dioxide" #define GAS_CHLORINE "chlorine" #define GAS_HELIUM "helium" +#define GAS_HELIUMFUEL "helium-3" #define GAS_DEUTERIUM "deuterium" #define GAS_TRITIUM "tritium" -#define GAS_BORON "boron" #define GAS_HEAT "heat" //Not a real gas, used for visual effects #define GAS_COLD "cold" //Not a real gas, used for visual effects diff --git a/code/__DEFINES/machinery.dm b/code/__DEFINES/machinery.dm index ab24920d62f..dae9b61f55c 100644 --- a/code/__DEFINES/machinery.dm +++ b/code/__DEFINES/machinery.dm @@ -24,6 +24,8 @@ #define POWER_USE_ACTIVE 2 // Bitflags for machine stat variable. +// These definitions are copypasted in the dmdocs in 'code/game/machinery.dm' so they can be easily referenced by checking the 'stat' variable. +// SO THAT MEANS IF YOU UPDATE THEM HERE, UPDATE THEM THERE FOR VISIBILITY! #define BROKEN 0x1 #define NOPOWER 0x2 #define POWEROFF 0x4 // TBD. diff --git a/code/__DEFINES/materials.dm b/code/__DEFINES/materials.dm index cbcf58270d8..68d6d99bd46 100644 --- a/code/__DEFINES/materials.dm +++ b/code/__DEFINES/materials.dm @@ -27,7 +27,7 @@ #define MATERIAL_DIONA "biomass" #define MATERIAL_VAURCA "alien biomass" #define MATERIAL_TRITIUM "tritium" -#define MATERIAL_HYDROGEN_METALLIC "mhydrogen" +#define MATERIAL_HYDROGEN_METALLIC "metallic hydrogen" #define MATERIAL_ELEVATOR "elevatorium" #define MATERIAL_SHUTTLE "shuttle" #define MATERIAL_SHUTTLE_SKRELL "skrell" @@ -38,6 +38,7 @@ #define MATERIAL_SUPERMATTER "supermatter" #define MATERIAL_ALUMINIUM "aluminium" #define MATERIAL_LEAD "lead" +#define MATERIAL_BORON "boron" // Leathers and related. #define MATERIAL_RESIN "resin" diff --git a/code/__DEFINES/mining.dm b/code/__DEFINES/mining.dm index 3edb4a932db..18dc61c67a9 100644 --- a/code/__DEFINES/mining.dm +++ b/code/__DEFINES/mining.dm @@ -7,6 +7,6 @@ #define ORE_GOLD "gold" #define ORE_DIAMOND "diamond" #define ORE_PLATINUM "platinum" -#define ORE_HYDROGEN "mhydrogen" +#define ORE_HYDROGEN "metallic hydrogen" #define ORE_BAUXITE "aluminium" #define ORE_GALENA "lead" diff --git a/code/controllers/subsystems/initialization/codex.dm b/code/controllers/subsystems/initialization/codex.dm index e1043efb0c5..ab014562b0b 100644 --- a/code/controllers/subsystems/initialization/codex.dm +++ b/code/controllers/subsystems/initialization/codex.dm @@ -4,13 +4,17 @@ SUBSYSTEM_DEF(codex) flags = SS_NO_FIRE init_order = INIT_ORDER_CODEX - /// List of cooking recipes, their result and ingredients. + /// List of cooking recipes and associated data. var/list/cooking_codex_data = list() + /// List of chemistry/reagent reactions and associated data. var/list/chemistry_codex_data = list() var/list/chemistry_codex_ignored_reaction_path = list(/datum/chemical_reaction/slime) var/list/chemistry_codex_ignored_result_path = list(/singleton/reagent/drink, /singleton/reagent/alcohol) + /// List of fusion reactions and associated data. + var/list/fusion_codex_data = list() + /datum/controller/subsystem/codex/Initialize() //We don't build the codex in fastboot, it's slow and kind of pointless for tests if(GLOB.config.fastboot) @@ -19,19 +23,20 @@ SUBSYSTEM_DEF(codex) else generate_cooking_codex() generate_chemistry_codex() - log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(chemistry_codex_data)] chemistry recipes.") + generate_fusion_codex() + log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(chemistry_codex_data)] chemistry recipes; [length(fusion_codex_data)] fusion recipes;") return SS_INIT_SUCCESS /datum/controller/subsystem/codex/proc/generate_cooking_codex() var/list/available_recipes = GET_SINGLETON_SUBTYPE_MAP(/singleton/recipe) - for (var/recipe_path in available_recipes) - var/singleton/recipe/recipe = GET_SINGLETON(recipe_path) - var/list/recipe_data = list() + for (var/reaction_path in available_recipes) + var/singleton/recipe/recipe = GET_SINGLETON(reaction_path) + var/list/cookingRecipeData = list() // result var/obj/item/recipe_result = recipe.result - recipe_data["result"] = initial(recipe_result.name) + cookingRecipeData["result"] = initial(recipe_result.name) // result image var/icon/result_icon = icon( @@ -39,42 +44,42 @@ SUBSYSTEM_DEF(codex) icon_state=initial(recipe_result.icon_state), frame=1, ) - recipe_data["result_image"] = icon2base64(result_icon) + cookingRecipeData["result_image"] = icon2base64(result_icon) // ingredients - recipe_data["ingredients"] = list() + cookingRecipeData["ingredients"] = list() // ingredients, items if(recipe.items) for(var/ingredient_path in recipe.items) var/obj/item/ingredient = ingredient_path - recipe_data["ingredients"] += initial(ingredient.name) + cookingRecipeData["ingredients"] += initial(ingredient.name) // ingredients, fruits if(recipe.fruit) for(var/fruit_name in recipe.fruit) var/count = recipe.fruit[fruit_name] - recipe_data["ingredients"] += "[count]x [fruit_name]" + cookingRecipeData["ingredients"] += "[count]x [fruit_name]" // ingredients, reagents if(recipe.reagents) for(var/reagent_path in recipe.reagents) var/count = recipe.reagents[reagent_path] var/singleton/reagent/reagent = GET_SINGLETON(reagent_path) - recipe_data["ingredients"] += "[count]u [reagent.name]" + cookingRecipeData["ingredients"] += "[count]u [reagent.name]" // coating if(recipe.coating) var/singleton/reagent/reagent = GET_SINGLETON(recipe.coating) - recipe_data["ingredients"] += "[reagent.name] coating" + cookingRecipeData["ingredients"] += "[reagent.name] coating" // kitchen appliance if(recipe.appliance) - recipe_data["appliances"] = recipe.get_appliance_names() + cookingRecipeData["appliances"] = recipe.get_appliance_names() // fin - recipe_data["ingredients"] = english_list(recipe_data["ingredients"]) - cooking_codex_data += list(recipe_data) + cookingRecipeData["ingredients"] = english_list(cookingRecipeData["ingredients"]) + cooking_codex_data += list(cookingRecipeData) /datum/controller/subsystem/codex/proc/generate_chemistry_codex() chemistry_codex_data = list() @@ -87,40 +92,89 @@ SUBSYSTEM_DEF(codex) if(chemistry_codex_ignored_result_path && is_path_in_list(CR.result, chemistry_codex_ignored_result_path)) continue var/singleton/reagent/R = GET_SINGLETON(CR.result) - var/reactionData = list(id = CR.id) - reactionData["result"] = list( + var/chemistryReactionData = list(id = CR.id) + chemistryReactionData["result"] = list( name = R.name, description = R.description, amount = CR.result_amount ) - reactionData["reagents"] = list() + chemistryReactionData["reagents"] = list() for(var/reagent in CR.required_reagents) var/singleton/reagent/required_reagent = reagent - reactionData["reagents"] += list(list( + chemistryReactionData["reagents"] += list(list( name = initial(required_reagent.name), amount = CR.required_reagents[reagent] )) - reactionData["catalysts"] = list() + chemistryReactionData["catalysts"] = list() for(var/reagent_path in CR.catalysts) var/singleton/reagent/required_reagent = reagent_path - reactionData["catalysts"] += list(list( + chemistryReactionData["catalysts"] += list(list( name = initial(required_reagent.name), amount = CR.catalysts[reagent_path] )) - reactionData["inhibitors"] = list() + chemistryReactionData["inhibitors"] = list() for(var/reagent_path in CR.inhibitors) var/singleton/reagent/required_reagent = reagent_path var/inhibitor_amount = CR.inhibitors[reagent_path] ? CR.inhibitors[reagent_path] : "Any" - reactionData["inhibitors"] += list(list( + chemistryReactionData["inhibitors"] += list(list( name = initial(required_reagent.name), amount = inhibitor_amount )) - reactionData["temp_min"] = CR.required_temperature_min + chemistryReactionData["temp_min"] = CR.required_temperature_min - reactionData["temp_max"] = CR.required_temperature_max + chemistryReactionData["temp_max"] = CR.required_temperature_max - chemistry_codex_data += list(reactionData) + chemistry_codex_data += list(chemistryReactionData) + +/// Generate a list of all fusion reaction fusion_reactions, then populate the codex from that list. +/datum/controller/subsystem/codex/proc/generate_fusion_codex() + fusion_codex_data = list() + var/list/available_fusion_reactions = GET_SINGLETON_SUBTYPE_MAP(/singleton/fusion_reaction) + for (var/reaction_path in available_fusion_reactions) + var/singleton/fusion_reaction/fusion_reaction = GET_SINGLETON(reaction_path) + var/list/fusionReactionData = list() + + var/reaction_name = fusion_reaction.name + if(!reaction_name) + reaction_name = capitalize_first_letters(fusion_reaction.p_react) + "-" + capitalize_first_letters(fusion_reaction.s_react) + + fusionReactionData["name"] = reaction_name + + fusionReactionData["reactants"] = list() + + if(fusion_reaction.p_react == fusion_reaction.s_react) + fusionReactionData["reactants"] += list(list( + name = capitalize_first_letters(fusion_reaction.p_react), + amount = 2 + )) + + else + fusionReactionData["reactants"] += list(list( + name = capitalize_first_letters(fusion_reaction.p_react), + amount = 1 + )) + fusionReactionData["reactants"] += list(list( + name = capitalize_first_letters(fusion_reaction.s_react), + amount = 1 + )) + + fusionReactionData["minimum_temp"] += fusion_reaction.minimum_energy_level + + fusionReactionData["energy_consumption"] += fusion_reaction.energy_consumption + fusionReactionData["energy_production"] += fusion_reaction.energy_production + + fusionReactionData["radiation"] += fusion_reaction.radiation + fusionReactionData["instability"] += fusion_reaction.instability + + fusionReactionData["products"] = list() + for(var/product in fusion_reaction.products) + fusionReactionData["products"] += list(list( + name = capitalize_first_letters(product), + amount = fusion_reaction.products[product] + )) + + fusion_codex_data += list(fusionReactionData) diff --git a/code/defines/gases.dm b/code/defines/gases.dm index 3d62ffca155..2bb324645b8 100644 --- a/code/defines/gases.dm +++ b/code/defines/gases.dm @@ -1,6 +1,7 @@ /singleton/xgm_gas/oxygen id = GAS_OXYGEN name = "Oxygen" + desc = "The gas most life forms need to be able to survive. The most famous oxidizer." specific_heat = 20 // J/(mol*K) molar_mass = 0.032 // kg/mol @@ -9,19 +10,21 @@ /singleton/xgm_gas/nitrogen id = GAS_NITROGEN name = "Nitrogen" + desc = "A very common, largely inert gas commonly used as a buffer gas to pad artificial atmospheres to habitable pressures." specific_heat = 20 // J/(mol*K) molar_mass = 0.028 // kg/mol /singleton/xgm_gas/carbon_dioxide id = GAS_CO2 name = "Carbon Dioxide" + desc = "What the fuck is carbon dioxide?" specific_heat = 30 // J/(mol*K) molar_mass = 0.044 // kg/mol /singleton/xgm_gas/phoron id = GAS_PHORON name = "Phoron" - + desc = "A highly toxic, highly flammable, and extremely rare substance with curious, nigh-miraculous properties. More precious and more deadly than even time." //Note that this has a significant impact on TTV yield. //Because it is so high, any leftover phoron soaks up a lot of heat and drops the yield pressure. specific_heat = 200 // J/(mol*K) @@ -39,6 +42,7 @@ /singleton/xgm_gas/hydrogen id = GAS_HYDROGEN name = "Hydrogen" + desc = "A highly flammable gas. Starstuff. 75% of the universe is made of this." specific_heat = 100 molar_mass = 0.002 flags = XGM_GAS_FUEL|XGM_GAS_FUSION_FUEL @@ -46,6 +50,7 @@ /singleton/xgm_gas/sleeping_agent id = GAS_N2O name = "Nitrous Oxide" + desc = "Causes drowsiness, euphoria, and eventually unconsciousness." specific_heat = 40 // J/(mol*K) molar_mass = 0.044 // kg/mol. N2O tile_overlay = "sleeping_agent" @@ -55,22 +60,67 @@ /singleton/xgm_gas/hydrogen/deuterium id = GAS_DEUTERIUM name = "Deuterium" + desc = "A stable isotope of hydrogen. That extra neutron is damned handy for low-temperature fusion reactions." specific_heat = 80 molar_mass = 0.004 /singleton/xgm_gas/hydrogen/tritium id = GAS_TRITIUM name = "Tritium" + desc = "An unstable (radioactive), short-lived isotope of hydrogen. Supremely useful as a fuel source for nuclear fusion. Don't breathe this." molar_mass = 0.006 specific_heat = 60 /singleton/xgm_gas/helium id = GAS_HELIUM name = "Helium" + desc = "An inert gas that makes your voice squeaky. This is Helium-4, the commonplace stuff. Its lightweight cousin, Helium-3, is ten-thousand times rarer." specific_heat = 80 // J/(mol*K) molar_mass = 0.004 // kg/mol flags = XGM_GAS_FUSION_FUEL +/singleton/xgm_gas/heliumfuel + id = GAS_HELIUMFUEL + name = "Helium-3" + desc = "Helium-3 is a stable helium isotope valued for its use in fusion power; it fuses without dangerous neutron radiation and at much lower temperatures. Insanely valuable." + specific_heat = 80 // J/(mol*K) + molar_mass = 0.003 // kg/mol + flags = XGM_GAS_FUSION_FUEL + +/singleton/xgm_gas/vapor + id = GAS_WATERVAPOR + name = "Water Vapor" + desc = "Water, in gas form. Slippery when it condenses on the floor. Hurts a LOT if its hot steam." + tile_overlay = "generic" + overlay_limit = 0.5 + specific_heat = 30 // J/(mol*K) + molar_mass = 0.020 // kg/mol + +/singleton/xgm_gas/sulfurdioxide + id = GAS_SULFUR + name = "Sulfur Dioxide" + desc = "Volcano breath. Also the smell of burnt matches. Venus' atmosphere is full of this stuff." + specific_heat = 30 // J/(mol*K) + molar_mass = 0.044 // kg/mol + +/singleton/xgm_gas/chlorine + id = GAS_CHLORINE + name = "Chlorine" + desc = "Fucks up your lungs AND your eyes AND your skin. Maybe try to avoid it." + tile_color = "#c5f72d" + tile_overlay = "chlorine" + overlay_limit = 0.5 + specific_heat = 5 // J/(mol*K) + molar_mass = 0.017 // kg/mol + flags = XGM_GAS_CONTAMINANT + +/singleton/xgm_gas/nitrogendioxide + id = GAS_NO2 + name = "Nitrogen Dioxide" + desc = "A byproduct of a dozen and more critical chemical industrial processes. Pollution." + specific_heat = 33 // J/(mol*K) + molar_mass = 0.046 // kg/mol + /singleton/xgm_gas/alium id = GAS_ALIEN name = "Aliether" @@ -90,41 +140,3 @@ if(prob(50)) tile_color = RANDOM_RGB overlay_limit = 0.5 - -/singleton/xgm_gas/vapor - id = GAS_STEAM - name = "Steam" - tile_overlay = "generic" - overlay_limit = 0.5 - specific_heat = 30 // J/(mol*K) - molar_mass = 0.020 // kg/mol - -/singleton/xgm_gas/sulfurdioxide - id = GAS_SULFUR - name = "Sulfur Dioxide" - - specific_heat = 30 // J/(mol*K) - molar_mass = 0.044 // kg/mol - -/singleton/xgm_gas/chlorine - id = GAS_CHLORINE - name = "Chlorine" - tile_color = "#c5f72d" - tile_overlay = "chlorine" - overlay_limit = 0.5 - specific_heat = 5 // J/(mol*K) - molar_mass = 0.017 // kg/mol - flags = XGM_GAS_CONTAMINANT - -/singleton/xgm_gas/boron - id = GAS_BORON - name = "Boron" - specific_heat = 11 - molar_mass = 0.011 - flags = XGM_GAS_FUSION_FUEL - -/singleton/xgm_gas/nitrogendioxide - id = GAS_NO2 - name = "Nitrogen Dioxide" - specific_heat = 33 // J/(mol*K) - molar_mass = 0.046 // kg/mol diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 2d8656e00fb..c7426ccc243 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -7,11 +7,11 @@ #define SIGNAL_HELIUM 64 #define SIGNAL_DEUTERIUM 128 #define SIGNAL_TRITIUM 256 -#define SIGNAL_BORON 512 +#define SIGNAL_HELIUMFUEL 512 #define SIGNAL_SULFUR_DIOXIDE 1024 #define SIGNAL_NITROGEN_DIOXIDE 2048 #define SIGNAL_CHLORINE 4096 -#define SIGNAL_STEAM 8192 +#define SIGNAL_WATERVAPOR 8192 /obj/machinery/air_sensor name = "gas sensor" @@ -39,11 +39,11 @@ // 64 for helium concentration // 128 for deuterium concentration // 256 for tritium concentration - // 512 for boron concentration + // 512 for helium-3 concentration // 1024 for sulfur dioxide concentration // 2048 for nitrogen dioxide concentration // 4096 for chlorine concentration - // 8192 for steam concentration + // 8192 for water vapor concentration var/datum/radio_frequency/radio_connection @@ -85,16 +85,16 @@ signal.data[GAS_DEUTERIUM] = round(100*air_sample.gas[GAS_DEUTERIUM]/total_moles,0.1) if(output&SIGNAL_TRITIUM) signal.data[GAS_TRITIUM] = round(100*air_sample.gas[GAS_TRITIUM]/total_moles,0.1) - if(output&SIGNAL_BORON) - signal.data[GAS_BORON] = round(100*air_sample.gas[GAS_BORON]/total_moles,0.1) + if(output&SIGNAL_HELIUMFUEL) + signal.data[GAS_HELIUMFUEL] = round(100*air_sample.gas[GAS_HELIUMFUEL]/total_moles,0.1) if(output&SIGNAL_SULFUR_DIOXIDE) signal.data[GAS_SULFUR] = round(100*air_sample.gas[GAS_SULFUR]/total_moles,0.1) if(output&SIGNAL_NITROGEN_DIOXIDE) signal.data[GAS_NO2] = round(100*air_sample.gas[GAS_NO2]/total_moles,0.1) if(output&SIGNAL_CHLORINE) signal.data[GAS_CHLORINE] = round(100*air_sample.gas[GAS_CHLORINE]/total_moles,0.1) - if(output&SIGNAL_STEAM) - signal.data[GAS_STEAM] = round(100*air_sample.gas[GAS_STEAM]/total_moles,0.1) + if(output&SIGNAL_WATERVAPOR) + signal.data[GAS_WATERVAPOR] = round(100*air_sample.gas[GAS_WATERVAPOR]/total_moles,0.1) else signal.data[GAS_OXYGEN] = 0 signal.data[GAS_PHORON] = 0 @@ -105,11 +105,11 @@ signal.data[GAS_HELIUM] = 0 signal.data[GAS_DEUTERIUM] = 0 signal.data[GAS_TRITIUM] = 0 - signal.data[GAS_BORON] = 0 + signal.data[GAS_HELIUMFUEL] = 0 signal.data[GAS_SULFUR] = 0 signal.data[GAS_NO2] = 0 signal.data[GAS_CHLORINE] = 0 - signal.data[GAS_STEAM]= 0 + signal.data[GAS_WATERVAPOR]= 0 signal.data["sigtype"]="status" radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) @@ -157,7 +157,7 @@ var/list/sdata = sensor_information[id_tag] var/list/sensor_data = list("id_tag" = id_tag, "name" = long_name) sensor_data["datapoints"] = list() - for(var/datapoint in list("pressure", "temperature", GAS_OXYGEN, GAS_NITROGEN, GAS_CO2, GAS_PHORON, GAS_HYDROGEN, GAS_N2O, GAS_HELIUM, GAS_DEUTERIUM, GAS_TRITIUM, GAS_BORON, GAS_SULFUR, GAS_NO2, GAS_CHLORINE, GAS_STEAM)) + for(var/datapoint in list("pressure", "temperature", GAS_OXYGEN, GAS_NITROGEN, GAS_CO2, GAS_PHORON, GAS_HYDROGEN, GAS_N2O, GAS_HELIUM, GAS_DEUTERIUM, GAS_TRITIUM, GAS_HELIUMFUEL, GAS_SULFUR, GAS_NO2, GAS_CHLORINE, GAS_WATERVAPOR)) var/unit if(datapoint == "pressure") unit = "kPa" @@ -551,8 +551,8 @@ #undef SIGNAL_HELIUM #undef SIGNAL_DEUTERIUM #undef SIGNAL_TRITIUM -#undef SIGNAL_BORON +#undef SIGNAL_HELIUMFUEL #undef SIGNAL_SULFUR_DIOXIDE #undef SIGNAL_NITROGEN_DIOXIDE #undef SIGNAL_CHLORINE -#undef SIGNAL_STEAM +#undef SIGNAL_WATERVAPOR diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 3ded489fa4c..dc06bd597ca 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -38,7 +38,7 @@ return -1 /obj/machinery/portable_atmospherics/canister/sleeping_agent - name = "Canister: \[N2O\]" + name = "\improper Nitrous Oxide \[N2O\]" icon_state = "redws" canister_color = "redws" can_label = 0 @@ -47,15 +47,15 @@ air_contents.adjust_gas(GAS_N2O, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/nitrogen - name = "Canister: \[N2\]" + name = "\improper Nitrogen \[N2\]" icon_state = "red" canister_color = "red" can_label = 0 /obj/machinery/portable_atmospherics/canister/nitrogen/prechilled - name = "Canister: \[N2 (Cooling)\]" + name = "\improper Nitrogen (Liquid) \[N2 (Cryo)\]" /obj/machinery/portable_atmospherics/canister/oxygen - name = "Canister: \[O2\]" + name = "\improper Oxygen \[O2\]" icon_state = "blue" canister_color = "blue" can_label = 0 @@ -64,14 +64,14 @@ src.air_contents.adjust_gas(GAS_OXYGEN, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/oxygen/prechilled - name = "Canister: \[O2 (Cryo)\]" + name = "\improper Oxygen (Liquid) \[O2 (Cryo)\]" /obj/machinery/portable_atmospherics/canister/oxygen/prechilled/Initialize() . = ..() src.air_contents.temperature = 80 /obj/machinery/portable_atmospherics/canister/phoron - name = "Canister \[Phoron\]" + name = "\improper Phoron \[Phoron\]" icon_state = "orange" canister_color = "orange" can_label = 0 @@ -80,7 +80,7 @@ src.air_contents.adjust_gas(GAS_PHORON, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/phoron_scarce // replacing on-station canisters with this for scarcity - full-capacity canisters are staying to avoid mapping errors in future - name = "Canister \[Phoron\]" + name = "\improper Phoron \[Phoron\]" icon_state = "orange" canister_color = "orange" can_label = 0 @@ -89,13 +89,13 @@ src.air_contents.adjust_gas(GAS_PHORON, MolesForPressure()/2) // half of the default value /obj/machinery/portable_atmospherics/canister/carbon_dioxide - name = "Canister \[CO2\]" + name = "\improper Carbon Dioxide \[CO2\]" icon_state = "black" canister_color = "black" can_label = 0 /obj/machinery/portable_atmospherics/canister/hydrogen - name = "Canister \[H\]" + name = "\improper Hydrogen \[H\]" icon_state = "purple" canister_color = "purple" can_label = 0 @@ -103,26 +103,26 @@ . = ..() air_contents.adjust_gas(GAS_HYDROGEN, MolesForPressure()) -/obj/machinery/portable_atmospherics/canister/hydrogen/deuterium - name = "Canister \[2H\]" +/obj/machinery/portable_atmospherics/canister/deuterium + name = "\improper Deuterium \[2H\]" icon_state = "teal" canister_color = "teal" can_label = 0 -/obj/machinery/portable_atmospherics/canister/hydrogen/deuterium/Initialize() +/obj/machinery/portable_atmospherics/canister/deuterium/Initialize() . = ..() air_contents.adjust_gas(GAS_DEUTERIUM, MolesForPressure()) -/obj/machinery/portable_atmospherics/canister/hydrogen/tritium - name = "Canister \[3H\]" +/obj/machinery/portable_atmospherics/canister/tritium + name = "\improper Tritium \[3H\]" icon_state = "pink" canister_color = "pink" can_label = 0 -/obj/machinery/portable_atmospherics/canister/hydrogen/tritium/Initialize() +/obj/machinery/portable_atmospherics/canister/tritium/Initialize() . = ..() air_contents.adjust_gas(GAS_TRITIUM, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/helium - name = "\improper Canister \[He\]" + name = "\improper Helium \[He\]" icon_state = "green" canister_color = "green" can_label = 0 @@ -130,20 +130,29 @@ . = ..() air_contents.adjust_gas(GAS_HELIUM, MolesForPressure()) -/obj/machinery/portable_atmospherics/canister/boron - name = "\improper Boron \[B\]" - icon_state = "lightblue" - canister_color = "lightblue" +/obj/machinery/portable_atmospherics/canister/heliumfuel + name = "\improper Helium-3 \[3He\]" + icon_state = "helium3" + canister_color = "helium3" can_label = 0 -/obj/machinery/portable_atmospherics/canister/boron/Initialize() +/obj/machinery/portable_atmospherics/canister/heliumfuel/Initialize() . = ..() - air_contents.adjust_gas(GAS_BORON, MolesForPressure()) + air_contents.adjust_gas(GAS_HELIUMFUEL, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/chlorine name = "\improper Chlorine \[Cl2\]" icon_state = "darkyellow" canister_color = "darkyellow" can_label = 0 + +/// Keeping the chlorine canister with the skull on it seems fun for antags. +/obj/machinery/portable_atmospherics/canister/chlorine/antag + name = "\improper Chlorine \[Cl2\]" + icon_state = "poisonous" + canister_color = "poisonous" + desc = "A canister of Chlorine, with a warning label for poisonous gases." + can_label = 0 + /obj/machinery/portable_atmospherics/canister/chlorine/Initialize() . = ..() air_contents.adjust_gas(GAS_CHLORINE, MolesForPressure()) @@ -166,17 +175,17 @@ . = ..() air_contents.adjust_gas(GAS_NO2, MolesForPressure()) -/obj/machinery/portable_atmospherics/canister/steam - name = "\improper Steam \[H2O\]" +/obj/machinery/portable_atmospherics/canister/watervapor + name = "\improper Water Vapor \[H2O\]" icon_state = "whitebrs" canister_color = "whitebrs" can_label = 0 -/obj/machinery/portable_atmospherics/canister/steam/Initialize() +/obj/machinery/portable_atmospherics/canister/watervapor/Initialize() . = ..() - air_contents.adjust_gas(GAS_STEAM, MolesForPressure()) + air_contents.adjust_gas(GAS_WATERVAPOR, MolesForPressure()) /obj/machinery/portable_atmospherics/canister/air - name = "Canister \[Air\]" + name = "\improper Air \[Air\]" icon_state = "grey" canister_color = "grey" can_label = 0 @@ -188,63 +197,68 @@ start_pressure = 0 can_label = 1 /obj/machinery/portable_atmospherics/canister/empty/air - name = "Canister: \[Air\]" + name = "\improper Air \[Air\]" icon_state = "grey" canister_color = "grey" /obj/machinery/portable_atmospherics/canister/empty/oxygen - name = "Canister: \[O2\]" + name = "\improper Oxygen \[O2\]" icon_state = "blue" canister_color = "blue" /obj/machinery/portable_atmospherics/canister/empty/phoron - name = "Canister \[Phoron\]" + name = "\improper Phoron \[Phoron\]" icon_state = "orange" canister_color = "orange" /obj/machinery/portable_atmospherics/canister/empty/nitrogen - name = "Canister \[N2\]" + name = "\improper Nitrogen \[N2\]" icon_state = "red" canister_color = "red" /obj/machinery/portable_atmospherics/canister/empty/carbon_dioxide - name = "Canister \[CO2\]" + name = "\improper Carbon Dioxide \[CO2\]" icon_state = "black" canister_color = "black" /obj/machinery/portable_atmospherics/canister/empty/sleeping_agent - name = "Canister \[N2O\]" + name = "\improper Nitrous Oxide \[N2O\]" icon_state = "redws" canister_color = "redws" /obj/machinery/portable_atmospherics/canister/empty/hydrogen - name = "Canister \[H\]" + name = "\improper Hydrogen \[H\]" icon_state = "purple" canister_color = "purple" /obj/machinery/portable_atmospherics/canister/empty/hydrogen/deuterium - name = "Canister \[2H\]" + name = "\improper Deuterium \[2H\]" icon_state = "teal" canister_color = "teal" /obj/machinery/portable_atmospherics/canister/empty/hydrogen/tritium - name = "Canister \[3H\]" + name = "\improper Tritium \[3H\]" icon_state = "pink" canister_color = "pink" /obj/machinery/portable_atmospherics/canister/empty/helium - name = "Canister \[He\]" + name = "\improper Helium \[He\]" icon_state = "green" canister_color = "green" -/obj/machinery/portable_atmospherics/canister/empty/boron - name = "Canister \[B\]" - icon_state = "lightblue" - canister_color = "lightblue" +/obj/machinery/portable_atmospherics/canister/empty/heliumfuel + name = "\improper Helium-3 \[3He\]" + icon_state = "helium3" + canister_color = "helium3" /obj/machinery/portable_atmospherics/canister/empty/sulfur_dioxide - name = "Canister \[SO2\]" + name = "\improper Sulfur Dioxide \[SO2\]" icon_state = "lightgreen" canister_color = "lightgreen" /obj/machinery/portable_atmospherics/canister/empty/nitrogen_dioxide - name = "Canister \[NO2\]" + name = "\improper Nitrogen Dioxide \[NO2\]" icon_state = "brown" canister_color = "brown" /obj/machinery/portable_atmospherics/canister/empty/chlorine - name = "Canister \[Cl2\]" + name = "\improper Chlorine \[Cl2\]" icon_state = "darkyellow" canister_color = "darkyellow" -/obj/machinery/portable_atmospherics/canister/empty/steam - name = "Canister \[H2O\]" +/obj/machinery/portable_atmospherics/canister/empty/watervapor + name = "\improper Water Vapor \[H2O\]" + icon_state = "whitebrs" + canister_color = "whitebrs" + +/obj/machinery/portable_atmospherics/canister/deuttrit + name = "\improper Fusion Reactor Cold Ignition Mix \[2H-3H\]" icon_state = "whitebrs" canister_color = "whitebrs" @@ -549,11 +563,11 @@ update_flag "\[Deuterium\]" = "teal", "\[Tritium\]" = "pink", "\[Helium\]" = "green", - "\[Boron\]" = "lightblue", + "\[Helium-3\]" = "helium3", "\[Sulfur Dioxide\]" = "lightgreen", "\[Nitrogen Dioxide\]" = "brown", "\[Chlorine\]" = "darkyellow", - "\[Steam\]" = "whitebrs", + "\[Water Vapor\]" = "whitebrs", "\[CAUTION\]" = "yellow" ) var/label = tgui_input_list(usr, "Choose canister label.", "Gas Canister", colors) @@ -612,10 +626,7 @@ update_flag . = ..() src.air_contents.temperature = 303.15 -/// Keeping the chlorine canister with the skull on it seems fun for antags. -/obj/machinery/portable_atmospherics/canister/chlorine/antag - name = "Canister: \[Cl2\]" - icon_state = "poisonous" - canister_color = "poisonous" - desc = "A canister of Chlorine, with a warning label for poisonous gasses." - can_label = 0 +/obj/machinery/portable_atmospherics/canister/deuttrit/Initialize() + . = ..() + src.air_contents.adjust_gas(GAS_DEUTERIUM, MolesForPressure()) + src.air_contents.adjust_gas(GAS_TRITIUM, MolesForPressure()/3) diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index b8816d2c787..692b1080330 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -17,7 +17,7 @@ var/minrate = 0 var/maxrate = PRESSURE_ONE_THOUSAND - var/list/scrubbing_gas = list(GAS_PHORON, GAS_CO2, GAS_N2O, GAS_HYDROGEN, GAS_HELIUM, GAS_DEUTERIUM, GAS_TRITIUM, GAS_BORON, GAS_SULFUR, GAS_NO2, GAS_CHLORINE, GAS_STEAM) + var/list/scrubbing_gas = list(GAS_PHORON, GAS_CO2, GAS_N2O, GAS_HYDROGEN, GAS_HELIUM, GAS_DEUTERIUM, GAS_TRITIUM, GAS_HELIUMFUEL, GAS_SULFUR, GAS_NO2, GAS_CHLORINE, GAS_WATERVAPOR) /obj/machinery/portable_atmospherics/powered/scrubber/mechanics_hints(mob/user, distance, is_adjacent) . += ..() diff --git a/code/game/machinery/bluespace_drive.dm b/code/game/machinery/bluespace_drive.dm index 45ca4a9e052..026493f660a 100644 --- a/code/game/machinery/bluespace_drive.dm +++ b/code/game/machinery/bluespace_drive.dm @@ -21,16 +21,16 @@ density = TRUE // opacity = TRUE - ///The atmospherics interface used to give gasses to the drive + /// The atmospherics interface used to give gasses to the drive var/obj/machinery/atmospherics/portables_connector/atmos_interface - ///The interface used to give fuel (phoron) to the drive + /// The interface used to give fuel (phoron) to the drive var/obj/machinery/atmospherics/portables_connector/fuel_interface - ///The internal gas that the drive uses, fed by the `atmos_interface` + /// The internal gas that the drive uses, fed by the `atmos_interface` var/datum/gas_mixture/internal_gas = new() - ///The fuel gas that the drive uses, fed by the `fuel_interface` + /// The fuel gas that the drive uses, fed by the `fuel_interface` var/datum/gas_mixture/fuel_gas = new() /** @@ -45,20 +45,17 @@ var/static/list/gas_mole_to_power_factor = list( GAS_PHORON = 1, - /* Common gasses */ - GAS_HYDROGEN = 0.7, - GAS_OXYGEN = 0.9, - GAS_NITROGEN = 0.3, GAS_CO2 = 0.24, - GAS_N2O = 0.5, - - /* Uncommon gasses, if you work out to get them, you deserve better power */ + GAS_NITROGEN = 0.3, + GAS_N2O = 0.32, + GAS_HELIUM = 0.4, + GAS_HYDROGEN = 0.8, + GAS_OXYGEN = 0.85, GAS_SULFUR = 1.2, - GAS_CHLORINE = 1, - GAS_HELIUM = 1.6, - GAS_DEUTERIUM = 1.67, - GAS_TRITIUM = 1.68, - GAS_BORON = 1.69 + GAS_CHLORINE = 2.75, + GAS_DEUTERIUM = 3, + GAS_TRITIUM = 4, + GAS_HELIUMFUEL = 6 ) /** @@ -68,28 +65,28 @@ */ var/static/minimum_phoron_moles_per_jump = 1000 //About half of a full canister - ///The power given to the drive, due to gasses + /// The power given to the drive, due to gases var/power_from_gas - ///The rotation we'll be using to jump + /// The rotation we'll be using to jump var/rotation = 0 - ///The angle we'll be using to jump + /// The angle we'll be using to jump var/angle = 60 - ///If the drive is energized + /// If the drive is energized var/energized = FALSE - ///The looping sound that plays when the drive is energized + /// The looping sound that plays when the drive is energized var/datum/looping_sound/bluespace_drive/energized_looping_sound - ///The timer id for the initiate jump sequence + /// The timer id for the initiate jump sequence var/initiate_jump_timer_id - ///The singularity that this drive made + /// The singularity that this drive made var/obj/singularity/bluespace_drive/our_singularity - ///Our bluespace jump event + /// Our bluespace jump event var/datum/event/bluespace_jump/bluespace_jump_event diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 606aa53ed27..d99e5d2cbd8 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -18,6 +18,7 @@ closed_layer = ABOVE_DOOR_LAYER explosion_resistance = 25 pass_flags_self = PASSDOORS + rad_resistance_modifier = 6 /// Most blast doors are infrequently toggled and sometimes used with regular doors anyways. /// Turning this off prevents awkward zone geometry in places like medbay lobby, for example. diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index df21a1aeca1..7330f37b507 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -88,8 +88,20 @@ Class Procs: init_flags = INIT_MACHINERY_PROCESS_SELF pass_flags_self = PASSMACHINE | LETPASSCLICKS - /// Controlled by a bitflag, differentiates between a few different possible states including the machine being broken or unpowered. - /// See code/__defines/machinery.dm for the possible states. + /** + * 'stat' = 'state'. Controlled by a bitflag, differentiates between a few different possible states including the machine being broken or unpowered. + * These definitions are copypasted from 'code/__DEFINES/machinery.dm' so they can be easily referenced in code. + * SO THAT MEANS IF THEY'VE BEEN UPDATED THERE, MAKE SURE THEY'RE UPDATED HERE! + * + * #define BROKEN 0x1 + * #define NOPOWER 0x2 + * #define POWEROFF 0x4 // TBD. + * #define MAINT 0x8 // Under maintenance. + * #define EMPED 0x10 // Temporary broken by EMP pulse. + * + * #define INOPERABLE(machine) (machine.stat & (BROKEN|NOPOWER|MAINT|EMPED)) + * #define OPERABLE(machine) !INOPERABLE(machine) + */ var/stat = 0 /// Is this machine emagged? var/emagged = 0 diff --git a/code/game/machinery/telecomms/telecommunications.dm b/code/game/machinery/telecomms/telecommunications.dm index 37c9357fb6c..19006b1d349 100644 --- a/code/game/machinery/telecomms/telecommunications.dm +++ b/code/game/machinery/telecomms/telecommunications.dm @@ -21,7 +21,7 @@ density = TRUE anchored = TRUE idle_power_usage = 600 // WATTS - active_power_usage = 2 KILO WATTS + active_power_usage = 15 KILO WATTS /// List of machines this machine is linked to var/list/links = list() diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 4ddfb0a8c39..d8fd0cb0c32 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -86,11 +86,11 @@ /obj/item/book/manual/supermatter_engine - name = "Supermatter Engine Operating Manual" + name = "Supermatter Reactor Operating Manual" icon_state = "bookSupermatter" item_state = "book1" author = "Engineering Encyclopedia" - title = "Supermatter Engine Operating Manual" + title = "Supermatter Reactor Operating Manual" /obj/item/book/manual/supermatter_engine/Initialize() . = ..() @@ -106,17 +106,17 @@
-