Commit Graph

74 Commits

Author SHA1 Message Date
orwell96 f046cfc2d3 LuaATC: remove accidental mesecons hard-dependency 2021-11-04 20:10:55 +01:00
orwell96 5e27bbdcfe LuaATC: Fix position of error label, use consistent name "LuaATC" instead of "LuaAutomation" 2021-11-02 23:22:30 +01:00
orwell96 ae152bf5bb LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller) 2021-11-02 23:15:16 +01:00
orwell96 35d5106a21 LuaATC PCNaming: Allow naming active components using the tool 2021-11-02 23:14:28 +01:00
orwell96 09bba2c57f Hopefully fix #177 2021-04-25 21:59:02 +02:00
orwell96 112e3ff255 Fix undeclared globals warnings (#176)
Reported by Vanessa Dannenberg
2021-04-25 21:54:51 +02:00
orwell96 5d372b1cf1 Increase size of LuaATC code input forms to 15x12 units
The current size of the code form is rather limiting as it fills only a small part of the screen.
Also adds global constant in init.lua so this can easily adapted in the future
2021-03-22 11:23:42 +01:00
hlqkj 4fcc552770 Remove "Last punched" from LuaATC init code fs
Also removed the now-dead last punch pos helper code.
Resized buttons accordinghly.
2021-03-22 11:06:34 +01:00
hlqkj b9c824db00 Rework active_common formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
- Added label to the environment dropdown
2021-03-22 11:06:26 +01:00
hlqkj 75474ec07e Rework envsetup formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
2021-03-22 11:06:22 +01:00
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