Industry: Determine which tiles in industry layouts are not animated

Do not set these as animated tiles for new industries
This commit is contained in:
Jonathan G Rennison
2022-06-01 00:30:21 +01:00
parent 220390ed3e
commit 42e20d3d99
12 changed files with 208 additions and 3 deletions

View File

@@ -1127,7 +1127,7 @@ enum IndustryTypes {
#define MI(tbl, sndc, snd, d, pc, ai1, ai2, ai3, ai4, ag1, ag2, ag3, ag4, col, \
c1, c2, c3, proc, p1, r1, p2, r2, m, a1, im1, a2, im2, a3, im3, pr, clim, bev, in, intx, s1, s2, s3) \
{tbl, d, 0, pc, {c1, c2, c3}, proc, \
{tbl, {}, d, 0, pc, {c1, c2, c3}, proc, \
{p1, p2, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \
{r1, r2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, m, \
{a1, a2, a3, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID, CT_INVALID}, \

View File

@@ -20,6 +20,7 @@
#include "../waypoint_base.h"
#include "../string_func_extra.h"
#include "../newgrf_extension.h"
#include "../animated_tile.h"
/* Helper for filling property tables */
#define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
@@ -626,7 +627,7 @@ class NIHIndustryTile : public NIHelper {
{
char buffer[1024];
output.print("Debug Info:");
seprintf(buffer, lastof(buffer), " Gfx Index: %u", GetIndustryGfx(index));
seprintf(buffer, lastof(buffer), " Gfx Index: %u, animated tile: %d", GetIndustryGfx(index), _animated_tiles.find(index) != _animated_tiles.end());
output.print(buffer);
const IndustryTileSpec *indts = GetIndustryTileSpec(GetIndustryGfx(index));
if (indts) {
@@ -822,6 +823,12 @@ class NIHIndustry : public NIHelper {
seprintf(buffer, lastof(buffer), " Counter production interval: %u", ScaleQuantity(INDUSTRY_PRODUCE_TICKS, -_settings_game.economy.industry_cargo_scale_factor));
output.print(buffer);
}
seprintf(buffer, lastof(buffer), " Number of layouts: %u", (uint)indsp->layouts.size());
output.print(buffer);
for (size_t i = 0; i < indsp->layout_anim_masks.size(); i++) {
seprintf(buffer, lastof(buffer), " Layout anim inhibit mask %u: " OTTD_PRINTFHEX64, (uint)i, indsp->layout_anim_masks[i]);
output.print(buffer);
}
}
}