Merge branch 'master' into jgrpp
# Conflicts: # src/script/api/script_object.cpp # src/script/api/script_roadtypelist.cpp
This commit is contained in:
@@ -212,7 +212,7 @@
|
||||
|
||||
/* static */ bool ScriptCompany::SetLoanAmount(Money loan)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, loan >= 0);
|
||||
EnforcePrecondition(false, ((int64)loan % GetLoanInterval()) == 0);
|
||||
EnforcePrecondition(false, loan <= GetMaxLoanAmount());
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
/* static */ bool ScriptCompany::SetMinimumLoanAmount(Money loan)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, loan >= 0);
|
||||
|
||||
Money over_interval = (int64)loan % GetLoanInterval();
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
/* static */ bool ScriptCompany::ChangeBankBalance(CompanyID company, Money delta, ExpensesType expenses_type, TileIndex tile)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY);
|
||||
EnforceDeityMode(false);
|
||||
EnforcePrecondition(false, expenses_type < (ExpensesType)::EXPENSES_END);
|
||||
EnforcePrecondition(false, (int64)delta >= INT32_MIN);
|
||||
EnforcePrecondition(false, (int64)delta <= INT32_MAX);
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
/* static */ bool ScriptCompany::BuildCompanyHQ(TileIndex tile)
|
||||
{
|
||||
EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY);
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, ::IsValidTile(tile));
|
||||
|
||||
return ScriptObject::DoCommand(tile, OBJECT_HQ, 0, CMD_BUILD_OBJECT);
|
||||
|
Reference in New Issue
Block a user