64 Commits

Author SHA1 Message Date
orwell96
682ff59906 Replace deprecated depends.txt's by mod.conf and organize dependencies consistently, add modpack.conf 2021-03-13 11:13:13 +01:00
orwell96
6135f8a23b LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166) 2021-03-02 19:51:56 +01:00
orwell96
04c78373f1 LuaATC: add interrupt_safe() and clear_interrupts(), fix queue mainloop 2021-02-17 19:45:52 +01:00
orwell96
1e4156d0a4 LuaATC: Improve error/print logging, log only to subscribed players 2021-02-17 19:15:20 +01:00
orwell96
d13a610c2e Clean up structure of atlatc README.md after rebase 2021-02-17 18:16:22 +01:00
Maverick2797
27a1474963 Updated atlac readme to consistently use Markdown formatting 2021-02-17 18:16:09 +01:00
orwell96
5569849401 Restore LuaATC autocouple interface accidentally lost in 74a2199
During rebase, this part of the autocouple feature must have been accidentally lost
2021-02-15 16:52:54 +01:00
orwell96
4d13b15842 luaatc: Train event: also remember arrow connection in enter callback, remove obsolete code 2021-02-10 16:39:46 +01:00
orwell96
41568a3e2e luaatc: don't fail train event when train has already passed the rail at event time 2021-02-10 16:39:46 +01:00
orwell96
8f4c90c5a5 Add debug prints, modify LZB to fix problems with look_ahead 2021-02-10 16:39:46 +01:00
orwell96
aee7f0d419 Fix things, rework signal aspect select dialog, transform old aspects on-the-fly 2021-02-10 16:36:24 +01:00
orwell96
119a09b784 Simplify Signal Aspect Table (H#132) [breaks compatibility with signal API] 2021-02-10 16:36:24 +01:00
orwell96
8660794ef8 Fix lots of things around new LZB 2021-02-10 16:36:24 +01:00
orwell96
816245588d Disable ARS train flag and surrounding uses 2021-02-10 16:35:45 +01:00
orwell96
74a219937d Add approach callback mechanism to LuaATC 2021-02-10 16:34:34 +01:00
orwell96
e935136d58 Make is_node_loaded() checks also for mesecon interactions and digiline_send(), move on_updated_from_nodedb to advtrains table 2021-02-04 12:35:24 +01:00
orwell96
8ae405f00f Discard get_node_or_nil() for area-loaded check and use either a distance-based approach or minetest.is_block_active() if available
See also https://github.com/minetest/minetest/pull/10897
2021-02-03 09:30:44 +01:00
orwell96
e42fbf9dcc Make advtrains use serialize_lib (save version 4)
Old save format will be gracefully migrated
2021-01-12 13:27:00 +01:00
Gabriel Pérez-Cerezo
b23d346ace add maximum length parameter to split_at_fc and split_off_locomotive 2020-08-21 15:58:12 +02:00
Gabriel Pérez-Cerezo
36d8c8b716 Add command to split off locomotive 2020-07-28 20:39:35 +02:00
Gabriel Pérez-Cerezo
c7ea09ed59 Complete Documentation on return value of split_at_fc() 2020-07-28 20:10:08 +02:00
Gabriel Pérez-Cerezo
3b9b884988 Document new luaatc commands 2020-07-28 12:00:27 +02:00
Gabriel Pérez-Cerezo
549db4737f add train_length command to luaatc 2020-07-27 21:50:22 +02:00
Gabriel Pérez-Cerezo
45413ee5c0 Add function to step through freight codes 2020-07-26 23:30:07 +02:00
Gabriel Pérez-Cerezo
c54e0b341a add split_train_at_fc luaatc command
This command splits the train at the second non-empty FC it
encounters, taking with it the first few freight cars that all go to
the same destination.
2020-07-26 23:30:07 +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
Gabriel Pérez-Cerezo
2a0c55099e fix typo in luaautomation 2020-07-02 14:45:38 +02:00
Gabriel Pérez-Cerezo
0b14d8ddb1 Add autocouple mode
The shunting mode no longer makes trains couple, since it was meant
for other purposes. For autocoupling, the new autocoupling mode is
used. If trains are in autocouple mode, they couple when they collide
with another train.
2020-06-29 01:30:27 +02:00
Gabriel Pérez-Cerezo
15be500662 document shunting mode, add unset_shunt to luaatc 2020-06-08 13:42:24 +02:00
Blockhead
c0c6fcf00b Apply minetest.formspec_escape() to prevent formspec injection (H#143) 2020-01-04 18:33:57 +01:00
orwell96
50a81dd1f3 Fix RWT initialization when creating new world (H#142) 2019-12-18 10:01:47 +01:00
orwell96
576365627a Fix scheduler crash (H#133)
for loops don't work with manipulating i
2019-11-21 16:02:32 +01:00
orwell96
8c55442076 Add "discard all" function to scheduler events and use it to clear schedules in luaatc rails 2019-11-06 22:07:10 +01:00
orwell96
a4efdc196c atlatc: fix operation panel not in ndb, add warning when node is not found on queue run 2019-11-06 21:20:26 +01:00
orwell96
7b488f40d9 Add lines scheduler for reliable railway-time scheduling(which is also safer than the atlatc scheduler) and document new atlatc functions 2019-08-26 23:08:02 +02:00
Gabriel Pérez-Cerezo
2d8c13885a Shunting mode now couples trains on collision.
Trains now get coupled when one of them is in coupling mode.
2019-08-11 20:16:11 +02:00
Gabriel Pérez-Cerezo
ef50610f67 Document luaatc decoupling 2019-08-11 17:47:39 +02:00
Gabriel Pérez-Cerezo
1f6038c75a Add decoupling to luaatc 2019-08-11 17:42:30 +02:00
orwell96
053fd91fe0 RWTs can be specified in any form, unify converters, repeating time handling 2019-06-19 15:14:04 +02:00
orwell96
d569863434 Railway Time: atlatc interface, improve util functions 2019-06-19 10:29:02 +02:00
orwell96
ff94129761 Fix occurences of old lzb_invalidate 2019-04-23 22:30:33 +02:00
orwell96
e5c4e8cc1f Lift restrictions for date() function in atlatc 2019-02-22 12:52:33 +01:00
orwell96
e7dcee1127 Force LZB Halt setting 2019-02-05 11:23:17 +01:00
orwell96
f5e8b70202 Add getter/setter for routingcode in LuaATC 2019-01-15 17:54:13 +01:00
orwell96
4eb7531cc5 Add set_aspect function
This allows incorporating signals implementing the signal API in LuaAutomation projects
Note that it circumvents TCB assignments (a signal assigned to a TCB can be set to green even if no route is set
2018-11-20 12:12:28 +01:00
orwell96
f90a7a77ef Add Note regarding pcnaming and interlocking signals 2018-11-20 12:08:37 +01:00
orwell96
37166b5c14 Make "Line" property accessible from OBC and gettable via LATC, change subway wagon texture handling 2018-11-20 11:57:46 +01:00
orwell96
63eedd0947 Allow pcnaming for any signals 2018-11-05 21:01:32 +01:00
orwell96
fe4b4a695a Fix node database ATC rail bug
After successfully registering newly-placed ATC rails in the nodedb, the rail's after_place_node() callback
(local apn_func()) immediately cleared it again by passing a "node" object that was actually a player object
and thus had no "name" or "param2" to ndb.update(), which it handled how it should not in this situation.
Since those ndb.update calls were unnecessary anyways, I removed them completely.
2018-10-17 21:05:06 +02:00