From 345251f20401a71f7e7e00f4810b92af39ad4395 Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 26 Sep 2020 00:05:03 +0200 Subject: use flags for the whole room instead of room permissions the flags on a tile are the union of the flags from the entity on that tile and the room flags --- src/room.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/room.rs') diff --git a/src/room.rs b/src/room.rs index 6100ce1..db2171a 100644 --- a/src/room.rs +++ b/src/room.rs @@ -23,7 +23,7 @@ use crate::{ Players, Emigration, Time, - RoomPermissions + RoomFlags }, components::{ Position, @@ -126,7 +126,7 @@ impl <'a, 'b>Room<'a, 'b> { register_insert!( world, (Position, Visible, Controller, Movable, New, Removed, Moved, Player, Inventory, Health, Serialise, RoomExit, Entered, TriggerBox, Trap, Fighter, Healing, ControlCooldown, Autofight, MonsterAI, Home, AttackInbox, Item, Spawner, Clan, Faction, Interactable, Loot, Timer, Equipment, TimeOffset, Flags, Ear, Build, Whitelist, Dedup, Minable, LootHolder, OnSpawn, Substitute), - (Ground, Input, Output, Size, Spawn, Players, Emigration, Time, RoomPermissions) + (Ground, Input, Output, Size, Spawn, Players, Emigration, Time, RoomFlags) ); Room { @@ -144,7 +144,7 @@ impl <'a, 'b>Room<'a, 'b> { self.world.fetch_mut::().height = height; self.world.fetch_mut::().pos = template.spawn; - self.world.insert::(template.permissions.clone()); + self.world.insert::(template.flags.clone()); for (idx, templates) in template.field.iter().enumerate() { let x = (idx as i64) % width; -- cgit