Skip to content

Commit 9eb7618

Browse files
authored
Revert "Make hotspots go out easier. (ParadiseSS13#29805)" (ParadiseSS13#30136)
This reverts commit c0acf19.
1 parent 0a50f63 commit 9eb7618

8 files changed

Lines changed: 6 additions & 65 deletions

File tree

code/__DEFINES/rust.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@
111111
/proc/create_hotspot(turf/T, hotspot_temperature, hotspot_volume)
112112
return RUSTLIB_CALL(milla_create_hotspot, T, hotspot_temperature, hotspot_volume)
113113

114-
/proc/extinguish_hotspot(turf/T)
115-
RUSTLIB_CALL(milla_extinguish_hotspot, T)
116-
117114
/proc/track_pressure_tiles(atom/A, radius)
118115
var/turf/T = get_turf(A)
119116
if(istype(T))

code/game/turfs/simulated.dm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,15 @@
7575
if(!found)
7676
return
7777

78-
var/datum/milla_safe/quench/milla = new()
78+
var/datum/milla_safe/turf_cool/milla = new()
7979
milla.invoke_async(src, delta, divisor)
8080

81-
/datum/milla_safe/quench
81+
/datum/milla_safe/turf_cool
8282

83-
/datum/milla_safe/quench/on_run(turf/T, delta, divisor)
83+
/datum/milla_safe/turf_cool/on_run(turf/T, delta, divisor)
8484
var/datum/gas_mixture/air = get_turf_air(T)
8585
air.set_temperature(max(min(air.temperature()-delta * divisor,air.temperature() / divisor), TCMB))
8686
air.react()
87-
extinguish_hotspot(T)
8887

8988
/*
9089
* Makes a turf slippery using the given parameters

rust/src/milla/api.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -594,49 +594,6 @@ pub(crate) fn internal_create_hotspot(
594594
Ok(())
595595
}
596596

597-
/// BYOND API for a heat source creating a hotspot on a tile.
598-
#[byondapi::bind]
599-
fn milla_extinguish_hotspot(
600-
turf: ByondValue,
601-
) -> eyre::Result<ByondValue> {
602-
logging::setup_panic_handler();
603-
let (x, y, z) = byond_xyz(&turf)?.coordinates();
604-
605-
internal_extinguish_hotspot(
606-
x as i32 - 1,
607-
y as i32 - 1,
608-
z as i32 - 1,
609-
)?;
610-
Ok(ByondValue::null())
611-
}
612-
613-
/// Rust version of a heat source creating a hotspot.
614-
pub(crate) fn internal_extinguish_hotspot(
615-
x: i32,
616-
y: i32,
617-
z: i32,
618-
) -> Result<()> {
619-
let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
620-
let active = buffers.get_active().read().unwrap();
621-
let maybe_z_level = active.0[z as usize].try_write();
622-
if maybe_z_level.is_err() {
623-
return Err(eyre!(
624-
"Tried to write during asynchronous, read-only atmos. Use a /datum/milla_safe/..."
625-
));
626-
}
627-
let mut z_level = maybe_z_level.unwrap();
628-
let tile = z_level.get_tile_mut(ZLevel::maybe_get_index(x, y).ok_or(eyre!(
629-
"Bad coordinates ({}, {}, {})",
630-
x + 1,
631-
y + 1,
632-
z + 1
633-
))?);
634-
635-
tile.hotspot_temperature = 0.0;
636-
tile.hotspot_volume = 0.0;
637-
Ok(())
638-
}
639-
640597
/// BYOND API for tracking the pressure of all nearby tiles next tick.
641598
#[byondapi::bind]
642599
fn milla_track_pressure_tiles(

rust/src/milla/constants.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,3 @@ pub(crate) const BYOND_WIND_MULTIPLIER: f32 = 0.5;
204204
/// The smallest temperature allowed for the purpose of caluclating pressure.
205205
/// Prevents weirdness from absolute-zero gas having no pressure at all.
206206
pub(crate) const MINIMUM_TEMPERATURE_FOR_PRESSURE: f32 = 1.0;
207-
208-
/// How much of the excess temperature in a hotspot should be lost to the tile every tick.
209-
/// Makes hotspots die out if they're not burning fast enough.
210-
pub(crate) const HOTSPOT_CONDUCTION: f32 = 0.1;

rust/src/milla/simulate.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -637,22 +637,14 @@ pub(crate) fn react(my_next_tile: &mut Tile, hotspot_step: bool) {
637637
// THEN we can add in the new thermal energy.
638638
thermal_energy += PLASMA_BURN_ENERGY * plasma_burnt;
639639
// Recalculate temperature for any subsequent reactions.
640-
cached_temperature = thermal_energy / cached_heat_capacity;
640+
// (or we would, but this is the last reaction)
641+
//cached_temperature = thermal_energy / cached_heat_capacity;
641642

642643
my_next_tile.fuel_burnt += plasma_burnt;
643644
}
644645

645646
if hotspot_step {
646-
// Conduct some temperature to the tile.
647-
let mut conduction = 0.0;
648-
let tile_temperature = my_next_tile.temperature();
649-
let temperature_difference = cached_temperature - tile_temperature;
650-
if temperature_difference > 0.0 {
651-
let excess_thermal_energy = temperature_difference * cached_heat_capacity;
652-
conduction = excess_thermal_energy * HOTSPOT_CONDUCTION;
653-
my_next_tile.thermal_energy += conduction;
654-
}
655-
adjust_hotspot(my_next_tile, thermal_energy - initial_thermal_energy - conduction);
647+
adjust_hotspot(my_next_tile, thermal_energy - initial_thermal_energy);
656648
} else {
657649
my_next_tile.thermal_energy += thermal_energy - initial_thermal_energy;
658650
}

rustlibs.dll

-2.41 KB
Binary file not shown.

rustlibs_prod.dll

-6.08 KB
Binary file not shown.

tools/ci/librustlibs_ci.so

-1.71 KB
Binary file not shown.

0 commit comments

Comments
 (0)