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

Fix being able to ctrl-k external factories #6699

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Mar 22, 2025

Issue

You could ctrl-k external factories and they would be gone forever.

Description of the proposed changes

  • Sets CanBeKilled to false so that the factories cannot die.
  • Since they cannot be killed anymore, Destroy must be called. External factories have no visuals or gameplay so none of that code should apply. @relent0r said that AI uses .ExternalFactory on the parent unit to interact with external factories, so the OnKilled callback no longer firing should also not be relevant.

Testing done on the proposed changes

  • Ordering an external factory to kill itself does not do anything.
  • External factories are destroyed when the parent dies. Without the relevant change, they were draining resources while the parent unit was dead but not destroyed (for example when sinking).

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@lL1l1 lL1l1 added type: bug feature: mobile factories related to mobile factory functionality labels Mar 22, 2025
@lL1l1 lL1l1 marked this pull request as ready for review March 22, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mobile factories related to mobile factory functionality type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant