building_lib/events.spec.lua
BuckarooBanzay 16fb3129ae events
2022-11-10 10:58:50 +01:00

16 lines
295 B
Lua

mtt.register("events", function(callback)
local success = false
building_lib.register_on("my_event", function(x,y)
if x == 1 and y == 2 then
success = true
end
end)
building_lib.fire_event("my_event", 1, 2)
assert(success)
callback()
end)