Commit Graph

55 Commits

Author SHA1 Message Date
keldorkatarn
f10840438e TraceRestrictSlots: Fix highlighting behavior. Marking group ALL_SLOTS didn't reset the selected slot and dragging from ALL to ALL threw an unnecessary error.
(cherry picked from commit c76b560134bd8d9869ead872f7a434e61a5c5a48)

Fixes: #38
2018-04-17 16:34:19 +01:00
Jonathan G Rennison
58a860c087 Fix selected item in dropdown for conditional to test slot occupancy state 2017-08-13 22:55:21 +01:00
Jonathan G Rennison
b004c1998f Merge branch 'tracerestrict' into tracerestrict-sx 2017-06-20 19:19:21 +01:00
Jonathan G Rennison
7986367c1f Tracerestrict: Add program append management action. 2017-06-20 19:18:39 +01:00
Jonathan G Rennison
c44141bad6 Add conditional to test slot occupancy state.
Bump tracerestrict version.
2017-04-10 19:00:52 +01:00
Jonathan G Rennison
c94b7a6240 Add safeguard includes to tracerestrict files. 2017-04-10 18:57:46 +01:00
Jonathan G Rennison
0772236986 Add a release slot at front of train slot action.
Distinguish from release slot at back.
Fix slot release and acquire at front when passing PBS from back.
2017-03-31 01:10:26 +01:00
Jonathan G Rennison
7dbf99fa33 Add UI setting to hide adv tracerestrict features from GUI
Hide wait at PBS and slot features.
2017-03-30 23:32:37 +01:00
Jonathan G Rennison
927323dcb1 Add trace restrict slot membership conditional. 2017-03-30 21:53:30 +01:00
Jonathan G Rennison
6417fb16c3 Initial implementation of trace restrict slots 2017-03-30 21:14:14 +01:00
Jonathan G Rennison
0430502faa Merge branch 'tracerestrict' into tracerestrict-sx 2017-03-28 02:04:44 +01:00
Jonathan G Rennison
5a2d482c28 Tracerestrict: Add wait at PBS signal action. 2017-03-27 23:30:15 +01:00
Jonathan G Rennison
87f583fd99 Merge branch 'tracerestrict' into tracerestrict-sx 2017-02-27 17:42:41 +00:00
Jonathan G Rennison
13f8de58c3 Add instruction move up/down buttons to GUI.
Has block and individual instruction move modes, depending on ctrl.
2017-02-26 23:52:15 +00:00
Jonathan G Rennison
a2a8f7f7b7 Change goto signal button in GUI to have push-button behaviour. 2017-02-26 22:37:38 +00:00
Jonathan G Rennison
f192865c27 Allow shallow-removing conditional blocks by use of ctrl+click. 2017-02-26 21:39:04 +00:00
Jonathan G Rennison
0ebfcc23a5 Implement instruction scroll-to for PBS entry signal conditional in GUI. 2017-02-26 20:37:57 +00:00
Jonathan G Rennison
15787545a0 Merge branch 'tracerestrict' into tracerestrict-sx 2016-11-26 16:26:36 +00:00
Jonathan G Rennison
78b7223272 Make tracerestrict GUI mouse-wheel scrollable. 2016-11-26 16:26:24 +00:00
Jonathan G Rennison
8482fc6aef Merge branch 'tracerestrict' into tracerestrict-sx 2016-07-18 00:48:05 +01:00
Jonathan G Rennison
3d6cbb76b4 Allow value of "PBS entry signal" conditional to be a rail depot. 2016-07-18 00:47:52 +01:00
Jonathan G Rennison
ed33a62bcd Merge branch 'tracerestrict' into tracerestrict-sx 2016-07-05 22:19:34 +01:00
Jonathan G Rennison
8ec1b2200e Change tracerestrict weight ratio properties to use decimals, and the weight unit.
Add {POWER_WEIGHT_RATIO} and {FORCE_WEIGHT_RATIO} string codes.
2016-07-05 21:20:06 +01:00
Jonathan G Rennison
e4b932d53a Merge branch 'tracerestrict' into tracerestrict-sx 2016-06-30 20:15:27 +01:00
Jonathan G Rennison
f942de699c Add power/weight and max TE/weight ratio tracerestrict conditionals.
Minor refactorings.
2016-06-30 19:31:45 +01:00
Jonathan G Rennison
2c6f74a982 Move header definition for unit conversion functions to own header. 2016-06-30 18:28:42 +01:00
Jonathan G Rennison
b5531975da Add train weight, power, and max TE tracerestrict conditionals.
Minor refactorings.
2016-06-29 22:08:05 +01:00
Jonathan G Rennison
9ed3dc2581 Merge branch 'tracerestrict' into tracerestrict-sx 2016-04-05 19:43:41 +01:00
Jonathan G Rennison
213b0e7e3a Tracerestrict: Add a group membership conditional. 2016-04-05 18:40:16 +01:00
Jonathan G Rennison
4fdc495eea Merge branch 'tracerestrict' into tracerestrict-sx 2016-01-20 22:02:20 +00:00
patch-import
82cab7f31c Tracerestrict: Import "Long Reserve" feature.
https://github.com/KeldorKatarn/OpenTTD_PatchPack

Minor code de-duplications.
2016-01-20 21:49:53 +00:00
Jonathan G Rennison
feeae4a200 Merge branch 'tracerestrict' into tracerestrict-sx 2016-01-15 19:06:12 +00:00
Jonathan G Rennison
b5b06351ac Tracerestrict: Fix GUI issue with picker button raise/lower states.
When a picker button was selected, clicking on a different picker button
would cause both buttons to be raised, instead of just the previous.
2016-01-14 19:12:54 +00:00
Jonathan G Rennison
ecbbc03794 Merge branch 'tracerestrict' into tracerestrict-sx 2015-12-15 18:37:55 +00:00
Jonathan G Rennison
9c5189b212 Handle double instructions correctly when deleting stations/depots/etc.
Fix some whitespace and comment typos.
2015-12-15 18:36:02 +00:00
Jonathan G Rennison
8f4c216b3f Merge branch 'tracerestrict' into tracerestrict-sx 2015-09-02 21:03:14 +01:00
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.
2015-09-02 18:35:56 +01:00
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.
2015-09-02 02:12:02 +01:00
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.
2015-09-02 02:12:02 +01:00
Jonathan G Rennison
c4565f6bb0 Merge branch 'tracerestrict' into tracerestrict-sx 2015-08-04 19:14:57 +01:00
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.
2015-08-04 19:09:40 +01:00
Jonathan G Rennison
09f8ff420f Merge branch 'tracerestrict' into tracerestrict-sx
Conflicts:
	src/tracerestrict_gui.cpp
2015-08-03 20:40:42 +01:00
Jonathan G Rennison
a0520b8937 Initial implementation of PBS entry signal condition variable.
TODO: see how the efficiency of this can be improved.
2015-08-03 20:28:42 +01:00
Jonathan G Rennison
116bd41101 Initial support for multi-item instructions.
This involves various changes to instruction modification actions,
and the GUI code.
2015-08-03 20:03:42 +01:00
Jonathan G Rennison
804cfad053 Add override keywords for tracerestrict GUI code 2015-08-01 17:15:25 +01:00
Jonathan G Rennison
5474ee3e40 Add entry direction condition variable. 2015-07-28 01:36:52 +01:00
Jonathan G Rennison
3dd51e96b8 Bulk documentation update, and a few style fixes. 2015-07-28 01:36:52 +01:00
Jonathan G Rennison
75869cae41 Add train can carry cargo condition variable. 2015-07-28 01:36:52 +01:00
Jonathan G Rennison
3a7a81e02f Add GUI support for else if, or if and else blocks.
Add another drop-down to change between these.
Opening if blocks cannot be converted to/from these.
2015-07-28 01:36:52 +01:00
Jonathan G Rennison
fedf618978 Add last visited station condition. 2015-07-28 01:36:52 +01:00