Skip to content

Set engine command flags#1509

Merged
slipher merged 2 commits intoDaemonEngine:masterfrom
slipher:cmdflags
Jan 24, 2025
Merged

Set engine command flags#1509
slipher merged 2 commits intoDaemonEngine:masterfrom
slipher:cmdflags

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
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.

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