summaryrefslogtreecommitdiff
path: root/src/systems
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-03 23:25:20 +0200
committertroido <troido@protonmail.com>2020-04-03 23:25:20 +0200
commit0b17829846adf9482b460e4cc616382ede1df6dd (patch)
tree2f02dd93b1cd4cd7615341644ddeb94ed0dfc422 /src/systems
parentdb473bbab28847bed5f26fb443ef8a1db2d932a3 (diff)
private rooms work!
Diffstat (limited to 'src/systems')
-rw-r--r--src/systems/migrate.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systems/migrate.rs b/src/systems/migrate.rs
index 80690f3..f9019d8 100644
--- a/src/systems/migrate.rs
+++ b/src/systems/migrate.rs
@@ -1,4 +1,5 @@
+use crate::hashmap;
use specs::{
ReadStorage,
Read,
@@ -27,7 +28,8 @@ impl <'a> System<'a> for Migrate {
for (player, position, _moved) in (&players, &positions, &moved).join() {
for ent in ground.cells.get(&position.pos).unwrap() {
if let Some(exit) = exits.get(*ent) {
- emigration.emigrants.push((player.id.clone(), exit.destination.clone(), exit.dest_pos.clone()));
+ let destination = exit.destination.format(hashmap!("{player}" => player.id.name.as_str()));
+ emigration.emigrants.push((player.id.clone(), destination, exit.dest_pos.clone()));
break;
}
}