Codechange: Rename TownEffect to TownAcceptanceEffect.

This makes it clearer that TownEffect only affects acceptance behaviour.
This commit is contained in:
Peter Nelson
2024-01-07 19:32:39 +00:00
committed by Peter Nelson
parent 782cbe95d6
commit 60dcf3b5e2
16 changed files with 114 additions and 114 deletions

View File

@@ -25,7 +25,7 @@
/* static */ bool ScriptCargo::IsValidTownEffect(TownEffect towneffect_type)
{
return (towneffect_type >= (TownEffect)TE_BEGIN && towneffect_type < (TownEffect)TE_END);
return (towneffect_type >= (TownEffect)TAE_BEGIN && towneffect_type < (TownEffect)TAE_END);
}
/* static */ std::optional<std::string> ScriptCargo::GetName(CargoID cargo_type)
@@ -67,7 +67,7 @@
{
if (!IsValidCargo(cargo_type)) return TE_NONE;
return (ScriptCargo::TownEffect)::CargoSpec::Get(cargo_type)->town_effect;
return (ScriptCargo::TownEffect)::CargoSpec::Get(cargo_type)->town_acceptance_effect;
}
/* static */ Money ScriptCargo::GetCargoIncome(CargoID cargo_type, SQInteger distance, SQInteger days_in_transit)