2
0

GM_T.lua 443 B

123456789101112131415161718192021
  1. local TriggerBase = require("core:erm.TriggerBase")
  2. local GameResumed = require("events.GameResumed")
  3. local trigger = TriggerBase:new()
  4. function trigger:new(o)
  5. o = TriggerBase.new(self, o)
  6. local id1 = o.id[1]
  7. if id1 == 0 or id1 == "0" then
  8. o.sub = GameResumed.subscribeAfter(EVENT_BUS, function(event)
  9. o:call(event)
  10. end)
  11. else
  12. error ("Identifier "..tostring(id1) .. " not supported by !?GM")
  13. end
  14. return o
  15. end
  16. return trigger