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

Set engine command flags #1509

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Set engine command flags #1509

merged 2 commits into from
Jan 24, 2025

Conversation

slipher
Copy link
Member

@slipher slipher commented Jan 18, 2025

As @VReaperV discovered while reviewing #1494, listCmds can't list a command if it has no flags defined. Fix this by defining flags for all the engine commands and disabling the constructor that doesn't define flags.

@slipher slipher changed the title Cmdflags Set engine command flags Jan 18, 2025
@@ -493,11 +493,13 @@ namespace Cmd {
return *Cmd::GetEnv();
}

#ifndef BUILD_ENGINE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave a comment for this ifdef? Are we basically only allowing this in the dummy app?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a comment explaining this where the constructor is declared in the headers. It is allowed only for gamelogic.

src/common/Command.h Outdated Show resolved Hide resolved
Commands can have flags such as 'BASE' or 'RENDERER' which determine the
command listing commands that they appear in. If a command has no flags
at all, it does not appear in /listCmds, which seems bad. So I disabled
the two-argument StaticCmd constructor without flags in the engine, and
defined flags for all the commands using it.

Also I changed the set of available flags a bit. Nuked SYSTEM because
it is too vague, and added SERVER and CLIENT.
@slipher slipher merged commit 13331e2 into DaemonEngine:master Jan 24, 2025
9 checks passed
@slipher slipher deleted the cmdflags branch January 24, 2025 04:16
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.

3 participants