Debug: Show all town persistent storage registers, not just the caller GRFID
This commit is contained in:
@@ -543,6 +543,11 @@ class NIHIndustry : public NIHelper {
|
||||
return (int32 *)(&i->psa->storage);
|
||||
}
|
||||
|
||||
std::vector<uint32> GetPSAGRFIDs(uint index) const override
|
||||
{
|
||||
return { 0 };
|
||||
}
|
||||
|
||||
void ExtraInfo(uint index, std::function<void(const char *)> print) const override
|
||||
{
|
||||
char buffer[1024];
|
||||
@@ -866,6 +871,17 @@ class NIHTown : public NIHelper {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual std::vector<uint32> GetPSAGRFIDs(uint index) const
|
||||
{
|
||||
Town *t = Town::Get(index);
|
||||
|
||||
std::vector<uint32> output;
|
||||
for (const auto &iter : t->psa_list) {
|
||||
output.push_back(iter->grfid);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
void ExtraInfo(uint index, std::function<void(const char *)> print) const override
|
||||
{
|
||||
const Town *t = Town::Get(index);
|
||||
|
Reference in New Issue
Block a user