Skip to content

unify(die): Move Die modules to Core (Withdrawn) - #3205

Closed
Jaredl-Dev wants to merge 0 commit into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/die-modules
Closed

unify(die): Move Die modules to Core (Withdrawn)#3205
Jaredl-Dev wants to merge 0 commit into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/die-modules

Conversation

@Jaredl-Dev

@Jaredl-Dev Jaredl-Dev commented Aug 26, 2026

Copy link
Copy Markdown

No description provided.

Jaredl-Dev added a commit to Jaredl-Dev/GeneralsGameCode that referenced this pull request Aug 26, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Centralize shared Die modules in Core

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Centralizes eight identical death-module pairs in Core for reuse across both games.
• Rewires product CMake lists to compile shared Core implementations without duplicate symbols.
• Records completed moves in the unification helper for future repository maintenance.
Diagram

graph TD
  G["Generals Build"] --> C["Core GameEngine"] --> H["Die Headers"] --> B["DieModule Base"]
  Z["Zero Hour Build"] --> C --> S["Die Sources"] --> R["Death Behaviors"]
Loading
High-Level Assessment

Moving byte-identical implementations into Core is the appropriate consolidation strategy. Keeping per-product copies would preserve drift risk, while introducing another library or generated forwarding layer would add unnecessary build complexity for code already shared by both GameEngine targets.

Files changed (20) +65 / -48

Refactor (16) +0 / -0
CreateCrateDie.hCentralize crate-on-death declarations +0/-0

Centralize crate-on-death declarations

• Moves the shared CreateCrateDie module and crate-selection configuration declarations into Core without behavioral changes.

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

CrushDie.hCentralize crush-death declarations +0/-0

Centralize crush-death declarations

• Moves crush state, sound configuration, and CrushDie declarations into the shared Core include tree.

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

DamDie.hCentralize dam-death declarations +0/-0

Centralize dam-death declarations

• Moves DamDie and its module-data declarations into Core for use by both games.

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

DieModule.hCentralize the Die module base API +0/-0

Centralize the Die module base API

• Moves the common DieModule interface, applicability data, and base class into Core while preserving the existing API.

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

EjectPilotDie.hCentralize pilot-ejection declarations +0/-0

Centralize pilot-ejection declarations

• Moves EjectPilotDie configuration and interface declarations into the shared Core include tree.

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

KeepObjectDie.hCentralize object-retention declarations +0/-0

Centralize object-retention declarations

• Moves the KeepObjectDie declaration into Core so both products share the rubble-preservation module.

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

SpecialPowerCompletionDie.hCentralize special-power death declarations +0/-0

Centralize special-power death declarations

• Moves special-power completion configuration and Die module declarations into Core without changing their contract.

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

UpgradeDie.hCentralize upgrade-release declarations +0/-0

Centralize upgrade-release declarations

• Moves UpgradeDie configuration and class declarations into the shared Core include tree.

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

CreateCrateDie.cppCentralize crate-on-death implementation +0/-0

Centralize crate-on-death implementation

• Moves the existing crate eligibility, placement, ownership, and AI-notification behavior into Core unchanged.

Core/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp

CrushDie.cppCentralize crush-death implementation +0/-0

Centralize crush-death implementation

• Moves crush-location detection, sound playback, and model-condition handling into the shared Core source tree.

Core/GameEngine/Source/GameLogic/Object/Die/CrushDie.cpp

DamDie.cppCentralize dam-death implementation +0/-0

Centralize dam-death implementation

• Moves the existing dam death behavior that enables map wave guides into Core unchanged.

Core/GameEngine/Source/GameLogic/Object/Die/DamDie.cpp

DieModule.cppCentralize Die applicability implementation +0/-0

Centralize Die applicability implementation

• Moves shared death-type, veterancy, and object-status filtering plus transfer hooks into Core.

Core/GameEngine/Source/GameLogic/Object/Die/DieModule.cpp

EjectPilotDie.cppCentralize pilot-ejection implementation +0/-0

Centralize pilot-ejection implementation

• Moves air/ground creation-list selection, pilot creation, and ejection audio behavior into Core unchanged.

Core/GameEngine/Source/GameLogic/Object/Die/EjectPilotDie.cpp

KeepObjectDie.cppCentralize object-retention implementation +0/-0

Centralize object-retention implementation

• Moves the existing no-removal death handler and serialization hooks into the shared Core source tree.

Core/GameEngine/Source/GameLogic/Object/Die/KeepObjectDie.cpp

SpecialPowerCompletionDie.cppCentralize special-power completion implementation +0/-0

Centralize special-power completion implementation

• Moves creator tracking, script-engine notification, and serialization behavior into Core unchanged.

Core/GameEngine/Source/GameLogic/Object/Die/SpecialPowerCompletionDie.cpp

UpgradeDie.cppCentralize upgrade-release implementation +0/-0

Centralize upgrade-release implementation

• Moves producer lookup and upgrade-removal behavior into Core without changing runtime semantics.

Core/GameEngine/Source/GameLogic/Object/Die/UpgradeDie.cpp

Other (4) +65 / -48
CMakeLists.txtCompile shared Die modules from Core +16/-16

Compile shared Die modules from Core

• Enables all eight Die headers and implementations in the Core GameEngine source set so both products compile the shared copies.

Core/GameEngine/CMakeLists.txt

CMakeLists.txtStop compiling Generals-local Die copies +16/-16

Stop compiling Generals-local Die copies

• Comments out the eight local header/source pairs so the Generals target consumes the Core-owned implementations and avoids duplicate compilation.

Generals/Code/GameEngine/CMakeLists.txt

CMakeLists.txtStop compiling Zero Hour-local Die copies +16/-16

Stop compiling Zero Hour-local Die copies

• Comments out the eight local header/source pairs so Zero Hour consumes the Core-owned implementations and avoids duplicate compilation.

GeneralsMD/Code/GameEngine/CMakeLists.txt

unify_move_files.pyRecord completed Die module moves +17/-0

Record completed Die module moves

• Adds commented unification commands documenting the 16 header and source moves from Zero Hour into 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
@Jaredl-Dev Jaredl-Dev changed the title unify(die): Move Die modules to Core unify(die): Move Die modules to Core (Withdrawn) Aug 26, 2026
@Jaredl-Dev Jaredl-Dev closed this Aug 26, 2026
@Jaredl-Dev
Jaredl-Dev deleted the unify/die-modules branch August 26, 2026 18:12
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