HelperLib: add active formspecs handler

This commit is contained in:
Van
2026-04-03 21:36:08 +03:00
parent 0e59cf799a
commit 7af83a87d8
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
---@type table<string, string>
local activeFormspecsList = {}
---@param playerName string
---@param formName string?
function Smc.setActiveFormspec(playerName, formName)
activeFormspecsList[playerName] = formName
end
---@param playerName string
---@return string?
function Smc.getActiveFormspec(playerName)
return activeFormspecsList[playerName]
end
---@param playerName string
function Smc.clearActiveFormspec(playerName)
Smc.setActiveFormspec(playerName, nil)
end