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

Compatibility with Tapeline mod #1

Closed
wants to merge 2 commits into from

Conversation

azaghal
Copy link
Collaborator

@azaghal azaghal commented Jul 9, 2022

The purpose of this pull request is to fix compatibility with the Tapeline mod.

Tapeline mode creates temporary entities as player is drawing the tapelines using the tapeline selection tool.

When such entities are placed when auto-approvals are disabled by Construction Planner, they end-up being picked up as normal ghosts, and leave "phantom" ghost placeholders that can never be built. This problem is solved by adding checks to Construction Planner to see if the ghosts are marked as selectable (Tapeline marks such entities as non-selectable).

The other problem is when Tapeline is dragged over the existing unapproved ghosts. In that case the unapproved ghosts are approved by mistake during the invocation of on_pre_build event handler (as Tapeline's ghost entities are getting built on the surface). This one is a bit trickier to fix, but I think the proposed commit should be a good enough solution (checking if player is holding selection tool and if that selection tools places non-selectable entities/ghosts).

- Fixes compatbility with Tapeline and any other mods that may be
  placing similar types of ghost entities.
- This is specifically related to selection tools that place entities
  as they are being dragged on top of the unapproved ghosts, but only
  in cases where the resulting entities built by such selection tools
  would be marked as non-selectable in game.
- Fixes compatibility with Tapeline mod, where the Tapeline selection
  tool would inadeverently approve the ghosts over which it is
  dragged.
@azaghal
Copy link
Collaborator Author

azaghal commented Nov 3, 2022

I'll close off this pull request just so it does not accidentally get merged (it'll make it a bit harder for me to then merge the fork back into this one). Probably should get off my behind and finally get the fork merged, migrated and closed off, I think it's just going to require a single migration similar to what already exists for the other way around :)

@azaghal azaghal closed this Nov 3, 2022
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.

None yet

2 participants