1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-23 21:22:46 +01:00

Codechange: move all date-related variables inside the timer (#10706)

This commit is contained in:
Patric Stout
2023-04-24 17:56:01 +02:00
committed by GitHub
parent f5f6306af3
commit 7aa2b9ab0a
76 changed files with 308 additions and 301 deletions

View File

@@ -33,7 +33,7 @@
#include "newgrf_debug.h"
#include "newgrf_railtype.h"
#include "newgrf_roadtype.h"
#include "date_func.h"
#include "timer/timer_game_calendar.h"
#include "genworld.h"
#include "company_gui.h"
#include "road_func.h"
@@ -1171,7 +1171,7 @@ CommandCost CmdBuildRoadDepot(DoCommandFlag flags, TileIndex tile, RoadType rt,
if (flags & DC_EXEC) {
Depot *dep = new Depot(tile);
dep->build_date = _date;
dep->build_date = TimerGameCalendar::date;
/* A road depot has two road bits. */
UpdateCompanyRoadInfrastructure(rt, _current_company, ROAD_DEPOT_TRACKBIT_FACTOR);