Commit Graph

94 Commits

Author SHA1 Message Date
orwell96 3256c2778d Forbid track modification when train, IP or TCB is on it, better handle removing of TCBs (H#149) 2020-10-07 17:20:47 +02:00
Linus Jahn 00be2b5b5f tcb: Fix crash when player is nil 2020-09-01 15:20:15 +02:00
orwell96 3c9215f037 DISCARD ON MERGE!: Temporary compatibility fix: translate signal aspects back to old format if they are in the new format, to allow reverting from new_lzb 2020-07-23 19:28:46 +02:00
Blockhead ad49854fed Make using the default tracks optional, even in submods
If advtrains_train_track is disabled, don't register any tracks that use
its model like the LuaATC automation rail, point speed restriction rail,
station/stop rail.

For LuaATC, the definition for firing an event when a
train runs over the rail needs to be moved into the common defs so that
other mods like linetrack can use that as an interface.
2020-07-10 22:14:39 +02:00
orwell96 f33bb563e7 Add "Fallback state" for freed routes, move p_mesecon_iface.lua to core 2020-07-07 14:25:47 +02:00
orwell96 657446e163 Fix minetest.after() loop between ARS->update_route->update_signal_aspect->invalidate_path 2020-06-05 13:48:12 +02:00
Blockhead c0c6fcf00b Apply minetest.formspec_escape() to prevent formspec injection (H#143) 2020-01-04 18:33:57 +01:00
Gabriel Pérez-Cerezo 9c1d356505 Add inverse ARS rules
!RC foo
!LN bar

will match all trains except those matching RC foo or LN bar. This can
be useful to exclude one specific service from a component.
2019-12-05 00:08:43 +01:00
orwell96 0252768c16 Fix the "red signals" bug that appeared when clicking a green signal 2019-11-21 16:09:47 +01:00
orwell96 986c8fcf92 Do not throw error when sync_tcb_neighbors fails 2019-08-29 21:11:27 +02:00
orwell96 d867cd723f Don't allow to remove TCB when a signal is assigned 2019-08-26 20:46:08 +02:00
Gabriel Pérez-Cerezo daba00b6a2 Various small fixes
- Also do atomic operations on nodedb
- no longer require Worldedit for at_sync_ndb
- "overrun LZB 0 restriction" should now show where it happened.
2019-07-16 17:26:53 +02:00
orwell96 b56cda8695 Fix remote routesetting 2019-04-16 12:59:17 +02:00
orwell96 ea33ad9de0 Move LZB system to core and unify approach callback mechanism 2019-04-16 09:16:44 +02:00
orwell96 5738ab46aa Disable-ARS switch in signal and set this when cancelling an ARS route 2019-03-15 18:17:18 +01:00
orwell96 1227456d46 Ugly workaround for green signals bug 2019-03-15 17:39:31 +01:00
orwell96 c90411b880 Fix cancelling "Unknown Route" when section is deleted. 2019-03-15 16:40:23 +01:00
orwell96 042dcd241d Do not clear LZB control when invalidating.
Prevents trains accelerating towards red signals on /at_reroute
2019-02-23 10:37:48 +01:00
orwell96 086b2c0fb0 possible fix for "trains standing at green signals" 2019-02-21 09:36:25 +01:00
orwell96 2ba75784c2 Fix moving Signal IPs (no duplicate IPs) 2019-02-21 08:53:41 +01:00
orwell96 f2c2aad329 Add ARS rules for stop rails 2019-02-19 21:54:17 +01:00
orwell96 391a57f90c Prioritize LZB callback (possible bugfix for H#100) 2019-02-19 15:49:01 +01:00
orwell96 ee079d02ff Improve Signal IP form/workflow 2019-02-16 13:09:33 +01:00
orwell96 aa2b08b985 Fix TCBS crash also for route_ui 2019-02-16 13:00:59 +01:00
orwell96 ede60d0a17 Fix routesetting when TCBS is missing (H#109) 2019-02-12 22:17:43 +01:00
orwell96 fcb3dec0c0 Fixes regarding signal assignments/tcbs
- No longer crashes when assigned tcb is removed
- don't forbid modification just because signal is assigned
2019-02-09 19:24:10 +01:00
orwell96 7891c7c342 Signalling form auto-update 2019-02-05 11:40:24 +01:00
orwell96 e7dcee1127 Force LZB Halt setting 2019-02-05 11:23:17 +01:00
orwell96 be09acf5e2 Minor Bugfixes 2019-02-03 16:37:03 +01:00
orwell96 9da148347d Basic functions of "stop rail", missing ARS rules and signal.
For signal, need to think of a callback system for signals and moving atlatc queue to core?
2019-01-24 17:50:26 +01:00
orwell96 2976bae452 Point speed restriction rails 2019-01-24 13:43:22 +01:00
orwell96 f6f922c90c Fix last commit (and another warn2log) 2019-01-22 23:40:53 +01:00
orwell96 f2a62c2d77 Fix atc command evaluation BB command 2019-01-22 23:26:20 +01:00
orwell96 2b87106961 Make LZB params adjustable 2019-01-22 23:16:26 +01:00
orwell96 7537d2026f another small fix for route_ui 2019-01-22 21:39:06 +01:00
orwell96 7c60b8ffd1 Fix small bug in routeui and make another message log-only 2019-01-22 21:06:26 +01:00
orwell96 a34c2f4053 disable debug print of ARS 2019-01-22 18:48:46 +01:00
orwell96 0617a6a1bd Fix may_modify_section on newly created sections 2019-01-22 17:47:43 +01:00
orwell96 6c1ca46d6e Fix invalid path invalidation in ARS code 2019-01-22 12:43:11 +01:00
orwell96 64e59b54f8 Prohibit removing/changing of TCBs and sections while routes or signals are set 2019-01-22 12:07:53 +01:00
orwell96 cb48aea3e0 Do not run LZB traverser when path does not exist 2019-01-21 20:50:42 +01:00
orwell96 08649b84a0 Fix route aspect dialog 2019-01-15 20:06:45 +01:00
orwell96 a3baead979 Fix Routingcode ARS 2019-01-15 17:43:55 +01:00
orwell96 c180582f3d Can disable automatic working without cancelling route 2019-01-15 17:25:51 +01:00
orwell96 3ce98cae9a Actual working ARS 2019-01-15 17:23:03 +01:00
orwell96 a751d1da9c Add Automatic Routesetting UI
Settings have no effect so far
2019-01-09 18:03:40 +01:00
orwell96 c8788e6ca7 Fix crashes:
1. when train hit a route, nil access to already cancelled route caused crash
2. fix crash when trying to ensure_init a train that doesn't exist
2018-12-10 22:57:16 +01:00
orwell96 7a970dd4fa Signs (static signals) 2018-12-08 18:23:34 +01:00
orwell96 c3c5431412 Shunt signals (not exactly Ks), along with fixes in other components that those rely on 2018-12-08 17:12:57 +01:00
orwell96 e37f4f9188 Apply speed restriction 0.5 indexes later, do not cap tarvelocity by speed_restriction 2018-12-04 19:27:44 +01:00