Merge branch 'master' into jgrpp
# Conflicts: # src/script/api/script_object.cpp # src/script/api/script_roadtypelist.cpp
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
/* AIs have only access to engines they can purchase or still have in use.
|
||||
* Deity has access to all engined that will be or were available ever. */
|
||||
CompanyID company = ScriptObject::GetCompany();
|
||||
return company == OWNER_DEITY || ::IsEngineBuildable(engine_id, e->type, company) || ::Company::Get(company)->group_all[e->type].num_engines[engine_id] > 0;
|
||||
return ScriptCompanyMode::IsDeity() || ::IsEngineBuildable(engine_id, e->type, company) || ::Company::Get(company)->group_all[e->type].num_engines[engine_id] > 0;
|
||||
}
|
||||
|
||||
/* static */ bool ScriptEngine::IsBuildable(EngineID engine_id)
|
||||
@@ -276,7 +276,7 @@
|
||||
{
|
||||
company = ScriptCompany::ResolveCompanyID(company);
|
||||
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY);
|
||||
EnforceDeityMode(false);
|
||||
EnforcePrecondition(false, IsValidEngine(engine_id));
|
||||
EnforcePrecondition(false, company != ScriptCompany::COMPANY_INVALID);
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
{
|
||||
company = ScriptCompany::ResolveCompanyID(company);
|
||||
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY);
|
||||
EnforceDeityMode(false);
|
||||
EnforcePrecondition(false, IsValidEngine(engine_id));
|
||||
EnforcePrecondition(false, company != ScriptCompany::COMPANY_INVALID);
|
||||
|
||||
|
Reference in New Issue
Block a user