mirror of https://github.com/OpenTTD/OpenTTD.git
Change: upon an invalid company mode, set ERR_PRECONDITION_INVALID_COMPANY instead of ERR_PRECONDITION_INVALID
This commit is contained in:
parent
d80f193e74
commit
a79f97c022
|
@ -53,14 +53,14 @@
|
||||||
* @param returnval The value to return on failure.
|
* @param returnval The value to return on failure.
|
||||||
*/
|
*/
|
||||||
#define EnforceCompanyModeValid(returnval) \
|
#define EnforceCompanyModeValid(returnval) \
|
||||||
EnforcePrecondition(returnval, ScriptCompanyMode::IsValid())
|
EnforcePreconditionCustomError(returnval, ScriptCompanyMode::IsValid(), ScriptError::ERR_PRECONDITION_INVALID_COMPANY)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to enforce the precondition that we are in a deity mode.
|
* Helper to enforce the precondition that we are in a deity mode.
|
||||||
* @param returnval The value to return on failure.
|
* @param returnval The value to return on failure.
|
||||||
*/
|
*/
|
||||||
#define EnforceDeityMode(returnval) \
|
#define EnforceDeityMode(returnval) \
|
||||||
EnforcePrecondition(returnval, ScriptCompanyMode::IsDeity())
|
EnforcePreconditionCustomError(returnval, ScriptCompanyMode::IsDeity(), ScriptError::ERR_PRECONDITION_INVALID_COMPANY)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that handles all error related functions.
|
* Class that handles all error related functions.
|
||||||
|
|
Loading…
Reference in New Issue