mirror of
https://gitlab.com/hoggit/developers/hoggit.git
synced 2025-11-10 15:43:28 +00:00
group_commands -> communication. spacing in utils.lua
This commit is contained in:
parent
d3efee7595
commit
a983d1b2d8
@ -2,4 +2,4 @@ dofile(HOGGIT.script_base..[[\HOGGIT\lib\error_handling.lua]])
|
||||
dofile(HOGGIT.script_base..[[\HOGGIT\lib\logging.lua]])
|
||||
dofile(HOGGIT.script_base..[[\HOGGIT\lib\utils.lua]])
|
||||
dofile(HOGGIT.script_base..[[\HOGGIT\lib\spawner.lua]])
|
||||
dofile(HOGGIT.script_base..[[\HOGGIT\lib\group_commands.lua]])
|
||||
dofile(HOGGIT.script_base..[[\HOGGIT\lib\communication.lua]])
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
HOGGIT.randomInList = function(list)
|
||||
local idx = math.random(1, #list)
|
||||
return list[idx]
|
||||
end
|
||||
local idx = math.random(1, #list)
|
||||
return list[idx]
|
||||
end
|
||||
|
||||
HOGGIT.filterTable = function(t, filter)
|
||||
local out = {}
|
||||
for k,v in pairs(t) do
|
||||
if filter(v) then out[k] = v end
|
||||
end
|
||||
return out
|
||||
local out = {}
|
||||
for k,v in pairs(t) do
|
||||
if filter(v) then out[k] = v end
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
HOGGIT.listContains = function(list, elem)
|
||||
for _, value in ipairs(list) do
|
||||
if value == elem then
|
||||
return true
|
||||
end
|
||||
for _, value in ipairs(list) do
|
||||
if value == elem then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
return false
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user