Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factorio 2.0 changes for stdlib #166

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
7 changes: 1 addition & 6 deletions stdlib/event/event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Event.script = {
on_load = script.on_load,
on_configuration_changed = script.on_configuration_changed,
generate_event_name = script.generate_event_name,
get_event_handler = script.get_event_handler
get_event_handler = script.get_event_handler,
}

local Type = require('__stdlib__/stdlib/utils/type')
Expand All @@ -66,11 +66,6 @@ if not config.skip_script_protections then -- Protections for post and pre regis
error('Detected attempt to add the STDLIB event module after using script.on_event')
end
end
for name in pairs(Event.script) do
_G.script[name] = function()
error('Detected attempt to register an event using script.' .. name .. ' while using the STDLIB event system ')
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted this as well. Not sure how to otherwise fix it.

end

local bootstrap_events = {
Expand Down