HelperLib: add active formspecs handler
This commit is contained in:
19
mods/SYSTEM/HelperLib/src/Lib/activeFormspecs.lua
Normal file
19
mods/SYSTEM/HelperLib/src/Lib/activeFormspecs.lua
Normal 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
|
||||
Reference in New Issue
Block a user