From 0d3efa0abdb7467cf47294f26df8231d05568141 Mon Sep 17 00:00:00 2001 From: Sishen Date: Thu, 20 Jun 2019 19:21:12 -0400 Subject: [PATCH] sell gases to get that fuckin bike --- code/__DEFINES/reactions.dm | 5 +++++ .../atmospherics/gasmixtures/reactions.dm | 14 +++++++++++++- code/modules/cargo/exports/large_objects.dm | 17 +++++++++++++++++ code/modules/cargo/packs.dm | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index b72a14468f..1c36120a0c 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -23,6 +23,11 @@ #define STIMULUM_ABSOLUTE_DROP 0.00000335 #define REACTION_OPPRESSION_THRESHOLD 5 #define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense. +//Research point amounts +#define NOBLIUM_RESEARCH_AMOUNT 1000 +#define BZ_RESEARCH_AMOUNT 150 +#define MIASMA_RESEARCH_AMOUNT 160 +#define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties #define FUSION_ENERGY_THRESHOLD 3e9 //Amount of energy it takes to start a fusion reaction #define FUSION_TEMPERATURE_THRESHOLD 1000 //Temperature required to start a fusion reaction diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 46ad4f26b7..ef0a422079 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -95,7 +95,7 @@ cached_gases[/datum/gas/oxygen] -= cached_gases[/datum/gas/tritium] if(burned_fuel) - energy_released += FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel + energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel) if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR) @@ -285,6 +285,7 @@ if(do_explosion) explosion(location, 0, 0, 5, power_ratio, TRUE, TRUE) //large shockwave, the actual radius is quite small - people will recognize that you're doing fusion radiation_pulse(location, radiation_power) //You mean causing a super-tier fusion reaction in the halls is a bad idea? + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, 30000)//The science is cool though. playsound(location, 'sound/effects/supermatter.ogg', 100, 0) else playsound(location, 'sound/effects/phasein.ogg', 75, 0) @@ -350,12 +351,20 @@ var/old_heat_capacity = air.heat_capacity() var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2) var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED + if(cached_gases[/datum/gas/miasma] && cached_gases[/datum/gas/miasma] > 0) + energy_released /= cached_gases[/datum/gas/miasma]*0.1 + if(cached_gases[/datum/gas/bz] && cached_gases[/datum/gas/bz] > 0) + energy_released *= cached_gases[/datum/gas/bz]*0.1 if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/bz] += reaction_efficency + if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide]) + cached_gases[/datum/gas/bz] -= min(pressure,1) + cached_gases[/datum/gas/oxygen] += min(pressure,1) cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency cached_gases[/datum/gas/plasma] -= 2*reaction_efficency + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, (reaction_efficency**0.5)*BZ_RESEARCH_AMOUNT) if(energy_released > 0) var/new_heat_capacity = air.heat_capacity() @@ -390,6 +399,7 @@ cached_gases[/datum/gas/plasma] -= heat_scale cached_gases[/datum/gas/nitryl] -= heat_scale + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, STIMULUM_RESEARCH_AMOUNT*max(stim_energy_change,0)) if(stim_energy_change) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) @@ -418,6 +428,7 @@ cached_gases[/datum/gas/nitrogen] -= 20*nob_formed cached_gases[/datum/gas/hypernoblium]+= nob_formed + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, nob_formed*NOBLIUM_RESEARCH_AMOUNT) if (nob_formed) var/new_heat_capacity = air.heat_capacity() @@ -449,3 +460,4 @@ //Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable air.temperature += cleaned_air * 0.002 + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists \ No newline at end of file diff --git a/code/modules/cargo/exports/large_objects.dm b/code/modules/cargo/exports/large_objects.dm index b5f0e7a240..42fd1cf7ec 100644 --- a/code/modules/cargo/exports/large_objects.dm +++ b/code/modules/cargo/exports/large_objects.dm @@ -131,6 +131,23 @@ unit_name = "security barrier" export_types = list(/obj/item/grenade/barrier, /obj/structure/barricade/security) +/datum/export/large/gas_canister + cost = 10 //Base cost of canister. You get more for nice gases inside. + unit_name = "Gas Canister" + export_types = list(/obj/machinery/portable_atmospherics/canister) +/datum/export/large/gas_canister/get_cost(obj/O) + var/obj/machinery/portable_atmospherics/canister/C = O + var/worth = 10 + var/gases = C.air_contents.gases + + worth += gases[/datum/gas/bz]*4 + worth += gases[/datum/gas/stimulum]*100 + worth += gases[/datum/gas/hypernoblium]*1000 + worth += gases[/datum/gas/miasma]*10 + worth += gases[/datum/gas/tritium]*5 + worth += gases[/datum/gas/pluoxium]*5 + return worth + /datum/export/large/odysseus cost = 5500 unit_name = "working odysseus" diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 7042913b0d..2975b04029 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1146,7 +1146,7 @@ /datum/supply_pack/materials/bz name = "BZ Canister Crate" desc = "Contains a canister of BZ. Requires Toxins access to open." - cost = 5000 + cost = 7500 // Costs 3 credits more than what you can get for selling it. access = ACCESS_TOX_STORAGE contains = list(/obj/machinery/portable_atmospherics/canister/bz) crate_name = "BZ canister crate"