Add: NewGRF Badges.

This commit is contained in:
Peter Nelson
2024-10-10 22:18:01 +01:00
committed by Peter Nelson
parent ca3b5ed6c1
commit 8f14894024
46 changed files with 1224 additions and 54 deletions

View File

@@ -11,6 +11,7 @@
#include "debug.h"
#include "station_base.h"
#include "roadstop_base.h"
#include "newgrf_badge.h"
#include "newgrf_roadstop.h"
#include "newgrf_class_func.h"
#include "newgrf_cargo.h"
@@ -200,6 +201,8 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
return 0xFFFE;
}
case 0x7A: return GetBadgeVariableResult(*this->ro.grffile, this->roadstopspec->badges, parameter);
case 0xF0: return this->st == nullptr ? 0 : this->st->facilities.base(); // facilities
case 0xFA: return ClampTo<uint16_t>((this->st == nullptr ? TimerGameCalendar::date : this->st->build_date) - CalendarTime::DAYS_TILL_ORIGINAL_BASE_YEAR); // build date