aboutsummaryrefslogtreecommitdiff
path: root/server/editor/src/main.rs
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2025-04-07 16:29:11 +0200
committernokoe <nokoe@mailbox.org>2025-04-07 16:29:11 +0200
commita51e4f60fcc03649529349227bbe2b28395eebc7 (patch)
treea3da5ce2b00837df98257d8f093b85ac99bf3c2b /server/editor/src/main.rs
parent48a7a20e0f1595cd6e46c8c5136863ed56d5ef2b (diff)
downloadhurrycurry-a51e4f60fcc03649529349227bbe2b28395eebc7.tar
hurrycurry-a51e4f60fcc03649529349227bbe2b28395eebc7.tar.bz2
hurrycurry-a51e4f60fcc03649529349227bbe2b28395eebc7.tar.zst
fix #240; fix #241
Diffstat (limited to 'server/editor/src/main.rs')
-rw-r--r--server/editor/src/main.rs30
1 files changed, 8 insertions, 22 deletions
diff --git a/server/editor/src/main.rs b/server/editor/src/main.rs
index 8577aec1..2c05dfbc 100644
--- a/server/editor/src/main.rs
+++ b/server/editor/src/main.rs
@@ -92,7 +92,7 @@ const TILES: &[(&str, char, u8)] = &[
("coconut-crate", 'u', 0),
("strawberry-crate", 'v', 0),
("rice-crate", 'w', 0),
- ("wall-window", 'x', 0),
+ ("wall-window", 'x', 2),
("freezer", 'y', 0),
("trash", 'z', 0),
("sink", 'A', 0),
@@ -103,6 +103,13 @@ const TILES: &[(&str, char, u8)] = &[
("door", 'F', 1),
("path", 'G', 1),
("book", 'H', 1),
+ ("house-wall", 'I', 2),
+ ("house-side", 'J', 2),
+ ("house-balcony", 'K', 2),
+ ("house-door", 'L', 2),
+ ("house-oriel", 'M', 2),
+ ("house-roof", 'N', 2),
+ ("house-roof-chimney", 'O', 2),
];
#[allow(unused_assignments)]
@@ -237,27 +244,6 @@ impl State {
],
})
}
- // send every existing tile once move because client does not remember
- // TODO remove when client is fixed
- for (tile, _) in &self.tiles {
- self.out.push(PacketC::UpdateMap {
- tile: *tile,
- kind: None,
- neighbors: [None; 4],
- })
- }
- for (tile, kind) in &self.tiles {
- self.out.push(PacketC::UpdateMap {
- tile: *tile,
- kind: Some(*kind),
- neighbors: [
- self.tiles.get(&(tile + IVec2::NEG_Y)).copied(),
- self.tiles.get(&(tile + IVec2::NEG_X)).copied(),
- self.tiles.get(&(tile + IVec2::Y)).copied(),
- self.tiles.get(&(tile + IVec2::X)).copied(),
- ],
- })
- }
self.out.push(PacketC::FlushMap);
}
}