From 30570816b3c460b69e6b410cdddb3e6516b80e22 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 29 Sep 2025 21:22:42 +0200 Subject: Support multiple book pages --- server/protocol/src/helpers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/protocol/src/helpers.rs') 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 { -- cgit v1.2.3-70-g09d2