Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- function gadget:GetInfo()
- return {
- name = "Action Queuer",
- desc = "",
- author = "quantum",
- date = "Apr 27, 2010",
- license = "GNU GPL, v2 or later",
- layer = -1,
- enabled = true -- loaded by default?
- }
- end
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- if not gadgetHandler:IsSyncedCode() then
- return
- end
- local pendingActions = {}
- function GG.SafeAction(f)
- pendingActions[#pendingActions + 1] = f
- end
- function gadget:GameFrame(currentFrame)
- if currentFrame > 1 then -- only execute actions when the game has started
- for _, action in ipairs(pendingActions) do
- action()
- end
- pendingActions = {}
- end
- end
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement