Skip to content

Commit

Permalink
This is actually the proper solution
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Nov 16, 2024
1 parent 55a534a commit 5953f15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/turfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,14 @@ fn update_visuals(src: ByondValue) -> Result<ByondValue> {
byond_string!("set_visuals"),
&[overlay_types.as_slice().try_into()?],
)
.wrap_err("Calling set_visuals"))
}
// If air is not defined or is null, just call set_visuals with no args
_ => {
return Ok(src
.call_id(byond_string!("set_visuals"), &[])
.wrap_err("Calling set_visuals with no args"));
.wrap_err("Calling set_visuals")?)
}
// If air is null, clear the visuals
Ok(_) => Ok(src
.call_id(byond_string!("set_visuals"), &[])
.wrap_err("Calling set_visuals with no args")?),
// If air is not defined, it must be a closed turf. Do .othing
Err(_) => Ok(ByondValue::null()),
}
}

Expand Down

0 comments on commit 5953f15

Please sign in to comment.