aboutsummaryrefslogtreecommitdiff
path: root/server/src/data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/data.rs')
-rw-r--r--server/src/data.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/data.rs b/server/src/data.rs
index 9f03b1ea..d138f360 100644
--- a/server/src/data.rs
+++ b/server/src/data.rs
@@ -123,6 +123,9 @@ impl Gamedata {
pub fn get_tile(&self, name: &str) -> Option<TileIndex> {
self.tile_names.iter().position(|t| t == name)
}
+ pub fn get_item(&self, name: &str) -> Option<TileIndex> {
+ self.item_names.iter().position(|t| t == name)
+ }
}
impl Action {
pub fn duration(&self) -> f32 {