Skip to content

refactor(gui): Move MOTDSystem from GameEngineDevice to GameEngine - #3673

Open
OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:refactor/move-motd-system-to-gameengine
Open

OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:refactor/move-motd-system-to-gameengine

Conversation

@OmarAglan

Copy link
Copy Markdown

MOTDSystem is the window callback of MOTD.wnd. It was in Core/GameEngineDevice (W3DMOTD.cpp), but it uses no W3D code, and it is referenced by FunctionLexicon.cpp, which is in GameEngine.

This change moves the file to Core/GameEngine/Source/GameClient/GUI/GUICallbacks/MOTD.cpp. The only changes inside the file are the file name in the header comment and the PreRTS.h include that GameEngine files need.

There is no behavior change.

This removes one of the calls from GameEngine into GameEngineDevice, as discussed in #3552.

AI USE

Used AI to make the change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T09:28:33.967262Z b9ffb37 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The MOTD source is registered in GameEngine instead of GameEngineDevice. Its comments now identify MOTD.cpp, and the source includes PreRTS.h. CMake entries are also removed from two variant configurations where they were commented out.

Changes

MOTD source registration

Layer / File(s) Summary
Update MOTD source and build registration
Core/GameEngine/Source/GameClient/GUI/GUICallbacks/MOTD.cpp, Core/GameEngine/CMakeLists.txt, Core/GameEngineDevice/CMakeLists.txt, Generals/Code/GameEngineDevice/CMakeLists.txt, GeneralsMD/Code/GameEngineDevice/CMakeLists.txt
The source comments now name MOTD.cpp, and the file includes PreRTS.h. CMake adds MOTD.cpp to GAMEENGINE_SRC and removes the W3DMOTD.cpp entry from GameEngineDevice configurations. The entries in the Generals and GeneralsMD configurations were commented out.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Possibly related PRs

Suggested labels: Refactor

Suggested reviewers: jaredl-dev, xezon

Merge Risk: Minimal · up to b9ffb

The relocated callback remains registered in both game variants. No material merge risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the main change: moving MOTDSystem from GameEngineDevice to GameEngine.
Description check Passed The description explains the file move, the reason for it, and the reported absence of behavior changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2434902d-f310-4d81-a6f2-6a4f867a87a6
Commits

Reviewing files that changed from the base of the PR and between 998f337 and b9ffb37.

Files selected for processing: 5

  • Core/GameEngine/CMakeLists.txt
  • Core/GameEngine/Source/GameClient/GUI/GUICallbacks/MOTD.cpp
  • Core/GameEngineDevice/CMakeLists.txt
  • Generals/Code/GameEngineDevice/CMakeLists.txt
  • GeneralsMD/Code/GameEngineDevice/CMakeLists.txt
Files with no reviewable changes: 3

  • Core/GameEngineDevice/CMakeLists.txt
  • GeneralsMD/Code/GameEngineDevice/CMakeLists.txt
  • Generals/Code/GameEngineDevice/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Moves MOTDSystem from GameEngineDevice into GameEngine.

  • The MOTD window callback now lives in GameEngine.

Reviews (1) · Last reviewed commit: "refactor(gui): Move MOTDSystem from Game..." · Reviewed by Greptile

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