Add CommandIterator.ConVarFlags property (#1869)

* Add CommandIterator.ConVarFlags property

Allow to access the convar flags `FCVAR_*` value from the iterator.
The CommandIterator.Flags property should have been called `AdminFlags`,
but it's too late to change that now.

* Switch admin help menu to use CommandIterator.ConVarFlags

No need to lookup the convar again.

* Deprecate CommandIterator.Flags

Rename it to .AdminFlags now that we have two kinds of flags exposed
on the iterator.
This commit is contained in:
peace-maker
2022-12-04 12:24:56 +01:00
committed by GitHub
parent aab8c6ac9f
commit 02f188899e
3 changed files with 46 additions and 6 deletions
+18 -1
View File
@@ -555,12 +555,29 @@ methodmap CommandIterator < Handle {
public native get();
}
// Retrieves the command's default flags
// This property is deprecated. Use .AdminFlags instead.
// Retrieves the command's effective admin flags.
//
// @error Invalid iterator position.
// @deprecated Use .AdminFlags instead.
#pragma deprecated Use .AdminFlags instead.
property int Flags {
public native get();
}
// Retrieves the command's effective admin flags.
//
// @error Invalid iterator position.
property int AdminFlags {
public native get();
}
// Retrieves the command's convar flags.
//
// @error Invalid iterator position.
property int ConVarFlags {
public native get();
}
}
/**