aboutsummaryrefslogtreecommitdiff
path: root/server/game-core/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-19 23:50:23 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-19 23:50:23 +0200
commitab83f982601d93b2399102c4d030fd6e13c4c735 (patch)
treec0536ca9e328707d6b4f4cfc7a2307713466a5be /server/game-core/src/lib.rs
parent231a5ce21fcee9195fcc504ee672e4464d627c47 (diff)
downloadhurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar
hurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar.bz2
hurrycurry-ab83f982601d93b2399102c4d030fd6e13c4c735.tar.zst
Refactor and move interaction code
Diffstat (limited to 'server/game-core/src/lib.rs')
-rw-r--r--server/game-core/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/game-core/src/lib.rs b/server/game-core/src/lib.rs
index cc77e570..994398c9 100644
--- a/server/game-core/src/lib.rs
+++ b/server/game-core/src/lib.rs
@@ -16,9 +16,11 @@
*/
pub mod gamedata_index;
+pub mod interaction;
pub mod network;
pub mod spatial_index;
+use crate::gamedata_index::GamedataIndex;
use hurrycurry_protocol::{
Character, Gamedata, Hand, ItemIndex, ItemLocation, Message, MessageTimeout, PacketC,
PlayerClass, PlayerID, RecipeIndex, Score, TileIndex, glam::IVec2, movement::MovementBase,
@@ -29,7 +31,6 @@ use std::{
sync::Arc,
time::Instant,
};
-use crate::gamedata_index::GamedataIndex;
#[derive(Debug, Clone, PartialEq)]
pub struct Involvement {
@@ -78,6 +79,7 @@ pub struct Game {
pub players_spatial_index: SpatialIndex<PlayerID>,
pub walkable: HashSet<IVec2>,
pub tile_index: HashMap<TileIndex, HashSet<IVec2>>,
+ pub item_locations_index: HashSet<ItemLocation>,
pub events: VecDeque<PacketC>,
}