Codechange: Remove Company/OwnerByte types
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user