Skip to content

Commit

Permalink
FIX: Interior sky and water are not mutually exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
magicaldave committed Oct 15, 2024
1 parent eddab49 commit 037dbf2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/game_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<u32>() {
flags |= CellFlags::BEHAVES_LIKE_EXTERIOR;
}

if let Ok(_) = get_prop("HasWater", entity_props).parse::<u32>() {
flags |= CellFlags::HAS_WATER
} else if let Ok(_) = get_prop("FakeExterior", entity_props).parse::<u32>() {
flags |= CellFlags::BEHAVES_LIKE_EXTERIOR
} else if let Ok(_) = get_prop("RestIsIllegal", entity_props).parse::<u32>() {
flags |= CellFlags::RESTING_IS_ILLEGAL
flags |= CellFlags::HAS_WATER;
};

if let Ok(_) = get_prop("RestIsIllegal", entity_props).parse::<u32>() {
flags |= CellFlags::RESTING_IS_ILLEGAL;
};

Cell {
Expand Down

0 comments on commit 037dbf2

Please sign in to comment.