Plans: Cache whether any plans are currently visible

This commit is contained in:
Jonathan G Rennison
2024-01-17 19:03:10 +00:00
parent 1159224d6f
commit 3d87cfeca5
9 changed files with 65 additions and 5 deletions

View File

@@ -160,6 +160,7 @@ CommandCost CmdChangePlanColour(TileIndex tile, DoCommandFlag flags, uint32_t p1
if (ret.Failed()) return ret;
if (flags & DC_EXEC) {
p->colour = (Colours)p2;
_plan_update_counter++;
Window *w = FindWindowById(WC_PLANS, 0);
if (w) w->InvalidateData(INVALID_PLAN, false);
for (const PlanLine *line : p->lines) {