mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 11:44:17 +01:00
Add: GSCompanyMode::IsValid and IsDeity, and precondition enforcement helpers
This commit is contained in:
@@ -26,3 +26,13 @@ ScriptCompanyMode::~ScriptCompanyMode()
|
||||
{
|
||||
ScriptObject::SetCompany(this->last_company);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptCompanyMode::IsValid()
|
||||
{
|
||||
return ScriptObject::GetCompany() != OWNER_DEITY;
|
||||
}
|
||||
|
||||
/* static */ bool ScriptCompanyMode::IsDeity()
|
||||
{
|
||||
return ScriptObject::GetCompany() == OWNER_DEITY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user