aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods
Commit message (Expand)AuthorAge
* Add mapgen_stair_cobble alias to minimalSfan52013-09-06
* Add support for different drowning damage and allow drowning in other nodetypesBlockMen2013-08-06
* Add drowningPilzAdam2013-06-19
* Compress texturesDavid Gumberg2013-06-18
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
* Use the group "soil" for nodes that saplings grow onShadowNinja2013-05-20
* Add Mapgen V7, reorganize biomeskwolekr2013-04-07
* unkn own block -> unkn own nodekhonkhortisan2013-04-05
* Add different place sound for nodesPilzAdam2013-03-29
* Use minetest.register_ore() in minimalPilzAdam2013-03-24
* Mapgen indev: float islands, larger far biomesproller2013-03-24
* Liquid fine tuningproller2013-03-14
* new adjustable finite liquidproller2013-02-24
* Readded and optimized mapgen V6kwolekr2013-01-21
* Add initial Lua biomedef support, fixed biome selectionkwolekr2013-01-21
* Add the group attached_nodePilzAdam2012-12-01
* Swap out pixel-perfect nyan cat by request of Chris TorresPerttu Ahola2012-11-09
* Add functions to the default mod of minimal game to support old codePilzAdam2012-11-01
* Move falling to builtinPilzAdam2012-10-31
* Fix crash when furnace is full (minimal game)Perttu Ahola2012-08-12
* Deprecate minetest.add_to_creative_inventory and use group not_in_creative_in...Perttu Ahola2012-07-25
* Add notice in the minimal gamePerttu Ahola2012-07-25
* Improve inventory callbacks a bitPerttu Ahola2012-07-25
* Detached inventory callbacks and reworked node metadata callbacksPerttu Ahola2012-07-25
* Detached inventoriesPerttu Ahola2012-07-24
* Add node timer test in minimal/experimentalPerttu Ahola2012-07-24
* Move /give, /giveme, /spawnentity and /pulverize to builtin/chatcommands.luaPerttu Ahola2012-07-23
* Formspec button_exit[] and image_button_exit[]Perttu Ahola2012-07-22
* Add /test1 command to minimal for testing a more complicated player inventory...Perttu Ahola2012-07-22
* Implement formspecdarkrose2012-07-22
* Actually fix facedir-rotated nodes placed using minetest.env:place_node()Perttu Ahola2012-07-21
* Make lava buckets work as fuel in minimal gamedarkrose2012-07-21
* Allow defining player's inventory form in LuaPerttu Ahola2012-07-19
* Custom boxy nodes (stairs, slabs) and collision changesKahrl2012-06-17
* Revert back proper crack texturePerttu Ahola2012-06-16
* Allow node cracking animations of any lengthPerttu Ahola2012-06-16
* Update field names to non-deprecated ones in node definition prototypePerttu Ahola2012-06-16
* Use new field names and reorder fields a bit in minimal gamePerttu Ahola2012-06-16
* Node texture animationPerttu Ahola2012-06-16
* Add experimental_tester_tool_1.png to minimal game (was accidentally left out)Perttu Ahola2012-06-08
* Allow groups in crafting recipesPerttu Ahola2012-06-06
* Add after_destruct and cache the existence of on_construct, on_destruct and a...Perttu Ahola2012-06-05
* place_node, dig_node and punch_node; an in-game tester tool; remove old codePerttu Ahola2012-06-05
* Add InvRef:is_empty(listname) and make chests/furnaces not diggable if not em...darkrose2012-06-03
* fix locked chest to not destroy denied items (minimal game)darkrose2012-06-03
* Add fire visualization to minimal furnace menuPerttu Ahola2012-06-03
* Use proper furnace cook timePerttu Ahola2012-06-03
* Lua implementation of furnace with visible active statedarkrose2012-06-03
* Implement locked chest; add after_place_node and after_dig_node node callbacksPerttu Ahola2012-06-03
* minetest.get_craft_resultPerttu Ahola2012-06-03
opt">(L, ret); } inline void readLuaValue(lua_State* L, u16& ret) { readNumericLuaValue(L, ret); } inline void readLuaValue(lua_State* L, u8& ret) { readNumericLuaValue(L, ret); } inline void readLuaValue(lua_State* L, v3fParameter& ret) { if (lua_isnil(L, -1)) return; if (lua_isnumber(L, -1)) { // shortcut for uniform vectors auto n = lua_tonumber(L, -1); ret = v3fParameter(n,n,n); } else { ret = (v3fParameter)check_v3f(L, -1); } } inline void readLuaValue(lua_State* L, v2fParameter& ret) { if (lua_isnil(L, -1)) return; if (lua_isnumber(L, -1)) { // shortcut for uniform vectors auto n = lua_tonumber(L, -1); ret = v2fParameter(n,n); } else { ret = (v2fParameter)check_v2f(L, -1); } } inline void readLuaValue(lua_State* L, TweenStyle& ret) { if (lua_isnil(L, -1)) return; static const EnumString opts[] = { {(int)TweenStyle::fwd, "fwd"}, {(int)TweenStyle::rev, "rev"}, {(int)TweenStyle::pulse, "pulse"}, {(int)TweenStyle::flicker, "flicker"}, {0, nullptr}, }; luaL_checktype(L, -1, LUA_TSTRING); int v = (int)TweenStyle::fwd; if (!string_to_enum(opts, v, lua_tostring(L, -1))) { throw LuaError("tween style must be one of ('fwd', 'rev', 'pulse', 'flicker')"); } ret = (TweenStyle)v; } inline void readLuaValue(lua_State* L, AttractorKind& ret) { if (lua_isnil(L, -1)) return; static const EnumString opts[] = { {(int)AttractorKind::none, "none"}, {(int)AttractorKind::point, "point"}, {(int)AttractorKind::line, "line"}, {(int)AttractorKind::plane, "plane"}, {0, nullptr}, }; luaL_checktype(L, -1, LUA_TSTRING); int v = (int)AttractorKind::none; if (!string_to_enum(opts, v, lua_tostring(L, -1))) { throw LuaError("attractor kind must be one of ('none', 'point', 'line', 'plane')"); } ret = (AttractorKind)v; } inline void readLuaValue(lua_State* L, BlendMode& ret) { if (lua_isnil(L, -1)) return; static const EnumString opts[] = { {(int)BlendMode::alpha, "alpha"}, {(int)BlendMode::add, "add"}, {(int)BlendMode::sub, "sub"}, {(int)BlendMode::screen, "screen"}, {0, nullptr}, }; luaL_checktype(L, -1, LUA_TSTRING); int v = (int)BlendMode::alpha; if (!string_to_enum(opts, v, lua_tostring(L, -1))) { throw LuaError("blend mode must be one of ('alpha', 'add', 'sub', 'screen')"); } ret = (BlendMode)v; } template <typename T> void readLuaValue(lua_State* L, RangedParameter<T>& field) { if (lua_isnil(L,-1)) return; if (!lua_istable(L,-1)) // is this is just a literal value? goto set_uniform; lua_getfield(L, -1, "min"); // handle convenience syntax for non-range values if (lua_isnil(L,-1)) { lua_pop(L, 1); goto set_uniform; } readLuaValue(L,field.min); lua_pop(L, 1); lua_getfield(L, -1, "max"); readLuaValue(L,field.max); lua_pop(L, 1); lua_getfield(L, -1, "bias"); if (!lua_isnil(L,-1)) readLuaValue(L,field.bias); lua_pop(L, 1); return; set_uniform: readLuaValue(L, field.min); readLuaValue(L, field.max); } template <typename T> void readLegacyValue(lua_State* L, const char* name, T& field) {} template <typename T> void readLegacyValue(lua_State* L, const char* name, RangedParameter<T>& field) { int tbl = lua_gettop(L); lua_pushliteral(L, "min"); lua_pushstring(L, name); lua_concat(L, 2); lua_gettable(L, tbl); if (!lua_isnil(L, -1)) { readLuaValue(L, field.min); } lua_settop(L, tbl); lua_pushliteral(L, "max"); lua_pushstring(L, name); lua_concat(L, 2); lua_gettable(L, tbl); if (!lua_isnil(L, -1)) { readLuaValue(L, field.max); } lua_settop(L, tbl); } template <typename T> void readTweenTable(lua_State* L, const char* name, TweenedParameter<T>& field) { int tbl = lua_gettop(L); lua_pushstring(L, name); lua_pushliteral(L, "_tween"); lua_concat(L, 2); lua_gettable(L, tbl); if(lua_istable(L, -1)) { int tween = lua_gettop(L); // get the starting value lua_pushinteger(L, 1), lua_gettable(L, tween); readLuaValue(L, field.start); lua_pop(L, 1); // get the final value -- use len instead of 2 so that this // gracefully degrades if keyframe support is later added lua_pushinteger(L, (lua_Integer)lua_objlen(L, -1)), lua_gettable(L, tween); readLuaValue(L, field.end); lua_pop(L, 1); // get the effect settings lua_getfield(L, -1, "style"); if (!lua_isnil(L,-1)) readLuaValue(L, field.style); lua_pop(L, 1); lua_getfield(L, -1, "reps"); if (!lua_isnil(L,-1)) readLuaValue(L, field.reps); lua_pop(L, 1); lua_getfield(L, -1, "start"); if (!lua_isnil(L,-1)) readLuaValue(L, field.beginning); lua_pop(L, 1); goto done; } else { lua_pop(L,1); } // the table is not present; check for nonanimated values lua_getfield(L, tbl, name); if(!lua_isnil(L, -1)) { readLuaValue(L, field.start); lua_settop(L, tbl); goto set_uniform; } else { lua_pop(L,1); } // the goto did not trigger, so this table is not present either // check for pre-5.6.0 legacy values readLegacyValue(L, name, field.start); set_uniform: field.end = field.start; done: lua_settop(L, tbl); // clean up after ourselves } inline u16 readAttachmentID(lua_State* L, const char* name) { u16 id = 0; lua_getfield(L, -1, name); if (!lua_isnil(L, -1)) { ObjectRef *ref = ObjectRef::checkobject(L, -1); if (auto obj = ObjectRef::getobject(ref)) id = obj->getId(); } lua_pop(L, 1); return id; } void readTexValue(lua_State* L, ServerParticleTexture& tex); }