mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
Make it fancy
This commit is contained in:
parent
38ccde5456
commit
7535506671
@ -419,13 +419,14 @@ end
|
|||||||
function Event.generate_event_name(name)
|
function Event.generate_event_name(name)
|
||||||
local event_id = generate_event_name()
|
local event_id = generate_event_name()
|
||||||
|
|
||||||
-- If we're in debug, we add the event to defines.events in order to list it via the debugger.
|
|
||||||
if _DEBUG then
|
|
||||||
defines.events[name] = event_id -- luacheck: ignore 122
|
defines.events[name] = event_id -- luacheck: ignore 122
|
||||||
end
|
|
||||||
|
|
||||||
return event_id
|
return event_id
|
||||||
end
|
end
|
||||||
|
-- If we're not in debug, we just turn the above function into an alias of script.generate_event_name
|
||||||
|
if not _DEBUG then
|
||||||
|
Event.generate_event_name = generate_event_name
|
||||||
|
end
|
||||||
|
|
||||||
local function add_handlers()
|
local function add_handlers()
|
||||||
for event_name, tokens in pairs(token_handlers) do
|
for event_name, tokens in pairs(token_handlers) do
|
||||||
|
Loading…
Reference in New Issue
Block a user