From 3f5e10ab388935b32732698c5ac40df8ff5e0282 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 4 Aug 2024 14:21:44 +0100 Subject: [PATCH] Debug: Show house min/max years --- src/table/newgrf_debug_data.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index 7b379a5f8e..6344a36a62 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -977,6 +977,14 @@ class NIHHouse : public NIHelper { seprintf(buffer, lastof(buffer), " animation: frames: %u, status: %u, speed: %u, triggers: 0x%X", hs->animation.frames, hs->animation.status, hs->animation.speed, hs->animation.triggers); output.print(buffer); + { + char *b = buffer + seprintf(buffer, lastof(buffer), " min year: %d", hs->min_year.base()); + if (hs->max_year < CalTime::MAX_YEAR) { + seprintf(b, lastof(buffer), ", max year %d", hs->max_year.base()); + } + output.print(buffer); + } + if (GetCleanHouseType(index) != GetHouseType(index)) { hs = HouseSpec::Get(GetCleanHouseType(index)); b = buffer + seprintf(buffer, lastof(buffer), " Untranslated House Type: %u", GetCleanHouseType(index));