Minor bugfix: doors shouldn't swing shut if they are already closed.

This commit is contained in:
Condorra 2024-01-29 21:54:42 +11:00
parent d1a5a4d2fa
commit f0aa3d1d08

View File

@ -64,10 +64,8 @@ impl TaskHandler for SwingShutHandler {
.as_mut()
.and_then(|ds| ds.get_mut(&direction))
{
None => {
return Ok(None);
}
Some(v) => v,
Some(v) if v.open => v,
_ => return Ok(None),
};
(*door_state).open = false;
ctx.trans.save_item_model(&room_item_mut).await?;