Skip to content

Commit

Permalink
do some more places
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Oct 22, 2024
1 parent bb56131 commit 982c450
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/turfs/katmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ fn send_pressure_differences(
}

#[byondapi::bind("/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools")]
fn equalize_hook(mut src: ByondValue, remaining: ByondValue) {
fn equalize_hook(mut src: ByondValue, remaining: ByondValue) -> Result<ByondValue> {
let equalize_hard_turf_limit = src
.read_number_id(byond_string!("equalize_hard_turf_limit"))
.unwrap_or(2000.0) as usize;
Expand Down
7 changes: 4 additions & 3 deletions src/turfs/superconduct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ pub fn supercond_update_ref(src: ByondValue) -> Result<()> {
id,
adjacent_to_space: src
.call_id(byond_string!("should_conduct_to_space"), &[])?
.as_number()? > 0.0,
.as_number()?
> 0.0,
heat_capacity: therm_cap,
thermal_conductivity: therm_cond,
temperature: RwLock::new(src.read_number("initial_temperature").unwrap_or(TCMB)),
Expand Down Expand Up @@ -218,7 +219,7 @@ pub fn supercond_update_adjacencies(id: u32) -> Result<()> {
}

#[byondapi_hooks::bind("/turf/proc/return_temperature")]
fn hook_turf_temperature() {
fn hook_turf_temperature() -> Result<ByondValue> {
with_turf_heat_read(|arena| -> Result<ByondValue> {
if let Some(&node_index) = arena.get_id(&unsafe { src.raw.data.id }) {
let info = arena.get(node_index).unwrap();
Expand All @@ -237,7 +238,7 @@ fn hook_turf_temperature() {
// Expected function call: process_turf_heat()
// Returns: TRUE if thread not done, FALSE otherwise
#[byondapi_hooks::bind("/datum/controller/subsystem/air/proc/process_turf_heat")]
fn process_heat_notify() {
fn process_heat_notify() -> Result<ByondValue> {
rebuild_turf_graph()?;
/*
Replacing LINDA's superconductivity system is this much more brute-force
Expand Down

0 comments on commit 982c450

Please sign in to comment.