aboutsummaryrefslogtreecommitdiff
path: root/server/protocol/src/helpers.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-29 21:22:42 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-29 21:22:42 +0200
commit30570816b3c460b69e6b410cdddb3e6516b80e22 (patch)
treedbf4c11b053a335f0dd1d988386b6ec124bec237 /server/protocol/src/helpers.rs
parentf804c9e219ec8272ad2d8f62b826323be444b207 (diff)
downloadhurrycurry-30570816b3c460b69e6b410cdddb3e6516b80e22.tar
hurrycurry-30570816b3c460b69e6b410cdddb3e6516b80e22.tar.bz2
hurrycurry-30570816b3c460b69e6b410cdddb3e6516b80e22.tar.zst
Support multiple book pages
Diffstat (limited to 'server/protocol/src/helpers.rs')
-rw-r--r--server/protocol/src/helpers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/protocol/src/helpers.rs b/server/protocol/src/helpers.rs
index 542f7754..b5c0e82b 100644
--- a/server/protocol/src/helpers.rs
+++ b/server/protocol/src/helpers.rs
@@ -2,7 +2,7 @@ use crate::{Gamedata, Hand, ItemIndex, ItemLocation, PlayerID, Recipe, RecipeInd
use std::fmt::Display;
impl Gamedata {
- pub fn tile_name(&self, index: TileIndex) -> &String {
+ pub fn tile_name(&self, index: TileIndex) -> &str {
&self.tile_names[index.0]
}
pub fn is_tile_colliding(&self, index: TileIndex) -> bool {
@@ -11,7 +11,7 @@ impl Gamedata {
pub fn is_tile_interactable(&self, index: TileIndex) -> bool {
self.tile_interact[index.0]
}
- pub fn item_name(&self, index: ItemIndex) -> &String {
+ pub fn item_name(&self, index: ItemIndex) -> &str {
&self.item_names[index.0]
}
pub fn recipe(&self, index: RecipeIndex) -> &Recipe {