Skip to content

unify(special-power): Move modules to Core - #3207

Draft
Jaredl-Dev wants to merge 1 commit into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/special-power-modules
Draft

unify(special-power): Move modules to Core#3207
Jaredl-Dev wants to merge 1 commit into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/special-power-modules

Conversation

@Jaredl-Dev

Copy link
Copy Markdown

Moves these seven special-power header/source pairs from the Generals and Zero Hour trees into Core:

  • CashBountyPower
  • CashHackSpecialPower
  • CleanupAreaPower
  • DefectorSpecialPower
  • DemoralizeSpecialPower
  • SpecialAbility
  • SpyVisionSpecialPower

The Generals and Zero Hour versions of all 14 files differed only in their product-name banners, so this is a pure move with no behavior changes.

Validation

  • Win32 Release builds succeed for both Generals and Zero Hour.
  • VC6 Release builds succeed for both Generals and Zero Hour.
  • Verified all 14 files match after normalizing the product-name banner.

@Jaredl-Dev
Jaredl-Dev force-pushed the unify/special-power-modules branch from a0176aa to 5617e28 Compare August 26, 2026 03:15
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Centralize shared special-power modules in Core

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Centralizes seven identical special-power modules in Core for both game variants.
• Rewires Core, Generals, and Zero Hour manifests to use shared sources.
• Records completed moves in the unification script without changing gameplay behavior.
Diagram

graph TD
  G["Generals Build"] --> C["Core Manifest"] --> H["Module Headers"]
  Z["Zero Hour Build"] --> C --> I["Power Sources"] --> H
  S["Unify Script"] -.-> C
Loading
High-Level Assessment

Moving byte-equivalent product copies into Core is the appropriate consolidation strategy. Keeping synchronized duplicates or introducing wrappers would preserve unnecessary maintenance overhead without adding product-specific flexibility.

Files changed (18) +57 / -42

Refactor (14) +0 / -0
CashBountyPower.hCentralize cash bounty declarations +0/-0

Centralize cash bounty declarations

• Moves the shared cash bounty module data and power declarations into Core without behavioral changes.

Core/GameEngine/Include/GameLogic/Module/CashBountyPower.h

CashHackSpecialPower.hCentralize cash hack declarations +0/-0

Centralize cash hack declarations

• Moves the shared cash hack configuration and special-power declarations into Core.

Core/GameEngine/Include/GameLogic/Module/CashHackSpecialPower.h

CleanupAreaPower.hCentralize cleanup area declarations +0/-0

Centralize cleanup area declarations

• Moves the cleanup-area module data and location-targeted power declarations into Core.

Core/GameEngine/Include/GameLogic/Module/CleanupAreaPower.h

DefectorSpecialPower.hCentralize defector power declarations +0/-0

Centralize defector power declarations

• Moves the defector module data and object-targeted special-power declarations into Core.

Core/GameEngine/Include/GameLogic/Module/DefectorSpecialPower.h

DemoralizeSpecialPower.hCentralize demoralize power declarations +0/-0

Centralize demoralize power declarations

• Moves the conditionally compiled demoralize module declarations and configuration data into Core.

Core/GameEngine/Include/GameLogic/Module/DemoralizeSpecialPower.h

SpecialAbility.hCentralize generic special-ability declarations +0/-0

Centralize generic special-ability declarations

• Moves the generic SpecialAbility module declarations into Core for shared product use.

Core/GameEngine/Include/GameLogic/Module/SpecialAbility.h

SpyVisionSpecialPower.hCentralize spy vision declarations +0/-0

Centralize spy vision declarations

• Moves the spy-vision duration data and power declarations into Core.

Core/GameEngine/Include/GameLogic/Module/SpyVisionSpecialPower.h

CashBountyPower.cppCentralize cash bounty implementation +0/-0

Centralize cash bounty implementation

• Moves cash bounty parsing, activation, and serialization behavior into the shared Core implementation.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/CashBountyPower.cpp

CashHackSpecialPower.cppCentralize cash hack implementation +0/-0

Centralize cash hack implementation

• Moves cash-stealing amount selection, transfer, feedback, and serialization behavior into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/CashHackSpecialPower.cpp

CleanupAreaPower.cppCentralize cleanup area implementation +0/-0

Centralize cleanup area implementation

• Moves cleanup-range parsing and CleanupHazardUpdate activation behavior into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/CleanupAreaPower.cpp

DefectorSpecialPower.cppCentralize defector power implementation +0/-0

Centralize defector power implementation

• Moves target validation, team defection, and serialization behavior into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/DefectorSpecialPower.cpp

DemoralizeSpecialPower.cppCentralize demoralize power implementation +0/-0

Centralize demoralize power implementation

• Moves prisoner-scaled range and duration calculation, area effects, and serialization into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/DemoralizeSpecialPower.cpp

SpecialAbility.cppCentralize generic special-ability implementation +0/-0

Centralize generic special-ability implementation

• Moves generic object, location, and untargeted special-power dispatch behavior into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialAbility.cpp

SpyVisionSpecialPower.cppCentralize spy vision implementation +0/-0

Centralize spy vision implementation

• Moves duration calculation, SpyVisionUpdate activation, and serialization behavior into Core.

Core/GameEngine/Source/GameLogic/Object/SpecialPower/SpyVisionSpecialPower.cpp

Other (4) +57 / -42
CMakeLists.txtRegister shared special-power modules in Core +14/-14

Register shared special-power modules in Core

• Enables the seven headers and seven source files in the Core GameEngine source manifest so both products can compile the shared implementations.

Core/GameEngine/CMakeLists.txt

CMakeLists.txtStop compiling Generals-local special-power copies +14/-14

Stop compiling Generals-local special-power copies

• Comments out the seven local header/source pairs so the Generals build resolves them from Core instead.

Generals/Code/GameEngine/CMakeLists.txt

CMakeLists.txtStop compiling Zero Hour-local special-power copies +14/-14

Stop compiling Zero Hour-local special-power copies

• Comments out the seven local header/source pairs so the Zero Hour build resolves them from Core instead.

GeneralsMD/Code/GameEngine/CMakeLists.txt

unify_move_files.pyRecord special-power unification moves +15/-0

Record special-power unification moves

• Adds commented migration commands for all seven header/source pairs, documenting their completed move from Zero Hour to Core.

scripts/cpp/unify_move_files.py

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@Jaredl-Dev
Jaredl-Dev marked this pull request as draft August 26, 2026 07:01
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.

1 participant