mirror of
https://gitlab.com/hoggit/developers/hoggit.git
synced 2026-08-13 09:16:19 +00:00
Fixed random list, Fixed MEssage for all
This commit is contained in:
@@ -12,7 +12,7 @@ HOGGIT.GroupCommand = function(group, text, parent, handler)
|
||||
end
|
||||
end
|
||||
HOGGIT.GroupMenuAdded={}
|
||||
GroupMenu = function( groupId, text, parent )
|
||||
HOGGIT.GroupMenu = function( groupId, text, parent )
|
||||
if HOGGIT.GroupMenuAdded[tostring(groupId)] == nil then
|
||||
log("No commands from groupId " .. groupId .. " yet. Initializing menu state")
|
||||
HOGGIT.GroupMenuAdded[tostring(groupId)] = {}
|
||||
@@ -24,13 +24,13 @@ GroupMenu = function( groupId, text, parent )
|
||||
return HOGGIT.GroupMenuAdded[tostring(groupId)][text]
|
||||
end
|
||||
|
||||
MessageToGroup = function(groupId, text, displayTime, clear)
|
||||
HOGGIT.MessageToGroup = function(groupId, text, displayTime, clear)
|
||||
if not displayTime then displayTime = 10 end
|
||||
if clear == nil then clear = false end
|
||||
trigger.action.outTextForGroup( groupId, text, displayTime, clear)
|
||||
end
|
||||
|
||||
MessageToAll = function( text, displayTime )
|
||||
HOGGIT.MessageToAll = function( text, displayTime )
|
||||
if not displayTime then displayTime = 10 end
|
||||
trigger.action.outText( text, displayTime )
|
||||
end
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
HOGGIT.randomInList = function(list)
|
||||
local idx = math.random(1, #list)
|
||||
return list[idx]
|
||||
end
|
||||
|
||||
HOGGIT.filterTable = function(t, filter)
|
||||
local out = {}
|
||||
for k,v in pairs(t) do
|
||||
|
||||
Reference in New Issue
Block a user