Skip to content

Add events for tracking rotation and exposing train id changes#9

Open
kirazy wants to merge 3 commits intoNoxyNixie:masterfrom
kirazy:master
Open

Add events for tracking rotation and exposing train id changes#9
kirazy wants to merge 3 commits intoNoxyNixie:masterfrom
kirazy:master

Conversation

@kirazy
Copy link
Copy Markdown

@kirazy kirazy commented Dec 1, 2024

Adds four events:

  • on_train_rotating
    • Raised when a train will actually rotate, prior to any rotation occurring. Raised for both rotate/unrotate actions.
  • on_train_locomotive_rotated
    • Raised for each locomotive that is rotated, after the new train is created.
  • on_train_rotated
    • Raised after all locomotives have rotated.
  • on_train_unrotating
    • Raised prior to unrotating a train due to a change in train state. Notably, not raised prior to unrotating a train due to disabling Noxy in Map settings.

This sets up a generic way for mods to integrate compatibility with this mod, since the primary pain point is tracking train id changes and when rotations occur.

This is part of a related pull request to integrate compatibility with Project Cybersyn.

It's not rigorously tested...

@NoxyNixie
Copy link
Copy Markdown
Owner

Sorry for the late response. I'm not sure I can merge this as it is. There are too many things that bug me about this PR eventhough I'm okay with the goal of the PR.

  • There are unnecessary whitespace changes.
  • The triple dashed comments are very noisy (I know your tooling might need them but I don't so please remove those)
  • Don't touch info.json I'll do that when I do the actual release.
  • The file remote-interfaces.lua doesn't need to be in a subfolder.
  • I have not touched the changelog for many versions, if you update that one you should include all other changes too or just don't update it.

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