3 Commits

Author SHA1 Message Date
1a97abe49e update ide-helper 2026-05-09 23:01:54 +03:00
3255b919e2 BaseUI: minor change 2026-05-09 22:58:28 +03:00
2b7600b745 Table: add table.remove_value method 2026-05-09 22:57:45 +03:00
3 changed files with 16 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ end
---@param playerName string ---@param playerName string
function BaseUI:closeForm(playerName) function BaseUI:closeForm(playerName)
core.close_formspec(playerName, self.name) core.close_formspec(playerName, self.name)
Smc.clearActiveFormspec(playerName)
end end

View File

@@ -408,3 +408,17 @@ function table.key_value_list(t, separator)
return result return result
end end
---Finds and removes from the list all elements matching the value.
---@generic value any
---@param list value[]
---@param value value
---@param value[]
function table.remove_value(list, value)
local index = table.indexof(list, value)
while index ~= -1 do
list = table.remove(list, index)
end
return list
end