| Commit message (Collapse) | Author | Age | ||
|---|---|---|---|---|
| ... | ||||
| * | Add modifiable wagon extents | orwell96 | 2017-11-23 | |
| | | | | | This will be required for advcarts | |||
| * | Fix multiple track types not working simultaneously | orwell96 | 2017-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 automatically | orwell96 | 2017-11-22 | |
| | | | | | One step towards advcarts compatibility | |||
| * | Make trackplacer align rails by any tracks, not just by tracks with the same ↵ | orwell96 | 2017-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 signs | orwell96 | 2017-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_punch | orwell96 | 2017-11-14 | |
| | | | | I think the issue is caused by the new animal damage code... | |||
| * | Fix entity damage | orwell96 | 2017-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 ↵ | orwell96 | 2017-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. | orwell96 | 2017-10-25 | |
| | | ||||
| * | Fix subway train placer | orwell96 | 2017-10-25 | |
| | | ||||
| * | Some workaround fixes for Linuxworks server | orwell96 | 2017-10-25 | |
| | | | | | | Trains no longer get deleted when there's no rail Fast item to create subway train | |||
| * | Add missing documentation for set_line | orwell96 | 2017-10-25 | |
| | | ||||
| * | Update readme.txt | orwell96 | 2017-10-25 | |
| | | ||||
| * | Implement multi-occupation in detector.on_node table to finally fix collisions | orwell96 | 2017-10-25 | |
| | | ||||
| * | Replace many math.floor(x+0.5) calls (or math.floor calls that should be ↵ | orwell96 | 2017-10-25 | |
| | | | | | those) by custom atround() function | |||
| * | Fix coupling and collisions in certain cases | orwell96 | 2017-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-Cerezo | 2017-10-25 | |
| | | ||||
| * | Fix last commit | orwell96 | 2017-10-23 | |
| | | ||||
| * | Fix continous object_property modification | orwell96 | 2017-10-23 | |
| | | | | This problem caused flickering of door animations on subways. | |||
| * | Set wagon line number | Gabriel Pérez-Cerezo | 2017-10-23 | |
| | | ||||
| * | Prefer saved nodedb node before node loaded from map | orwell96 | 2017-10-11 | |
| | | | | | Possibly fixes bug on linuxworks server. | |||
| * | Merge remote-tracking branch 'lemon-melon-repo/master' | orwell96 | 2017-10-11 | |
| |\ | ||||
| | * | Add speed as number in km/h to train hud | lemon-melon | 2017-07-15 | |
| | | | ||||
| | * | Add m/s to km/h helper function | lemon-melon | 2017-07-15 | |
| | | | ||||
| * | | Do not crash when train_pos is nil while checking wagon entity loading | orwell96 | 2017-10-11 | |
| | | | ||||
| * | | Fix error cascade due to inexistent drb_dump when debugging is disabled | orwell96 | 2017-10-11 | |
| | | | ||||
| * | | Remove zip release files, move mod to root, exclude assets from Makefile (#92) | rubenwardy | 2017-09-20 | |
| | | | ||||
| * | | Merge PR from mbb - Improve models and textures | MBB | 2017-08-24 | |
| | | | ||||
| * | | Repack for gpcf's PR | orwell96 | 2017-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} }; | ||||
