aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
...
* Optionally specify propagateSunlight area in calcLightingkwolekr2015-01-05
* Fix off-by-one error in `string:split` implementation.Diego Martínez2015-01-04
* Exclude vertical mapblock borders when setting lightkwolekr2015-01-04
* NodeDef: Clear NodeResolver related entries too in clear()kwolekr2015-01-04
* Add minetest.generate_ores() and minetest.generate_decorations()kwolekr2015-01-04
* Fix broken android version due to new openssl not linking correct to curlsapier2015-01-05
* NodeResolver: Perform callback immediately if node registration phase finishedkwolekr2015-01-04
* Fix forgotten favourite list image update of simple menusapier2015-01-04
* Re-add lost way to debug simple menu on PCsapier2015-01-04
* Switch to official openssl version and update to 1.0.1jsapier2015-01-04
* Remove freezemelt documentation from lua_api.txtCraig Robbins2015-01-04
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Add warning about using deprecated fields in Mapgen API and update docskwolekr2015-01-04
* LuaVoxelManip: Error when given out-of-bounds areakwolekr2015-01-04
* Lighting: Fix nearly all issueskwolekr2015-01-04
* Update bundled SQLite to 3.8.7.4Kahrl2015-01-04
* Deduplicate code and use stdlib in string functionsShadowNinja2015-01-03
* Fix crash if NodeResolver destroyed before pending any node resolutionskwolekr2015-01-03
* Rewrite lua_api.txt into Markdown formatWuzzy2015-01-03
* More consistent progress bar from 0-100 on startupsapier2015-01-02
* Speedup initial android startup on some devices by factor 10 or moresapier2015-01-02
* Fix rounding error in font size making main menu and in game font sizes incon...sapier2015-01-02
* MgV5/6/7: Generate dungeons above water levelparamat2015-01-01
* Mgv7: Remove range limits on mountain height to enable modification through ....paramat2015-01-01
* Fix map parameter load orderkwolekr2014-12-30
* Add display_gamma option for clientCraig Robbins2014-12-31
* Fix endian.h include for FreeBSDDmitry Marakasov2014-12-30
* Cleanup updateCameraDirection and fix random input not workingCraig Robbins2014-12-30
* Replace instances of height_min/height_max with y_min/y_max to remove ambiguitykwolekr2014-12-30
* Decoration: Fix default parameter valueskwolekr2014-12-30
* Fix documentation for string functionsDiego Martínez2014-12-30
* Add support back for resolving group names in NodeResolverkwolekr2014-12-29
* Fix some lingering code style issueskwolekr2014-12-29
* Mapgen: Use getBlockSeed2() for blockseeds (much better uniformity)kwolekr2014-12-29
* Add core.get_mapgen_names() to Main Menu API (and use it)kwolekr2014-12-29
* Expose mapgen parameters on scripting initkwolekr2014-12-29
* Ignore downloaded public serverlist if public_serverlist is falseKahrl2014-12-30
* Center status text for better visibility.Kodexky2014-12-30
* Add extra buttons to Android GUI. All icons are licensed by freepik.com under...Kodexky2014-12-30
* Update Japanese TranslationRui2014-12-30
* Add util/bump_version.shKahrl2014-12-30
* Fix -Wtype-limits warnings and remove disabling of -Wtype-limitsCraig Robbins2014-12-29
* Print unit test failures to dstreamkwolekr2014-12-29
* FontEngine: Don't use file extension to check font file compatibilitykwolekr2014-12-29
* LuaVoxelManip: Remove blank allocatorkwolekr2014-12-29
* LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set...kwolekr2014-12-28
* Fix MSVC compiler warning about passing this pointer in initializer listsapier2014-12-28
* Faster string.split implementation.Diego Martinez2014-12-28
* MainMenu: Save 'hide gamemods' and 'hide modpack contents' checkbox state (fi...fz722014-12-28
* Skip further loading of client if there was an exit signalChristophe Piveteau2014-12-28
ass="hl opt">}, {NDT_NODEBOX, "nodebox"}, {NDT_MESH, "mesh"}, {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"}, {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}, }; ScriptApiNode::ScriptApiNode() { } ScriptApiNode::~ScriptApiNode() { } bool ScriptApiNode::node_on_punch(v3s16 p, MapNode node, ServerActiveObject *puncher, PointedThing pointed) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_punch")) 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); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_dig")) 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); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_construct")) 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); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_destruct")) 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_after_destruct(v3s16 p, MapNode node) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "after_destruct")) 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); INodeDefManager *ndef = getServer()->ndef(); // Push callback function on stack if (!getItemCallback(ndef->get(node).name.c_str(), "on_timer")) 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 (bool) lua_isboolean(L, -1) && (bool) lua_toboolean(L, -1) == true; } 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); INodeDefManager *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")) 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 } void ScriptApiNode::node_falling_update(v3s16 p) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); lua_getglobal(L, "nodeupdate"); push_v3s16(L, p); PCALL_RES(lua_pcall(L, 1, 0, error_handler)); lua_pop(L, 1); // Pop error handler } void ScriptApiNode::node_falling_update_single(v3s16 p) { SCRIPTAPI_PRECHECKHEADER int error_handler = PUSH_ERROR_HANDLER(L); lua_getglobal(L, "nodeupdate_single"); push_v3s16(L, p); PCALL_RES(lua_pcall(L, 1, 0, error_handler)); lua_pop(L, 1); // Pop error handler }