aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Expand)AuthorAge
* Getv3intfield: Fix logic of return boolparamat2018-03-09
* Biomes: Add 'min_pos'/'max_pos' xyz biome limitsparamat2018-03-09
* Cleanup & bugfixLoic Blot2018-03-08
* Cleanup: drop Server::hudGetHotbarSelectedImage()Loic Blot2018-03-08
* Cleanup: drop Server::hudGetHotbarImage()Loic Blot2018-03-08
* Cleanup: drop Server::hudGetHotbarItemcount()Loic Blot2018-03-08
* mods.cpp/h: little performance improvement in getModsInPath (+ codestyle) (#7...Loïc Blot2018-03-08
* Fix missing warningstream (or similar problem) (#7034)you2018-03-04
* Allow for getting world name and path separately on the command line (#6555)Brian2018-03-04
* Gennotify: Add 'minetest.get_decoration_id' APIparamat2018-03-03
* Generate Notifier: Clear events once after all 'on generated' functionsparamat2018-03-03
* MapgenValleys: Fixed submarine valleys shapeGael-de-Sailly2018-03-03
* c_converter: Function template for numeric fields, add v3s16 default (#7090)SmallJoker2018-03-03
* Slippery: Simplify, make more efficient (#7086)SmallJoker2018-03-03
* Cleanup in flat lighting (#7051)Vitaliy2018-03-03
* Fix liquid post effect colour behaviour in third person viewred-0012018-02-27
* Place schematic (on vmanip): Enable use of 'place center' flagsparamat2018-02-27
* CollisionMoveSimple: Collide with 'ignore' nodesparamat2018-02-26
* SAO limits: Allow SAOs to exist outside the set 'mapgen limit'paramat2018-02-26
* Fix CMake error (#7074) by bumping the required CMake version past 3.8.1 (#7075)nOOb31672018-02-25
* CMakeLists use the source_group command to improve look and feel when generat...nOOb31672018-02-23
* CMakeLists pass windows sources (manifest and resource file) to executable ta...nOOb31672018-02-23
* Registration dialog: Larger text field with scrollbars (#7047)SmallJoker2018-02-23
* Find nodes in area (under air): Raise volume limit and document itparamat2018-02-21
* Vertical biome blend: Tune blend patternsparamat2018-02-20
* Dungeons: Add Y limits in all mapgensparamat2018-02-20
* Mitigate formspec exploits by verifying that the formspec was shown to the us...red-0012018-02-18
* Check argument types inside MetaDataRef Lua API (#7045)sfan52018-02-18
* Remove legacy chat network code. (#6954)red-0012018-02-17
* Render copyright notice: Fix name spelling (#7042)Vitaliy2018-02-15
* Add `on_auth_fail` callback (#7039)red-0012018-02-15
* Dungeons: Avoid generation in multiple liquid nodes and 'airlike'paramat2018-02-13
* map.cpp: Initialize NodeNeighbor, set NeighborType to u8 & cleanupLoic Blot2018-02-11
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
* Position entity nametags relative to selection-box (#7031)stujones112018-02-10
* Fix 'Change Keys' menu crash caused by 501f936SmallJoker2018-02-09
* Switch F3 to use 'enable_fog' settingThomasMonroe3142018-02-08
* Include alpha channel reference in MaterialTypeParamstujones112018-02-08
* Move `setlocale` from Lua to C++.red-0012018-02-08
* Add main_menu_style settingPorygonZRocks2018-02-08
* Make hud_get return aligment, offset and size. (#7006)lisacvuk2018-02-04
* Remove unused light updating codeDániel Juhász2018-02-04
* Refine movement anticheat again (#7004)sfan52018-02-02
* Fix liquid bottoms not being renderednumber Zero2018-01-30
* Add minetest.bulk_set_node call + optimize Environment::set_node call (#6958)Loïc Blot2018-01-30
* Apply physics overrides correctly during anticheat calculations (#6970)sfan52018-01-28
* [CSM] HUD Fix not updating server HUDs caused by 4f688d5SmallJoker2018-01-26
* Fix issues with earlier CSM HUD commit (#6940)red-0012018-01-26
* Disable fall damage when "immortal" group set (#6946)lisacvuk2018-01-23
* CSM: Remove screenshot APIred-0012018-01-23
span> {NDT_MESH, "mesh"}, {NDT_PLANTLIKE_ROOTED, "plantlike_rooted"}, {0, NULL}, }; struct EnumString ScriptApiNode::es_ContentParamType2[] = { {CPT2_NONE, "none"}, {CPT2_FULL, "full"}, {CPT2_FLOWINGLIQUID, "flowingliquid"}, {CPT2_FACEDIR, "facedir"}, {CPT2_WALLMOUNTED, "wallmounted"}, {CPT2_LEVELED, "leveled"}, {CPT2_DEGROTATE, "degrotate"}, {CPT2_MESHOPTIONS, "meshoptions"}, {CPT2_COLOR, "color"}, {CPT2_COLORED_FACEDIR, "colorfacedir"}, {CPT2_COLORED_WALLMOUNTED, "colorwallmounted"}, {CPT2_GLASSLIKE_LIQUID_LEVEL, "glasslikeliquidlevel"}, {0, NULL}, }; struct EnumString ScriptApiNode::es_LiquidType[] = { {LIQUID_NONE, "none"}, {LIQUID_FLOWING, "flowing"}, {LIQUID_SOURCE, "source"}, {0, NULL}, }; struct EnumString ScriptApiNode::es_ContentParamType[] = { {CPT_NONE, "none"}, {CPT_LIGHT, "light"}, {0, NULL}, }; struct EnumString ScriptApiNode::es_NodeBoxType[] = { {NODEBOX_REGULAR, "regular"}, {NODEBOX_FIXED, "fixed"}, {NODEBOX_WALLMOUNTED, "wallmounted"}, {NODEBOX_LEVELED, "leveled"}, {NODEBOX_CONNECTED, "connected"}, {0, NULL}, }; bool ScriptApiNode::node_on_punch(v3s16 p, MapNode node, ServerActiveObject *puncher, PointedThing pointed) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_punch", &p)) return false; // Call function push_v3s16(L, p); pushnode(L, node, ndef); objectrefGetOrCreate(L, puncher); pushPointedThing(pointed); PCALL_RES(lua_pcall(L, 4, 0, error_handler)); lua_pop(L, 1); // Pop error handler return true; } bool ScriptApiNode::node_on_dig(v3s16 p, MapNode node, ServerActiveObject *digger) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_dig", &p)) return false; // Call function push_v3s16(L, p); pushnode(L, node, ndef); objectrefGetOrCreate(L, digger); PCALL_RES(lua_pcall(L, 3, 0, error_handler)); lua_pop(L, 1); // Pop error handler return true; } void ScriptApiNode::node_on_construct(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_construct", &p)) return; // Call function push_v3s16(L, p); PCALL_RES(lua_pcall(L, 1, 0, error_handler)); lua_pop(L, 1); // Pop error handler } void ScriptApiNode::node_on_destruct(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_destruct", &p)) return; // Call function push_v3s16(L, p); PCALL_RES(lua_pcall(L, 1, 0, error_handler)); lua_pop(L, 1); // Pop error handler } bool ScriptApiNode::node_on_flood(v3s16 p, MapNode node, MapNode newnode) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_flood", &p)) return false; // Call function push_v3s16(L, p); pushnode(L, node, ndef); pushnode(L, newnode, ndef); PCALL_RES(lua_pcall(L, 3, 1, error_handler)); lua_remove(L, error_handler); return readParam<bool>(L, -1, false); } void ScriptApiNode::node_after_destruct(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "after_destruct", &p)) return; // Call function push_v3s16(L, p); pushnode(L, node, ndef); PCALL_RES(lua_pcall(L, 2, 0, error_handler)); lua_pop(L, 1); // Pop error handler } bool ScriptApiNode::node_on_timer(v3s16 p, MapNode node, f32 dtime) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_timer", &p)) return false; // Call function push_v3s16(L, p); lua_pushnumber(L,dtime); PCALL_RES(lua_pcall(L, 2, 1, error_handler)); lua_remove(L, error_handler); return readParam<bool>(L, -1, false); } void ScriptApiNode::node_on_receive_fields(v3s16 p, const std::string &formname, const StringMap &fields, ServerActiveObject *sender) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); const NodeDefManager *ndef = getServer()->ndef(); // If node doesn't exist, we don't know what callback to call MapNode node = getEnv()->getMap().getNodeNoEx(p); if (node.getContent() == CONTENT_IGNORE) return; // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_receive_fields", &p)) return; // Call function push_v3s16(L, p); // pos lua_pushstring(L, formname.c_str()); // formname lua_newtable(L); // fields StringMap::const_iterator it; for (it = fields.begin(); it != fields.end(); ++it) { const std::string &name = it->first; const std::string &value = it->second; lua_pushstring(L, name.c_str()); lua_pushlstring(L, value.c_str(), value.size()); lua_settable(L, -3); } objectrefGetOrCreate(L, sender); // player PCALL_RES(lua_pcall(L, 4, 0, error_handler)); lua_pop(L, 1); // Pop error handler }