class
cCheatManagerThe implementation of ICheatManager; this should only be used for extending and detouring.
Base classes
- class ICheatManager
- This manager is used to control the available cheats in the game, and the cheat console.
- class IVirtual
- A default interface that provides a virtual destructor, it should only be used internally.
Public types
-
using CheatMap_t = eastl::map<eastl::string, eastl::intrusive_ptr<ArgScript::
IParser>>
Constructors, destructors, conversion operators
- cCheatManager()
- ~cCheatManager() virtual
Public functions
- auto AddRef() -> int override
- auto Release() -> int override
- auto Initialize() -> bool override
- auto Dispose() -> bool override
- auto func14h() -> void override
-
auto AddCheat(const char* pString,
ArgScript::
ICommand* pParser, bool bNotify) -> void override - Adds a cheat to this manager.
- auto RemoveCheat(const char* pString) -> void override
- Removes the cheat that is invoked with the given keyword from this manager.
- auto ProcessLine(const char* pString) -> bool override
- Called every time a line is submitted to the console.
- auto func24h() -> int override
-
auto GetCheat(const char* pKeyword) -> ArgScript::
ICommand* override - Returns the ArgScript::
ICommand that is operating behind the requested cheat. -
auto GetKeywords(const char* pPattern,
eastl::vector<const char*> dst) -> size_
t override - Gets all the cheat keywords in this manager that match the given pattern.
- auto func30h(Object*) -> void override
- auto func34h(Object*) -> void override
-
auto GetArgScript() -> ArgScript::
FormatParser* override - Returns the ArgScript::
FormatParser instance that this manager is using. - auto func3Ch(int) -> void override
- auto func40h(int) -> void override
- auto func44h(int) -> void override
- auto func48h() -> bool override
- auto func4Ch(bool) -> void override
Public variables
- int mnRefCount
-
CheatMap_
t mCheats - eastl::set<eastl::string> mNotifyCheats
- Calling these cheats disable achievements, by posting a ICheatsManager::kMsgCheatInvoked message.
-
ArgScript::
FormatParser* mpArgScript - eastl::set<ObjectPtr> field_48
- bool field_68
Function documentation
void App:: cCheatManager:: AddCheat(const char* pString,
ArgScript:: ICommand* pParser,
bool bNotify) override
Adds a cheat to this manager.
Parameters | |
---|---|
pString | The keyword that is used to invoke the cheat. This is case insensitive and it can't contain whitespaces. |
pParser | The ArgScript:: |
bNotify | [Optional] If true, a kMsgCheatInvoked message will be sent when the cheat is invoked, which will disable achievements. |
The cheat is just an ArgScript::
void App:: cCheatManager:: RemoveCheat(const char* pString) override
Removes the cheat that is invoked with the given keyword from this manager.
Parameters | |
---|---|
pString | The keyword used to invoke the cheat. This is case insensitive and it can't contain whitespaces. |
bool App:: cCheatManager:: ProcessLine(const char* pString) override
Called every time a line is submitted to the console.
Parameters | |
---|---|
pString | The text contents of the line. |
Returns | Whether the line was correctly processed or not. |
ArgScript:: ICommand* App:: cCheatManager:: GetCheat(const char* pKeyword) override
Returns the ArgScript::
Parameters | |
---|---|
pKeyword | The keyword used to invoke the cheat. |
size_ t App:: cCheatManager:: GetKeywords(const char* pPattern,
eastl::vector<const char*> dst) override
Gets all the cheat keywords in this manager that match the given pattern.
Parameters | |
---|---|
pPattern | The pattern keywords must match in order to be added to the vector. |
dst | A const char* vector where the keywords will be added. |
Returns | The number of keywords added. |
The pattern uses the character '?' to allow any character, and '*' to allow any sequence of characters.