Commit Graph

26 Commits (master)

Author SHA1 Message Date
orwell96 e1fce28fac Do not clear the F table when running the init code fails 2017-06-08 11:05:24 +02:00
orwell96 d85f95ad10 Fix issue #40
Was caused by arrowconn not being set. Instructs user to revisit.
2017-05-22 15:01:38 +02:00
orwell96 28717b4d65 Performance improvements: Don't clear paths unless absolutely necessary
instead delete path elements that are too far from the train one-by-one
Also when switching a switch or changing rails, only clear train paths of trains that are nearby.
2017-05-03 16:31:13 +02:00
orwell96 0c7144bcc4 Merge nocrash branch into master and merging it with the unified functions so that restoring works how it should
Also fix minor bugs and an occasional crash with couples
2017-04-29 19:44:43 +02:00
orwell96 331db7ba5f Unify globalstep, load and save of all components into single functions 2017-04-29 19:13:15 +02:00
orwell96 f42b01c74b Add pcall wrapper to prevent server crashes when advtrains throws an error
Instead, read save files again and restore state before the crash
Rebased to latest commit
2017-04-29 14:53:00 +02:00
orwell96 337db2a573 Add Andrew's Cross 2017-04-27 15:33:40 +02:00
orwell96 4ea222fd6a record_protection_violation: fix player name not being passed 2017-04-07 23:06:02 +02:00
orwell96 327b12d488 Assert some variable types obtained from lua automation 2017-03-30 22:17:54 +02:00
orwell96 606c129f57 Add support to display text to passengers and on the outside of the train
Outside is currently displayed as infotext. TODO: signs-like draw it on the wagon
FIXME: When object properties are set, for some reason the animation restarts
2017-03-30 21:51:45 +02:00
orwell96 b5a5d9035f Respect protection_bypass privilege, fix crash with areas and properly record protection violations 2017-03-30 21:21:03 +02:00
orwell96 a091ac2e1d Fix privilege enforcement being useless
Privilege violations caused an error message but didn't abort the operation
2017-03-16 22:04:32 +01:00
orwell96 e9fb8f9f1b Redo rail models
Use multiple textures for slope objects, include mbb's rail textures and make curves and switches look better. Also add cable template.
2017-03-12 12:19:18 +01:00
orwell96 d51a00c823 Add passive component naming 2017-02-28 14:38:59 +01:00
orwell96 6b5f5ea345 Fix manual operation of mesecon switches 2017-02-20 11:31:14 +01:00
orwell96 38fecddff9 use mesecons_switch as correct dependency for luaautomation 2017-02-15 21:29:34 +01:00
orwell96 9f862a158c Use identical proxy environment with swapped metatable to not having to setfenv every function in F. 2017-02-07 22:06:39 +01:00
orwell96 3f54727e4f Check if node is actually loaded before querying get_meta()
Known to cause a segfault in engine sometimes.
2017-02-05 22:54:31 +01:00
orwell96 af14d57557 Fix LuaAtc Interrupt saving
The timer was loaded, but not saved, leading to it being counted from 0 upwards every restart, which of course broke interrupts.
2017-02-05 12:42:39 +01:00
orwell96 d4975a7003 Even more bugfixes
- add translations of all index values to invert_train
- fix on_leave_node callbacks not being called when train reverses
- fix callbacks on train creation and destruction
- Fix warning when saving ATC rail info
2017-02-04 21:09:20 +01:00
orwell96 61e48fff28 Commit 1.6.2
- Add some more stuff to API for LuaATC rails
- Warn on strange events even if debug info is disabled
- save atlatc on shutdown too
- fix detector rails in unloaded chunks
- do not fail silently in simple ATC rails
2017-02-04 18:35:34 +01:00
orwell96 328d5054a1 Revert change to node pos hashes, and rewrite trackdb to use individual coordinates
The precision of integers was not sufficient for saving pos node hashes in most cases, leading to strange bugs.
This fixes broken ATC rails, broken LuaAutomation stuff and trackdb on Windows.
Probably also fixes trains randomly stopping.
2017-02-03 20:40:30 +01:00
orwell96 a72dda17be Add quick position lookup by punching nodes 2017-02-03 15:40:44 +01:00
orwell96 bcf82ed70d Add documentation and pack for release 2017-02-02 22:26:43 +01:00
orwell96 948482a99e LuaAutomation: Add interrupt to the ingame API and implement initialization code handling and env management 2017-02-02 21:14:20 +01:00
orwell96 b19033b224 LuaAutomation - Basic component implementation
Implements the base code for LuaAutomation, an ATC rail and a punch-operated 'operation panel' as well as interface for passive components.
Changes in advtrains code where neccessary.
Supported passive components are light signals, switches and mesecon switches
2017-02-02 17:17:39 +01:00