Skip to content

Conversation

@hgschmie
Copy link

  • [FACTORIO 2.0] Renamed global into storage.
  • [FACTORIO 2.0] Added 8 new directions into defines.direction.
  • [FACTORIO 2.0] Fixes event handler registration

If mods are storing any direction values in their storage, they will need to migrate them by multiplying by 2.
2.0 no longer allows assigning values to non-event handlers (1.1
tolerated it, 2.0 throws an error).
@jackiepmueller
Copy link

This looks good to me. I'd put up my own PR but only did what was necessary to get Nanobots working. I have no prior experience with Factorio modding so I'm happy to support this PR.

_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.

from the 2.0.7 changelog:

* Type of LuaObjects is now "userdata" instead of "table".
* Removed __self from the LuaObjects. Intended way of checking if an object is a lua object is to check type is userdata.

Without this change, e.g. Is.Valid does not work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants