Codechange: Use GetAcceptanceMask() instead of duplicating it.

This commit is contained in:
Peter Nelson
2023-09-21 08:29:10 +01:00
committed by PeterN
parent 6d675c8acf
commit 69ee38bd43
4 changed files with 4 additions and 12 deletions

View File

@@ -391,12 +391,7 @@ uint32_t Station::GetNewGRFVariable(const ResolverObject &object, byte variable,
{
switch (variable) {
case 0x48: { // Accepted cargo types
CargoID cargo_type;
uint32_t value = 0;
for (cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) {
if (HasBit(this->goods[cargo_type].status, GoodsEntry::GES_ACCEPTANCE)) SetBit(value, cargo_type);
}
uint32_t value = GetAcceptanceMask(this);
return value;
}