diff --git a/code/__DEFINES/rust.dm b/code/__DEFINES/rust.dm index c1fc6a51e75..1ac62650108 100644 --- a/code/__DEFINES/rust.dm +++ b/code/__DEFINES/rust.dm @@ -111,9 +111,6 @@ /proc/create_hotspot(turf/T, hotspot_temperature, hotspot_volume) return RUSTLIB_CALL(milla_create_hotspot, T, hotspot_temperature, hotspot_volume) -/proc/extinguish_hotspot(turf/T) - RUSTLIB_CALL(milla_extinguish_hotspot, T) - /proc/track_pressure_tiles(atom/A, radius) var/turf/T = get_turf(A) if(istype(T)) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 0e6b0677e3d..300d259b064 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -75,16 +75,15 @@ if(!found) return - var/datum/milla_safe/quench/milla = new() + var/datum/milla_safe/turf_cool/milla = new() milla.invoke_async(src, delta, divisor) -/datum/milla_safe/quench +/datum/milla_safe/turf_cool -/datum/milla_safe/quench/on_run(turf/T, delta, divisor) +/datum/milla_safe/turf_cool/on_run(turf/T, delta, divisor) var/datum/gas_mixture/air = get_turf_air(T) air.set_temperature(max(min(air.temperature()-delta * divisor,air.temperature() / divisor), TCMB)) air.react() - extinguish_hotspot(T) /* * Makes a turf slippery using the given parameters diff --git a/rust/src/milla/api.rs b/rust/src/milla/api.rs index 580f1743314..da7db273280 100644 --- a/rust/src/milla/api.rs +++ b/rust/src/milla/api.rs @@ -594,49 +594,6 @@ pub(crate) fn internal_create_hotspot( Ok(()) } -/// BYOND API for a heat source creating a hotspot on a tile. -#[byondapi::bind] -fn milla_extinguish_hotspot( - turf: ByondValue, -) -> eyre::Result { - logging::setup_panic_handler(); - let (x, y, z) = byond_xyz(&turf)?.coordinates(); - - internal_extinguish_hotspot( - x as i32 - 1, - y as i32 - 1, - z as i32 - 1, - )?; - Ok(ByondValue::null()) -} - -/// Rust version of a heat source creating a hotspot. -pub(crate) fn internal_extinguish_hotspot( - x: i32, - y: i32, - z: i32, -) -> Result<()> { - let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?; - let active = buffers.get_active().read().unwrap(); - let maybe_z_level = active.0[z as usize].try_write(); - if maybe_z_level.is_err() { - return Err(eyre!( - "Tried to write during asynchronous, read-only atmos. Use a /datum/milla_safe/..." - )); - } - let mut z_level = maybe_z_level.unwrap(); - let tile = z_level.get_tile_mut(ZLevel::maybe_get_index(x, y).ok_or(eyre!( - "Bad coordinates ({}, {}, {})", - x + 1, - y + 1, - z + 1 - ))?); - - tile.hotspot_temperature = 0.0; - tile.hotspot_volume = 0.0; - Ok(()) -} - /// BYOND API for tracking the pressure of all nearby tiles next tick. #[byondapi::bind] fn milla_track_pressure_tiles( diff --git a/rust/src/milla/constants.rs b/rust/src/milla/constants.rs index 6b0e24d3fcf..75ba648af5d 100644 --- a/rust/src/milla/constants.rs +++ b/rust/src/milla/constants.rs @@ -204,7 +204,3 @@ pub(crate) const BYOND_WIND_MULTIPLIER: f32 = 0.5; /// The smallest temperature allowed for the purpose of caluclating pressure. /// Prevents weirdness from absolute-zero gas having no pressure at all. pub(crate) const MINIMUM_TEMPERATURE_FOR_PRESSURE: f32 = 1.0; - -/// How much of the excess temperature in a hotspot should be lost to the tile every tick. -/// Makes hotspots die out if they're not burning fast enough. -pub(crate) const HOTSPOT_CONDUCTION: f32 = 0.1; diff --git a/rust/src/milla/simulate.rs b/rust/src/milla/simulate.rs index 2329ce213ba..05cd43bd537 100644 --- a/rust/src/milla/simulate.rs +++ b/rust/src/milla/simulate.rs @@ -637,22 +637,14 @@ pub(crate) fn react(my_next_tile: &mut Tile, hotspot_step: bool) { // THEN we can add in the new thermal energy. thermal_energy += PLASMA_BURN_ENERGY * plasma_burnt; // Recalculate temperature for any subsequent reactions. - cached_temperature = thermal_energy / cached_heat_capacity; + // (or we would, but this is the last reaction) + //cached_temperature = thermal_energy / cached_heat_capacity; my_next_tile.fuel_burnt += plasma_burnt; } if hotspot_step { - // Conduct some temperature to the tile. - let mut conduction = 0.0; - let tile_temperature = my_next_tile.temperature(); - let temperature_difference = cached_temperature - tile_temperature; - if temperature_difference > 0.0 { - let excess_thermal_energy = temperature_difference * cached_heat_capacity; - conduction = excess_thermal_energy * HOTSPOT_CONDUCTION; - my_next_tile.thermal_energy += conduction; - } - adjust_hotspot(my_next_tile, thermal_energy - initial_thermal_energy - conduction); + adjust_hotspot(my_next_tile, thermal_energy - initial_thermal_energy); } else { my_next_tile.thermal_energy += thermal_energy - initial_thermal_energy; } diff --git a/rustlibs.dll b/rustlibs.dll index 75ec05538e4..0cd18b427ef 100644 Binary files a/rustlibs.dll and b/rustlibs.dll differ diff --git a/rustlibs_prod.dll b/rustlibs_prod.dll index a4849ba3850..81ab4e64307 100644 Binary files a/rustlibs_prod.dll and b/rustlibs_prod.dll differ diff --git a/tools/ci/librustlibs_ci.so b/tools/ci/librustlibs_ci.so index 5e41bc67fe8..7f20ecfe8f6 100644 Binary files a/tools/ci/librustlibs_ci.so and b/tools/ci/librustlibs_ci.so differ