aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
...
* lines: fix very dumb typo breaking the "add" and "diff" functionorwell962019-11-06
* lines: Add rwt adapt mode to adapt to real timeorwell962019-11-06
* lines: document scheduler betterorwell962019-11-06
* atlatc: fix operation panel not in ndb, add warning when node is not found on...orwell962019-11-06
* Merge branch 'master' of https://git.bananach.space/advtrainsGabriel Pérez-Cerezo2019-10-21
|\
| * Secure inputs to scheduler so that they don't get recognised when executing t...orwell962019-08-29
| * Do not throw error when sync_tcb_neighbors failsorwell962019-08-29
| * Add lines scheduler for reliable railway-time scheduling(which is also safer ...orwell962019-08-26
| * Don't allow to remove TCB when a signal is assignedorwell962019-08-26
* | Changes for linetrackGabriel Pérez-Cerezo2019-10-21
|/
* Shunting mode now couples trains on collision.Gabriel Pérez-Cerezo2019-08-11
* Document luaatc decouplingGabriel Pérez-Cerezo2019-08-11
* Add decoupling to luaatcGabriel Pérez-Cerezo2019-08-11
* Change API to return the id of a newly created train when discouplingGabriel Pérez-Cerezo2019-08-09
* New version 3 save system.Gabriel Pérez-Cerezo2019-07-23
* math.floor triggers error if it gets something nilGabriel Pérez-Cerezo2019-07-20
* Prevent injection of floating-point delays, that wreck advtrainsGabriel Pérez-Cerezo2019-07-20
* Added option to modify departure speed and door delayGabriel Pérez-Cerezo2019-07-20
* No longer require server priv for /at_sync_ndbGabriel Pérez-Cerezo2019-07-17
* Various small fixesGabriel Pérez-Cerezo2019-07-16
* Keep a backup file where stuff is written to when savingGabriel Pérez-Cerezo2019-07-16
* RWTs can be specified in any form, unify converters, repeating time handlingorwell962019-06-19
* Omit cycle in to_Stringorwell962019-06-19
* Railway Time: atlatc interface, improve util functionsorwell962019-06-19
* Railway Time: Basic time counter and utility functionsorwell962019-06-19
* Run entity overrun checking only in loaded areasorwell962019-06-05
* Fix occurences of old lzb_invalidateorwell962019-04-23
* Fix remote routesettingorwell962019-04-16
* Move LZB system to core and unify approach callback mechanismorwell962019-04-16
* Set wagon pitch on slopesPedro Gimeno2019-04-06
* Disable-ARS switch in signal and set this when cancelling an ARS routeorwell962019-03-15
* Ugly workaround for green signals bugorwell962019-03-15
* Fix cancelling "Unknown Route" when section is deleted.orwell962019-03-15
* Add setting for death behavior and implement damage checks betterorwell962019-03-09
* Configurable interval for get_off setpos and door pos fix for japanese trainorwell962019-03-09
* Restore old door status display behaviororwell962019-03-09
* Do not clear LZB control when invalidating.orwell962019-02-23
* Lift restrictions for date() function in atlatcorwell962019-02-22
* possible fix for "trains standing at green signals"orwell962019-02-21
* Fix moving Signal IPs (no duplicate IPs)orwell962019-02-21
* Add ARS rules for stop railsorwell962019-02-19
* Move "Reverse" command in stoprail to directly before departureorwell962019-02-19
* Prioritize LZB callback (possible bugfix for H#100)orwell962019-02-19
* Fix stop rails sometimes not sending stop commandorwell962019-02-16
* Improve Signal IP form/workfloworwell962019-02-16
* Fix TCBS crash also for route_uiorwell962019-02-16
* Fix routesetting when TCBS is missing (H#109)orwell962019-02-12
* Small stoprail fixesorwell962019-02-11
* Fixes regarding signal assignments/tcbsorwell962019-02-09
* No crash when train does not exist on check_collision()orwell962019-02-06
// add_entity(pos, entityname) -> ObjectRef or nil // pos = {x=num, y=num, z=num} static int l_add_entity(lua_State *L); // add_item(pos, itemstack or itemstring or table) -> ObjectRef or nil // pos = {x=num, y=num, z=num} static int l_add_item(lua_State *L); // get_player_by_name(name) static int l_get_player_by_name(lua_State *L); // get_objects_inside_radius(pos, radius) static int l_get_objects_inside_radius(lua_State *L); // set_timeofday(val) // val = 0...1 static int l_set_timeofday(lua_State *L); // get_timeofday() -> 0...1 static int l_get_timeofday(lua_State *L); // get_gametime() static int l_get_gametime(lua_State *L); // get_day_count() -> int static int l_get_day_count(lua_State *L); // find_node_near(pos, radius, nodenames, search_center) -> pos or nil // nodenames: eg. {"ignore", "group:tree"} or "default:dirt" static int l_find_node_near(lua_State *L); // find_nodes_in_area(minp, maxp, nodenames) -> list of positions // nodenames: eg. {"ignore", "group:tree"} or "default:dirt" static int l_find_nodes_in_area(lua_State *L); // find_surface_nodes_in_area(minp, maxp, nodenames) -> list of positions // nodenames: eg. {"ignore", "group:tree"} or "default:dirt" static int l_find_nodes_in_area_under_air(lua_State *L); // fix_light(p1, p2) -> true/false static int l_fix_light(lua_State *L); // emerge_area(p1, p2) static int l_emerge_area(lua_State *L); // delete_area(p1, p2) -> true/false static int l_delete_area(lua_State *L); // get_perlin(seeddiff, octaves, persistence, scale) // returns world-specific PerlinNoise static int l_get_perlin(lua_State *L); // get_perlin_map(noiseparams, size) // returns world-specific PerlinNoiseMap static int l_get_perlin_map(lua_State *L); // get_voxel_manip() // returns world-specific voxel manipulator static int l_get_voxel_manip(lua_State *L); // clear_objects() // clear all objects in the environment static int l_clear_objects(lua_State *L); // spawn_tree(pos, treedef) static int l_spawn_tree(lua_State *L); // line_of_sight(pos1, pos2, stepsize) -> true/false static int l_line_of_sight(lua_State *L); // find_path(pos1, pos2, searchdistance, // max_jump, max_drop, algorithm) -> table containing path static int l_find_path(lua_State *L); // transforming_liquid_add(pos) static int l_transforming_liquid_add(lua_State *L); // forceload_block(blockpos) // forceloads a block static int l_forceload_block(lua_State *L); // forceload_free_block(blockpos) // stops forceloading a position static int l_forceload_free_block(lua_State *L); public: static void Initialize(lua_State *L, int top); static void InitializeClient(lua_State *L, int top); static struct EnumString es_ClearObjectsMode[]; }; class LuaABM : public ActiveBlockModifier { private: int m_id; std::set<std::string> m_trigger_contents; std::set<std::string> m_required_neighbors; float m_trigger_interval; u32 m_trigger_chance; bool m_simple_catch_up; public: LuaABM(lua_State *L, int id, const std::set<std::string> &trigger_contents, const std::set<std::string> &required_neighbors, float trigger_interval, u32 trigger_chance, bool simple_catch_up): m_id(id), m_trigger_contents(trigger_contents), m_required_neighbors(required_neighbors), m_trigger_interval(trigger_interval), m_trigger_chance(trigger_chance), m_simple_catch_up(simple_catch_up) { } virtual const std::set<std::string> &getTriggerContents() const { return m_trigger_contents; } virtual const std::set<std::string> &getRequiredNeighbors() const { return m_required_neighbors; } virtual float getTriggerInterval() { return m_trigger_interval; } virtual u32 getTriggerChance() { return m_trigger_chance; } virtual bool getSimpleCatchUp() { return m_simple_catch_up; } virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n, u32 active_object_count, u32 active_object_count_wider); }; class LuaLBM : public LoadingBlockModifierDef { private: int m_id; public: LuaLBM(lua_State *L, int id, const std::set<std::string> &trigger_contents, const std::string &name, bool run_at_every_load): m_id(id) { this->run_at_every_load = run_at_every_load; this->trigger_contents = trigger_contents; this->name = name; } virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n); }; struct ScriptCallbackState { ServerScripting *script; int callback_ref; int args_ref; unsigned int refcount; std::string origin; }; #endif /* L_ENV_H_ */