Hopefully fixes another source of long timer singlecaps (#64316)

* Hopefully fixes another source of long timer singlecaps

Very similar to 87fbe4c205 (#62415)

Got a ping from mothblocks complaining about "Mass bombing" and "Unplayable rounds" on sybil, caused by long timer singlecaps.
I'm like 90% sure they're using bz's slow heating to achieve this. So I'm just gonna cap bz production at 20 degress above room temp. It's not like you're going to be doing fabrication at this temperature anyway, so this isn't horribly impactful.

For the curious among you, bz scales its temperature increase inversely to its pressure, among other factors.
This scaling is VERY harsh, so at high pressures it barely creates any heat at all.

Insert discussion of single caps, cursed problems, and salt prs here.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
LemonInTheDark
2022-01-22 23:46:15 -08:00
committed by GitHub
co-authored by Mothblocks
parent e541ee66bd
commit 5ee5efbcd8
3 changed files with 13 additions and 1 deletions
+9
View File
@@ -166,6 +166,15 @@ GLOBAL_LIST_INIT(testing_global_profiler, list("_PROFILE_NAME" = "Global"))
if(message_admins)
message_admins("[user ? "[ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(user)] " : ""][details][bomb ? " [bomb.name] at [ADMIN_VERBOSEJMP(bomb)]": ""][additional_details ? " [additional_details]" : ""].")
/// Logs the contents of the gasmix to the game log, prefixed by text
/proc/log_atmos(text, datum/gas_mixture/mix)
var/message = text
message += "TEMP=[mix.temperature],MOL=[mix.total_moles()],VOL=[mix.volume]"
for(var/key in mix.gases)
var/list/gaslist = mix.gases[key]
message += "[gaslist[GAS_META][META_GAS_ID]]=[gaslist[MOLES]];"
log_game(message)
/proc/log_say(text)
if (CONFIG_GET(flag/log_say))
WRITE_LOG(GLOB.world_game_log, "SAY: [text]")
+1
View File
@@ -320,6 +320,7 @@
// As of writing this this is calibrated to maxcap at 140L and 160atm.
var/power = (air_contents.volume * (pressure - TANK_FRAGMENT_PRESSURE)) / TANK_FRAGMENT_SCALE
log_atmos("[type] exploded with a power of [power] and a mix of ", air_contents)
dyn_explosion(src, power, flash_range = 1.5, ignorecap = FALSE)
return ..()
@@ -485,7 +485,8 @@
/datum/gas_reaction/bzformation/init_reqs()
requirements = list(
/datum/gas/nitrous_oxide = 10,
/datum/gas/plasma = 10
/datum/gas/plasma = 10,
"MAX_TEMP" = T20C + 20 // Yes, someone used this as a bomb timer. I hate players
)
/datum/gas_reaction/bzformation/react(datum/gas_mixture/air)
@@ -493,6 +494,7 @@
var/temperature = air.temperature
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
// This slows down in relation to pressure, very quickly. Please don't expect it to be anything more then a snail
var/reaction_efficency = min(1 / ((pressure / (0.1 * ONE_ATMOSPHERE)) * (max(cached_gases[/datum/gas/plasma][MOLES] / cached_gases[/datum/gas/nitrous_oxide][MOLES], 1))), cached_gases[/datum/gas/nitrous_oxide][MOLES], cached_gases[/datum/gas/plasma][MOLES] * INVERSE(2))
var/energy_released = 2 * reaction_efficency * FIRE_CARBON_ENERGY_RELEASED
if ((cached_gases[/datum/gas/nitrous_oxide][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2 * reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing.