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()
|
||||
.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?;
|
||||
|
Loading…
Reference in New Issue
Block a user