From 6fe08f0a4eb0f50db521332ecdcdc7f5791cefc6 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Mon, 6 Jun 2022 20:41:10 -0700 Subject: [PATCH] Rebalancing QCD a bit --- code/__DEFINES/reactions.dm | 1 + code/__DEFINES/research.dm | 2 ++ code/game/machinery/doppler_array.dm | 10 +++++++--- code/modules/atmospherics/auxgm/gas_types.dm | 2 +- .../atmospherics/gasmixtures/reactions.dm | 18 ++++++++++++++---- code/modules/research/techweb/_techweb.dm | 2 +- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index d1329060eb..51c6e3c394 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -27,6 +27,7 @@ #define NOBLIUM_RESEARCH_AMOUNT 25 #define BZ_RESEARCH_SCALE 4 #define BZ_RESEARCH_MAX_AMOUNT 400 +#define QCD_RESEARCH_AMOUNT 2 // often made in absolutely massive quantities due to the simple nature of fusion #define MIASMA_RESEARCH_AMOUNT 6 #define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index e27489380c..013d038f3a 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -73,6 +73,8 @@ TECHWEB_POINT_TYPE_GENERIC = "General Research"\ ) +#define LARGEST_BOMB "bomb" + #define BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve. #define BOMB_TARGET_SIZE (world.system_type == MS_WINDOWS ? 240 : 50000) // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points. // Linux still has old trit fires, so diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 18ed5205be..458f231f4b 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -203,9 +203,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays) point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE) /*****The Point Capper*****/ - if(point_gain > linked_techweb.largest_bomb_value) - var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math - linked_techweb.largest_bomb_value = point_gain + + var/list/largest_values = linked_techweb.largest_values + if(!(LARGEST_BOMB in largest_values)) + largest_values[LARGEST_BOMB] = 0 + if(point_gain > largest_values[LARGEST_BOMB]) + var/old_tech_largest_bomb_value = largest_values[LARGEST_BOMB] //held so we can pull old before we do math + linked_techweb.largest_values[LARGEST_BOMB] = point_gain point_gain -= old_tech_largest_bomb_value var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI) if(D) diff --git a/code/modules/atmospherics/auxgm/gas_types.dm b/code/modules/atmospherics/auxgm/gas_types.dm index cba5dce870..943fdeb14a 100644 --- a/code/modules/atmospherics/auxgm/gas_types.dm +++ b/code/modules/atmospherics/auxgm/gas_types.dm @@ -295,4 +295,4 @@ powermix = -1 transmit_modifier = -10 heat_penalty = -10 - price = 10 + price = 100 // it's kinda really hard to actually get it into a canister diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 122d30f33e..607274f71b 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -759,7 +759,18 @@ var/initial_energy = air.thermal_energy() for(var/g in air.get_gases()) air.set_moles(g, 0) - air.set_moles(GAS_QCD, initial_energy / (air.return_temperature() * GLOB.gas_data.specific_heats[GAS_QCD])) + var/amount = initial_energy / (air.return_temperature() * GLOB.gas_data.specific_heats[GAS_QCD]) + air.set_moles(GAS_QCD, amount) + var/list/largest_values = SSresearch.science_tech.largest_values + if(!(GAS_QCD in largest_values)) + largest_values[GAS_QCD] = 0 + var/previous_largest = largest_values[GAS_QCD] + var/research_amount = amount * QCD_RESEARCH_AMOUNT + if(previous_largest < research_amount) + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, research_amount) + largest_values[GAS_QCD] = research_amount + else + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, research_amount / 100) /datum/gas_reaction/dehagedorn priority = 50 @@ -781,11 +792,10 @@ var/list/gases = GLOB.gas_data.specific_heats.Copy() gases -= GAS_QCD gases -= GAS_TRITIUM // no refusing sorry - for(var/g in gases) - gases[g] = 10000 / gases[g] + gases -= GAS_HYPERNOB // makes it waaay too easy to stabilize it while(energy_remaining > 0) var/G = pick(gases) air.adjust_moles(G, max(0.1, energy_remaining / (gases[G] * new_temp * 20))) energy_remaining = initial_energy - air.thermal_energy() - air.adjust_heat(-energy_remaining) + air.set_temperature(initial_energy / air.heat_capacity()) return REACTING diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index d542694236..dc07a5a184 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -17,7 +17,7 @@ var/list/obj/machinery/computer/rdconsole/consoles_accessing = list() var/id = "generic" var/list/research_logs = list() //IC logs. - var/largest_bomb_value = 0 + var/largest_values = list() var/organization = "Third-Party" //Organization name, used for display. var/list/next_income = list() //To be applied on the next passive techweb income var/list/last_bitcoins = list() //Current per-second production, used for display only.