diff --git a/src/game_object.rs b/src/game_object.rs index cb26e92..e7b0a18 100644 --- a/src/game_object.rs +++ b/src/game_object.rs @@ -129,12 +129,16 @@ pub fn book(entity_props: &HashMap<&String, &String>, ref_id: &str, mesh_name: & pub fn cell(entity_props: &HashMap<&String, &String>, ref_id: &str) -> Cell { let mut flags = CellFlags::default() | CellFlags::IS_INTERIOR; + if let Ok(_) = get_prop("FakeExterior", entity_props).parse::() { + flags |= CellFlags::BEHAVES_LIKE_EXTERIOR; + } + if let Ok(_) = get_prop("HasWater", entity_props).parse::() { - flags |= CellFlags::HAS_WATER - } else if let Ok(_) = get_prop("FakeExterior", entity_props).parse::() { - flags |= CellFlags::BEHAVES_LIKE_EXTERIOR - } else if let Ok(_) = get_prop("RestIsIllegal", entity_props).parse::() { - flags |= CellFlags::RESTING_IS_ILLEGAL + flags |= CellFlags::HAS_WATER; + }; + + if let Ok(_) = get_prop("RestIsIllegal", entity_props).parse::() { + flags |= CellFlags::RESTING_IS_ILLEGAL; }; Cell {