virtual */
| 159 | } |
| 160 | |
| 161 | /* virtual */ uint32_t AirportScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const |
| 162 | { |
| 163 | switch (variable) { |
| 164 | case 0x40: return this->layout; |
| 165 | |
| 166 | case 0x7A: return GetBadgeVariableResult(*this->ro.grffile, this->spec->badges, parameter); |
| 167 | } |
| 168 | |
| 169 | if (this->st == nullptr) { |
| 170 | available = false; |
| 171 | return UINT_MAX; |
| 172 | } |
| 173 | |
| 174 | switch (variable) { |
| 175 | /* Get a variable from the persistent storage */ |
| 176 | case 0x7C: return (this->st->airport.psa != nullptr) ? this->st->airport.psa->GetValue(parameter) : 0; |
| 177 | |
| 178 | case 0xF0: return this->st->facilities.base(); |
| 179 | case 0xFA: return ClampTo<uint16_t>(this->st->build_date - CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR); |
| 180 | } |
| 181 | |
| 182 | return this->st->GetNewGRFVariable(this->ro, variable, parameter, available); |
| 183 | } |
| 184 | |
| 185 | GrfSpecFeature AirportResolverObject::GetFeature() const |
| 186 | { |
nothing calls this directly
no test coverage detected