summaryrefslogtreecommitdiff
path: root/src/room.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-03-04 12:15:58 +0100
committertroido <troido@protonmail.com>2020-03-04 12:15:58 +0100
commit21919636f95a1214b7ed1a3e4aa6527f45b9d073 (patch)
treedfe7a465cdf81048c3ac04b5719571bb0192791f /src/room.rs
parentdaae8b511291b8cc854a8747e64e76c6ff2d462e (diff)
interacting now works
Diffstat (limited to 'src/room.rs')
-rw-r--r--src/room.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/room.rs b/src/room.rs
index 4202251..02a3b75 100644
--- a/src/room.rs
+++ b/src/room.rs
@@ -62,7 +62,8 @@ use crate::{
UpdateCooldowns,
ControlAI,
Die,
- Spawn
+ Spawn,
+ Interact
}
};
@@ -76,11 +77,12 @@ pub fn default_dispatcher<'a, 'b>() -> Dispatcher<'a, 'b> {
.with(ControlAI, "controlai", &["cool_down"])
.with(Take, "take", &["controlinput", "controlai"])
.with(Use, "use", &["controlinput", "controlai"])
+ .with(Interact, "interact", &["controlinput", "controlai"])
.with(Move, "move", &["controlinput", "controlai"])
.with(Trapping, "trapping", &["move"])
.with(Fight, "fight", &["move"])
.with(Heal, "heal", &["registernew"])
- .with(Attacking, "attacking", &["use", "trapping", "fight", "heal"])
+ .with(Attacking, "attacking", &["use", "trapping", "fight", "heal", "interact"])
.with(Die, "die", &["attacking"])
.with(View::default(), "view", &["move", "attacking", "volate", "die"])
.with(Migrate, "migrate", &["view"])
@@ -115,7 +117,7 @@ impl <'a, 'b>Room<'a, 'b> {
world.insert(NewEntities::new(encyclopedia));
register_insert!(
world,
- (Position, Visible, Controller, Movable, Blocking, Floor, New, Removed, Moved, Player, Inventory, Health, Serialise, RoomExit, Entered, Dead, Trap, Fighter, Healing, Volatile, ControlCooldown, Autofight, MonsterAI, Home, Mortal, AttackInbox, Item, Spawner, Clan, Faction),
+ (Position, Visible, Controller, Movable, Blocking, Floor, New, Removed, Moved, Player, Inventory, Health, Serialise, RoomExit, Entered, Dead, Trap, Fighter, Healing, Volatile, ControlCooldown, Autofight, MonsterAI, Home, Mortal, AttackInbox, Item, Spawner, Clan, Faction, Interactable),
(Ground, Input, Output, Size, Spawn, Players, Emigration, TimeStamp)
);