Initial minimal working tracerestrict implementation.
This is a port of the tracerestrict/routing restrictions feature from TTDPatch. At present this implements if tests (train length only), and pathfinder deny and penalty actions. This requires the use of YAPF. Note that restrictions are only evaluated within the YAPF lookahead distance.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "strings_func.h"
|
||||
#include "company_gui.h"
|
||||
#include "object_map.h"
|
||||
#include "tracerestrict.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/railtypes.h"
|
||||
@@ -1452,6 +1453,7 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
SetPresentSignals(tile, GetPresentSignals(tile) & ~SignalOnTrack(track));
|
||||
Company::Get(GetTileOwner(tile))->infrastructure.signal += CountBits(GetPresentSignals(tile));
|
||||
DirtyCompanyInfrastructureWindows(GetTileOwner(tile));
|
||||
TraceRestrictNotifySignalRemoval(tile, track);
|
||||
|
||||
/* removed last signal from tile? */
|
||||
if (GetPresentSignals(tile) == 0) {
|
||||
|
Reference in New Issue
Block a user