Codechange: Remove Company/OwnerByte types

This commit is contained in:
Charles Pigott
2019-04-22 09:10:04 +01:00
committed by PeterN
parent fcf06ba4c4
commit 5b34c8019f
37 changed files with 86 additions and 89 deletions

View File

@@ -20,7 +20,7 @@
/* static */ int32 ScriptCargoMonitor::GetTownDeliveryAmount(ScriptCompany::CompanyID company, CargoID cargo, TownID town_id, bool keep_monitoring)
{
CompanyID cid = static_cast<CompanyID>(company);
if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1;
if (cid >= MAX_COMPANIES) return -1;
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
if (!::Town::IsValidID(town_id)) return -1;
@@ -31,7 +31,7 @@
/* static */ int32 ScriptCargoMonitor::GetIndustryDeliveryAmount(ScriptCompany::CompanyID company, CargoID cargo, IndustryID industry_id, bool keep_monitoring)
{
CompanyID cid = static_cast<CompanyID>(company);
if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1;
if (cid >= MAX_COMPANIES) return -1;
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
if (!::Industry::IsValidID(industry_id)) return -1;
@@ -42,7 +42,7 @@
/* static */ int32 ScriptCargoMonitor::GetTownPickupAmount(ScriptCompany::CompanyID company, CargoID cargo, TownID town_id, bool keep_monitoring)
{
CompanyID cid = static_cast<CompanyID>(company);
if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1;
if (cid >= MAX_COMPANIES) return -1;
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
if (!::Town::IsValidID(town_id)) return -1;
@@ -53,7 +53,7 @@
/* static */ int32 ScriptCargoMonitor::GetIndustryPickupAmount(ScriptCompany::CompanyID company, CargoID cargo, IndustryID industry_id, bool keep_monitoring)
{
CompanyID cid = static_cast<CompanyID>(company);
if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1;
if (cid >= MAX_COMPANIES) return -1;
if (!ScriptCargo::IsValidCargo(cargo)) return -1;
if (!::Industry::IsValidID(industry_id)) return -1;