Codechange: Replace ScriptObject::[SG]etAllowDoCommand with ScriptObject::DisableDoCommandScope
This commit is contained in:
@@ -84,6 +84,11 @@ protected:
|
||||
static ScriptInstance *active; ///< The global current active instance.
|
||||
};
|
||||
|
||||
class DisableDoCommandScope : private AutoRestoreBackup<bool> {
|
||||
public:
|
||||
DisableDoCommandScope();
|
||||
};
|
||||
|
||||
/**
|
||||
* Save this object.
|
||||
* Must push 2 elements on the stack:
|
||||
@@ -265,21 +270,6 @@ protected:
|
||||
*/
|
||||
static const CommandDataBuffer &GetLastCommandResData();
|
||||
|
||||
/**
|
||||
* Store a allow_do_command per company.
|
||||
* @param allow The new allow.
|
||||
*/
|
||||
static void SetAllowDoCommand(bool allow);
|
||||
|
||||
/**
|
||||
* Get the internal value of allow_do_command. This can differ
|
||||
* from CanSuspend() if the reason we are not allowed
|
||||
* to execute a DoCommand is in squirrel and not the API.
|
||||
* In that case use this function to restore the previous value.
|
||||
* @return True iff DoCommands are allowed in the current scope.
|
||||
*/
|
||||
static bool GetAllowDoCommand();
|
||||
|
||||
/**
|
||||
* Set the current company to execute commands for or request
|
||||
* information about.
|
||||
|
||||
Reference in New Issue
Block a user