Skip to content

[TA Sub-PR 16] Synchronize cloak transitions, engine calls, and target evaluation for attached technos - #2473

Open
FS-21 wants to merge 1 commit into
Phobos-developers:feature/techno-attachmentfrom
FS-21:feature/ta-subpr-16-cloak-synchronization
Open

FS-21 wants to merge 1 commit into
Phobos-developers:feature/techno-attachmentfrom
FS-21:feature/ta-subpr-16-cloak-synchronization

Conversation

@FS-21

@FS-21 FS-21 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

This is the split nº 16 (of 16 commits aprox.) of the PR #2437 for code review as suggested by the original author.

Once reviewed all 16 I should merge them into TA branch and then update the branch with latest develop to have TA updated.

What kind of change is this?

  • New feature, vanilla bugfix or enhancement of a released feature - changelog, docs and credits entries are needed.
  • Improvement to a new (unreleased) feature - docs and credits entries are needed; no changelog entry (Skip Changelog).
  • Bugfix to a new (unreleased) feature - credits entry is needed; no changelog or docs entries (Skip Changelog, Skip Docs).
  • Bugfix to an old (released) feature - changelog and credits entries are needed; no docs entry (Skip Docs).
  • Completely minor change (e.g. a typo fix) - no entries are needed (Skip Changelog, Skip Docs, Skip Credits).

The next text is generated by AI:

Summary

Synchronizes cloak transitions and state effects between parent and attached child technos, preventing desyncs and illegal targeting:

  • Bi-directional Cloak & Uncloak synchronization: Hooked engine Cloak and Uncloak calls across unit, infantry, building, and aircraft classes so parent and child transitions trigger together when InheritStateEffects is enabled. Also unselects children when cloaked.
  • Dedicated cloak state handling: Attached units skip the standard vanilla cloak update routine to avoid conflicting states, while AI() synchronizes CloakState, CloakProgress, IsImmobilized, and ForceShielded. Cleanly uncloaks non-cloakable children upon detachment or destruction.
  • Target evaluation against cloaked objects: Ensures attached units respect stealth by returning FireError::ILLEGAL and converting attack cursor actions to Action::None if the target is cloaked and undetected by the owning house.

@FS-21 FS-21 added No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. Skip Changelog PR does not need a changelog entry in docs/Whats-New.md Skip Docs PR does not need a documentation entry Skip Credits PR does not need a credits entry in CREDITS.md labels Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. Skip Changelog PR does not need a changelog entry in docs/Whats-New.md Skip Credits PR does not need a credits entry in CREDITS.md Skip Docs PR does not need a documentation entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant