|
|
|
@ -727,6 +727,7 @@ static const NIVariable _niv_industries[] = {
|
|
|
|
|
class NIHIndustry : public NIHelper {
|
|
|
|
|
bool IsInspectable(uint index) const override { return true; }
|
|
|
|
|
bool ShowExtraInfoOnly(uint index) const override { return GetIndustrySpec(Industry::Get(index)->type)->grf_prop.grffile == nullptr; }
|
|
|
|
|
bool ShowSpriteDumpButton(uint index) const override { return true; }
|
|
|
|
|
uint GetParent(uint index) const override { return GetInspectWindowNumber(GSF_FAKE_TOWNS, Industry::Get(index)->town->index); }
|
|
|
|
|
const void *GetInstance(uint index)const override { return Industry::Get(index); }
|
|
|
|
|
const void *GetSpec(uint index) const override { return GetIndustrySpec(Industry::Get(index)->type); }
|
|
|
|
@ -805,6 +806,15 @@ class NIHIndustry : public NIHelper {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
|
|
|
|
{
|
|
|
|
|
const Industry *ind = Industry::GetIfValid(index);
|
|
|
|
|
if (ind) {
|
|
|
|
|
extern void DumpIndustrySpriteGroup(const IndustrySpec *spec, std::function<void(const char *)> print);
|
|
|
|
|
DumpIndustrySpriteGroup(GetIndustrySpec(ind->type), std::move(print));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const NIFeature _nif_industry = {
|
|
|
|
|