From b1662a33383a0bc7b22f64d0ba0b477b634d7ad2 Mon Sep 17 00:00:00 2001 From: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com> Date: Wed, 3 May 2023 09:51:50 +0200 Subject: [PATCH] Hide and Seek `is_player_seeker` and `set_player_seeker` (#379) * HnS globals * no need for global index --- mods/hide-and-seek.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mods/hide-and-seek.lua b/mods/hide-and-seek.lua index 0175d787..3efb84a5 100644 --- a/mods/hide-and-seek.lua +++ b/mods/hide-and-seek.lua @@ -537,3 +537,13 @@ for i = 0, (MAX_PLAYERS - 1) do hook_on_sync_table_change(gPlayerSyncTable[i], "seeking", i, on_seeking_changed) network_player_set_description(gNetworkPlayers[i], "seeker", 255, 64, 64, 255) end + +_G.HideAndSeek = { + is_player_seeker = function (playerIndex) + return gPlayerSyncTable[playerIndex].seeking + end, + + set_player_seeker = function (playerIndex, seeking) + gPlayerSyncTable[playerIndex].seeking = seeking + end, +}