Minor bugfix: doors shouldn't swing shut if they are already closed.
This commit is contained in:
parent
d1a5a4d2fa
commit
f0aa3d1d08
@ -64,10 +64,8 @@ impl TaskHandler for SwingShutHandler {
|
|||||||
.as_mut()
|
.as_mut()
|
||||||
.and_then(|ds| ds.get_mut(&direction))
|
.and_then(|ds| ds.get_mut(&direction))
|
||||||
{
|
{
|
||||||
None => {
|
Some(v) if v.open => v,
|
||||||
return Ok(None);
|
_ => return Ok(None),
|
||||||
}
|
|
||||||
Some(v) => v,
|
|
||||||
};
|
};
|
||||||
(*door_state).open = false;
|
(*door_state).open = false;
|
||||||
ctx.trans.save_item_model(&room_item_mut).await?;
|
ctx.trans.save_item_model(&room_item_mut).await?;
|
||||||
|
Loading…
Reference in New Issue
Block a user