text/html; charset=UTF-8 Last-Modified: Mon, 23 Nov 2026 18:09:46 GMT Expires: Thu, 20 Nov 2036 18:09:46 GMT advtrains.git - Advtrains mod for minetest.
aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Add modifiable wagon extentsorwell962017-11-23
| | | | This will be required for advcarts
* Fix multiple track types not working simultaneouslyorwell962017-11-22
| | | | | | | Bug was caused by the drives_on table of every train and advtrains.all_tracktypes sharing the same reference, which caused advtrains.all_tracktypes to become the intersection of all train drives_on's in the world. However, this did become empty, causing nothing to work anymore.
* do not register wagons in the advtrains namespace automaticallyorwell962017-11-22
| | | | One step towards advcarts compatibility
* Make trackplacer align rails by any tracks, not just by tracks with the same ↵orwell962017-11-22
| | | | | | | nnpref This finally fixes the need to rotate atc rails and bumpers. Also prefers rotation that is closer to the player's look dir (placed bumpers will face the player)
* Do not punch signsorwell962017-11-14
| | | | For some reason, a sign text gets removed by a train when it drives by. This should fix it.
* Fix occasional crash in discouple on_punchorwell962017-11-14
| | | I think the issue is caused by the new animal damage code...
* Fix entity damageorwell962017-11-02
| | | | Animals from mobs weren't damaged because they have the immortal group set. Instead, we check for the existence of "fleshy".
* Change name of the node database group in order to clone node database code ↵orwell962017-10-31
| | | | | | 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.
* Punch non-player objects when they get overridden by a train.orwell962017-10-25
|
* Fix subway train placerorwell962017-10-25
|
* Some workaround fixes for Linuxworks serverorwell962017-10-25
| | | | | Trains no longer get deleted when there's no rail Fast item to create subway train
* Add missing documentation for set_lineorwell962017-10-25
|
* Update readme.txtorwell962017-10-25
|
* Implement multi-occupation in detector.on_node table to finally fix collisionsorwell962017-10-25
|
* Replace many math.floor(x+0.5) calls (or math.floor calls that should be ↵orwell962017-10-25
| | | | those) by custom atround() function
* Fix coupling and collisions in certain casesorwell962017-10-25
| | | | | | If a train moved towards another train, and the other train's step was executed after the first one's, the trains did eventually not collide. Fix by moving the enter_node and collision check to step_b Also change some couple behavior
* Moved default train track to separate mod, for integration with advcarts.Gabriel Pérez-Cerezo2017-10-25
|
* Fix last commitorwell962017-10-23
|
* Fix continous object_property modificationorwell962017-10-23
| | | This problem caused flickering of door animations on subways.
* Set wagon line numberGabriel Pérez-Cerezo2017-10-23
|
* Prefer saved nodedb node before node loaded from maporwell962017-10-11
| | | | Possibly fixes bug on linuxworks server.
* Merge remote-tracking branch 'lemon-melon-repo/master'orwell962017-10-11
|\
| * Add speed as number in km/h to train hudlemon-melon2017-07-15
| |
| * Add m/s to km/h helper functionlemon-melon2017-07-15
| |
* | Do not crash when train_pos is nil while checking wagon entity loadingorwell962017-10-11
| |
* | Fix error cascade due to inexistent drb_dump when debugging is disabledorwell962017-10-11
| |
* | Remove zip release files, move mod to root, exclude assets from Makefile (#92)rubenwardy2017-09-20
| |
* | Merge PR from mbb - Improve models and texturesMBB2017-08-24
| |
* | Repack for gpcf's PRorwell962017-08-15
| | Minimap *m = getobject(ref); m->setAngle(lua_tointeger(L, 2)); return 1; } int LuaMinimap::l_get_mode(lua_State *L) { LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); lua_pushinteger(L, m->getMinimapMode()); return 1; } int LuaMinimap::l_set_mode(lua_State *L) { LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); s32 mode = lua_tointeger(L, 2); if (mode < MINIMAP_MODE_OFF || mode >= MINIMAP_MODE_COUNT) { return 0; } m->setMinimapMode((MinimapMode) mode); return 1; } int LuaMinimap::l_set_shape(lua_State *L) { LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); if (!lua_isnumber(L, 2)) return 0; m->setMinimapShape((MinimapShape)((int)lua_tonumber(L, 2))); return 0; } int LuaMinimap::l_get_shape(lua_State *L) { LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); lua_pushnumber(L, (int)m->getMinimapShape()); return 1; } int LuaMinimap::l_show(lua_State *L) { // If minimap is disabled by config, don't show it. if (!g_settings->getBool("enable_minimap")) return 1; Client *client = getClient(L); assert(client); LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); if (m->getMinimapMode() == MINIMAP_MODE_OFF) m->setMinimapMode(MINIMAP_MODE_SURFACEx1); client->showMinimap(true); return 1; } int LuaMinimap::l_hide(lua_State *L) { Client *client = getClient(L); assert(client); LuaMinimap *ref = checkobject(L, 1); Minimap *m = getobject(ref); if (m->getMinimapMode() != MINIMAP_MODE_OFF) m->setMinimapMode(MINIMAP_MODE_OFF); client->showMinimap(false); return 1; } LuaMinimap *LuaMinimap::checkobject(lua_State *L, int narg) { NO_MAP_LOCK_REQUIRED; luaL_checktype(L, narg, LUA_TUSERDATA); void *ud = luaL_checkudata(L, narg, className); if (!ud) luaL_typerror(L, narg, className); return *(LuaMinimap **)ud; // unbox pointer } Minimap* LuaMinimap::getobject(LuaMinimap *ref) { return ref->m_minimap; } int LuaMinimap::gc_object(lua_State *L) { LuaMinimap *o = *(LuaMinimap **)(lua_touserdata(L, 1)); delete o; return 0; } void LuaMinimap::Register(lua_State *L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(L, "__index"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); lua_pushliteral(L, "__gc"); lua_pushcfunction(L, gc_object); lua_settable(L, metatable); lua_pop(L, 1); // drop metatable luaL_openlib(L, 0, methods, 0); // fill methodtable lua_pop(L, 1); // drop methodtable } const char LuaMinimap::className[] = "Minimap"; const luaL_Reg LuaMinimap::methods[] = { luamethod(LuaMinimap, show), luamethod(LuaMinimap, hide), luamethod(LuaMinimap, get_pos), luamethod(LuaMinimap, set_pos), luamethod(LuaMinimap, get_angle), luamethod(LuaMinimap, set_angle), luamethod(LuaMinimap, get_mode), luamethod(LuaMinimap, set_mode), luamethod(LuaMinimap, set_shape), luamethod(LuaMinimap, get_shape), {0,0} };