Commit Graph

27 Commits (master)

Author SHA1 Message Date
orwell96 ae152bf5bb LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller) 2021-11-02 23:15:16 +01:00
orwell96 e506086011 Serialization: strip trailing \r also in nodedb callback 2021-05-07 10:19:49 +02:00
orwell96 1b8a3dfaf2 Add save interval setting, fix accidental global variable, at_sync_ndb on server priv not limited, timetaking for restore_all 2021-02-10 16:42:15 +01:00
orwell96 080b8fb273 Add IGNORE_WORLD mode to test using only the advtrains save data 2021-02-10 16:39:45 +01:00
orwell96 61329c11a2 Start using path_invalidate_ahead() 2021-02-10 16:36:24 +01:00
orwell96 5c2534cc35 Remove pcall wrappers completely, add command to disable advtrains mainloop 2021-02-10 16:36:24 +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 ce4631dbee Backport ndb format from cellworld to also store the cids in the ndb file; integrate ndb in serialize_lib atomic system 2021-01-12 13:27:00 +01:00
orwell96 b892d793ac Add windows compatibility in nodedb saving (H#153)
Note: it does not simply add os.delete()  but reverts to the "old" behavior of directly overwriting the file, because this did work before.
2020-10-07 14:41:57 +02:00
Blockhead 595f26b450 Deprecate old 4590 crossings
This is done with a task that runs once when the nodedb is loaded. A new
field of advtrains_ndb will keep a version integer to indicate migration
versions. This introduces verson 1, no version being equivalent to 0.
An LBM is also registered to replace the tracks in the world.
2020-08-21 16:02:02 +02:00
Gabriel Pérez-Cerezo 91bb555bc2 No longer require server priv for /at_sync_ndb
The check for server priv was hidden where no one would have expected
it.
2019-07-17 14:44:36 +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 adc8db22fb Fix for path invalidation within update callbacks (issue was caused by detector rails) 2019-01-22 00:18:24 +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
orwell96 031aab4633 Signal assignment and route programming procedure 2018-07-04 17:48:33 +02:00
imcasper 105aacccf9 Update nodedb.lua
correct read/write file binary data
2018-06-14 17:39:42 +02:00
orwell96 139a26fccc Bugfixes part 1
There's something wrong with the new paths, next time build a path validity checker to trace the issue
2018-06-14 17:39:42 +02:00
Gabriel Pérez-Cerezo 481f6218a8 Log certain events in a logfile in the world directory
(also fix the output of /at_sync_ndb)
2018-02-21 20:03:34 +01:00
orwell96 27afd89d1b
Use directory delimter constant
Reported by @kostett, probably the cause of buggy nodedb saving
2018-01-15 13:33:43 +01:00
orwell96 e3b7046968 Remove path invalidation statement.
Caused problems on multiple detector rails in a row, because paths got cleared in-between a train step
Also optimize some code
2017-12-18 23:44:01 +01:00
orwell96 09838252fe Do not spam the server chat with messages from /at_sync_ndb and trains going off_track
The off-track warning has moved into the info text of wagons
2017-12-18 23:20:29 +01:00
orwell96 46c4447da0 Rewrite rail connection system...
...to support an arbitrary number of connections for rails, which leads to these new features:
- switches now get recognized by the trackworker correctly
- ability to add real rail crosses
During this, I also rewrote the rail registering system and the conway function (important part of path prediction)
Note, developers: the track preset format changed, you might need to rewrite them according to the presets in tracks.lua if you wrote your own
(possibly breaks advcarts)
2017-12-18 23:09:23 +01:00
orwell96 dc67ff7226 Implement sound api and some sounds
- Level crossing bell
- Horns
- Subway train driving and door sounds
...to be continued...
2017-12-06 13:23:55 +01:00
orwell96 9294e770ca Change name of the node database group in order to clone node database code into a library mod
advtrains will keep its own node database code for reasons of crash recovery, with the handicap that improvements to nplib need to be manually backported.
2017-10-31 13:52:32 +01:00
orwell96 be771d9413 Prefer saved nodedb node before node loaded from map
Possibly fixes bug on linuxworks server.
2017-10-11 12:45:37 +02:00
rubenwardy d65c4916ce Remove zip release files, move mod to root, exclude assets from Makefile (#92) 2017-09-20 18:05:04 +02:00