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

@@ -19,6 +19,7 @@
#include "industry.h"
#include "town.h"
#include "cheat_type.h"
#include "newgrf_badge.h"
#include "newgrf_industries.h"
#include "newgrf_text.h"
#include "newgrf_debug.h"
@@ -579,6 +580,8 @@ public:
cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, STR_INDUSTRY_VIEW_PRODUCES_N_CARGO);
ir.top = DrawStringMultiLine(ir, cargostring);
ir.top = DrawBadgeNameList(ir, indsp->badges, GSF_INDUSTRIES);
/* Get the additional purchase info text, if it has not already been queried. */
if (indsp->callback_mask.Test(IndustryCallbackMask::FundMoreText)) {
uint16_t callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, nullptr, this->selected_type, INVALID_TILE);