Jonathan G Rennison
927323dcb1
Add trace restrict slot membership conditional.
8 years ago
Jonathan G Rennison
6417fb16c3
Initial implementation of trace restrict slots
8 years ago
Jonathan G Rennison
5a2d482c28
Tracerestrict: Add wait at PBS signal action.
8 years ago
Jonathan G Rennison
13f8de58c3
Add instruction move up/down buttons to GUI.
...
Has block and individual instruction move modes, depending on ctrl.
8 years ago
Jonathan G Rennison
f10c32de53
Fix removal of double-length conditional instructions (PBS entry signal).
8 years ago
Jonathan G Rennison
f192865c27
Allow shallow-removing conditional blocks by use of ctrl+click.
8 years ago
Jonathan G Rennison
f942de699c
Add power/weight and max TE/weight ratio tracerestrict conditionals.
...
Minor refactorings.
8 years ago
Jonathan G Rennison
91ba866852
Fix comment typo.
8 years ago
Jonathan G Rennison
b5531975da
Add train weight, power, and max TE tracerestrict conditionals.
...
Minor refactorings.
8 years ago
Jonathan G Rennison
213b0e7e3a
Tracerestrict: Add a group membership conditional.
9 years ago
Jonathan G Rennison
4d94470d08
Update all tracerestrict windows when a restricted signal is removed.
...
This fixes share counts in any open windows sharing the same program
not being updated.
9 years ago
Jonathan G Rennison
8dc76b0044
Be more strict checking for space in program pool in mgmt actions.
9 years ago
Jonathan G Rennison
83369d5e71
Remove unused constant _tracerestrict_penalty_item_default_value.
9 years ago
patch-import
82cab7f31c
Tracerestrict: Import "Long Reserve" feature.
...
https://github.com/KeldorKatarn/OpenTTD_PatchPack
Minor code de-duplications.
9 years ago
Jonathan G Rennison
d2e8d205b9
Tracerestrict: Fix copying an unrestricted signal making an empty program.
9 years ago
Jonathan G Rennison
20a015e9d3
Fix actions_used_flags not being set when cloning tracerestrict programs.
...
This resulted in newly copied or unshared programs not being evaluated.
9 years ago
Jonathan G Rennison
9c5189b212
Handle double instructions correctly when deleting stations/depots/etc.
...
Fix some whitespace and comment typos.
9 years ago
Jonathan G Rennison
73b69c5594
Validate type of all instructions, log validation failures at load.
...
The validator now checks that the type of conditional instructions
is known.
On a validation failure, the load code now outputs a corrupt savegame
message, with the validation error message and a program dump,
instead of using an assertion.
9 years ago
Jonathan G Rennison
d9acfc4599
Fix validation of dual item instructions.
9 years ago
Jonathan G Rennison
e2435c7169
Only run trace restrict programs if they contain relevant actions.
...
Only run in pathfinder case if deny or penalty are present.
Only run in is safe waiting tile case is reserve through is present.
Presence is determined at program validation time and cached in the
program structure.
Validator now checks for unknown non-conditional instructions.
9 years ago
Jonathan G Rennison
06a1d7c5c9
Add reserve through action to trace restrict programs.
...
This only changes the behaviour of PBS reservations which
would otherwise terminate at a PBS signal.
If the signal restriction sets the reserve through state,
the reservation continues through the signal, and the signal
is set to green.
9 years ago
Jonathan G Rennison
06cc930e47
Improve insertion and removal of 'or if' conditionals.
...
Allow inserting an 'or if' immediately after 'if', 'else if', 'or if'.
Removing an 'or if' no longer removes the associated block.
9 years ago
Jonathan G Rennison
614b3d8ab5
Trace restrict: Handle removing mapping from refcount 2 empty program.
...
Instead of leaving the other mapping pointing to an empty unshared
program, find and delete it.
9 years ago
Jonathan G Rennison
76707fb72a
Change pf penalty restriction value button to preset values and a custom option.
...
Preset values are 'small', 'medium' and 'large'.
Change default to 'small' preset.
9 years ago
Jonathan G Rennison
a0520b8937
Initial implementation of PBS entry signal condition variable.
...
TODO: see how the efficiency of this can be improved.
9 years ago
Jonathan G Rennison
116bd41101
Initial support for multi-item instructions.
...
This involves various changes to instruction modification actions,
and the GUI code.
9 years ago
Jonathan G Rennison
5474ee3e40
Add entry direction condition variable.
9 years ago
Jonathan G Rennison
3dd51e96b8
Bulk documentation update, and a few style fixes.
9 years ago
Jonathan G Rennison
75869cae41
Add train can carry cargo condition variable.
9 years ago
Jonathan G Rennison
fedf618978
Add last visited station condition.
9 years ago
Jonathan G Rennison
2296fc85e6
Add next order condition variable.
9 years ago
Jonathan G Rennison
ffed0c194a
Add current order (station, waypoint or depot) condition variable.
...
Adjust item bit allocations:
* Increase cond flags from 2 bits to 3 bits, for future expansion.
* Use 2 bits remaining in adjacent gap for an auxiliary type field.
This is used for the type (station, waypoint, etc.) of order tests.
Perform a linear scan of the program pool when deleting a station,
waypoint or depot.
9 years ago
Jonathan G Rennison
0be3b053d5
Add maximum train speed condition variable.
9 years ago
Jonathan G Rennison
627288277e
Implement reset, copy, share and unshare of trace restrict programs.
...
Add documentation on data storage model, wrt lookup, mapping and sharing.
9 years ago
Jonathan G Rennison
5f1b148cf9
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.
9 years ago