From a8d9bba4b34aff54ffca123833795dbc50f3bc6d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 16 May 2021 11:33:49 +0200 Subject: [PATCH] update --- mods/3d_armor/3d_armor_ui/init.lua | 6 +- .../3d_armor_ui/locale/3d_armor_ui.fr.tr | 1 - mods/3d_armor/3d_armor_ui/locale/template.txt | 1 - .../worldedit/manipulations.lua | 30 +- mods/advtrains/advtrains/couple.lua | 1 - mods/advtrains/advtrains/nodedb.lua | 2 + mods/advtrains/advtrains/trackplacer.lua | 1 + mods/advtrains/advtrains/tracks.lua | 4 +- mods/advtrains/advtrains/trainlogic.lua | 17 +- mods/advtrains/advtrains/wagons.lua | 1 + .../advtrains_luaautomation/atc_rail.lua | 5 +- .../advtrains_luaautomation/init.lua | 8 +- mods/advtrains/advtrains_train_track/init.lua | 38 +- mods/advtrains/serialize_lib/atomic.lua | 2 +- mods/advtrains/serialize_lib/serialize.lua | 6 + mods/ambience/init.lua | 8 +- mods/anvils/depends.txt | 1 + mods/anvils/init.lua | 1 + mods/anvils/tools.lua | 3 + .../advtrains_train_industrial/init.lua | 2 +- .../advtrains_train_steam/init.lua | 4 +- mods/basic_trains/license.txt | 198 +++++ mods/basic_trains/license_media.txt | 68 ++ mods/biome_lib/API.txt | 135 ++- mods/biome_lib/README.md | 4 +- mods/biome_lib/api.lua | 689 +++++++++++++++ mods/biome_lib/block_queue_checks.lua | 140 +++ mods/biome_lib/compat.lua | 115 +++ mods/biome_lib/growth.lua | 30 +- mods/biome_lib/init.lua | 803 +----------------- mods/biome_lib/search_functions.lua | 28 +- mods/biome_lib/settingtypes.txt | 2 +- mods/bonemeal/init.lua | 32 +- mods/builtin_item/init.lua | 116 +-- mods/castle/pillars.lua | 10 +- mods/castle/town_item.lua | 30 +- mods/doors/init.lua | 312 +++++-- mods/farming/crops/barley.lua | 5 +- mods/farming/crops/beans.lua | 4 +- mods/farming/crops/beetroot.lua | 9 +- mods/farming/crops/blueberry.lua | 7 +- mods/farming/crops/carrot.lua | 5 +- mods/farming/crops/chili.lua | 9 +- mods/farming/crops/cocoa.lua | 8 +- mods/farming/crops/coffee.lua | 12 +- mods/farming/crops/corn.lua | 10 +- mods/farming/crops/grapes.lua | 4 +- mods/farming/crops/hemp.lua | 2 +- mods/farming/crops/lettuce.lua | 2 +- mods/farming/crops/melon.lua | 10 +- mods/farming/crops/mint.lua | 14 +- mods/farming/crops/onion.lua | 9 +- mods/farming/crops/peas.lua | 10 +- mods/farming/crops/pepper.lua | 26 +- mods/farming/crops/pineapple.lua | 18 +- mods/farming/crops/pumpkin.lua | 8 +- mods/farming/crops/rhubarb.lua | 2 +- mods/farming/crops/ryeoatrice.lua | 15 +- mods/farming/crops/soy.lua | 37 +- mods/farming/crops/tomato.lua | 17 + mods/farming/crops/vanilla.lua | 22 +- mods/farming/crops/wheat.lua | 12 +- mods/farming/food.lua | 117 ++- mods/farming/license.txt | 9 + mods/farming/textures/farming_gyoza.png | Bin 603 -> 266 bytes .../farming/textures/farming_melon_bottom.png | Bin 0 -> 172 bytes mods/farming/textures/farming_melon_side.png | Bin 270 -> 179 bytes mods/farming/textures/farming_melon_top.png | Bin 272 -> 193 bytes mods/farming/textures/farming_mint_1.png | Bin 114 -> 155 bytes mods/farming/textures/farming_mint_2.png | Bin 122 -> 172 bytes mods/farming/textures/farming_mint_3.png | Bin 132 -> 191 bytes mods/farming/textures/farming_mint_4.png | Bin 174 -> 233 bytes mods/farming/textures/farming_mint_leaf.png | Bin 158 -> 253 bytes mods/farming/textures/farming_mint_tea.png | Bin 166 -> 289 bytes .../textures/farming_pineapple_ring.png | Bin 164 -> 449 bytes mods/farming/textures/farming_tomato_soup.png | Bin 0 -> 161 bytes mods/farming/utensils.lua | 7 +- .../computers/aliases.lua | 1 + .../homedecor_kitchen/init.lua | 2 +- mods/mob_horse/init.lua | 23 +- mods/mob_horse/readme.md | 4 +- .../textures/mobs_horseshoe_crystal.png | Bin 0 -> 153 bytes .../textures/mobs_horseshoe_crystalo.png | Bin 0 -> 106 bytes mods/mobs_animal/bunny.lua | 6 +- mods/mobs_animal/cow.lua | 20 +- mods/mobs_animal/kitten.lua | 3 +- mods/mobs_animal/rat.lua | 4 +- mods/mobs_monster/fire_spirit.lua | 88 ++ mods/mobs_monster/init.lua | 1 + .../textures/mobs_fire_spirit.png | Bin 0 -> 274 bytes mods/mobs_npc/igor.lua | 60 +- mods/mobs_npc/lucky_block.lua | 3 +- mods/mobs_npc/npc.lua | 59 +- mods/mobs_npc/textures/mobs_npc3.png | Bin 0 -> 870 bytes mods/mobs_npc/textures/mobs_npc4.png | Bin 0 -> 686 bytes mods/mobs_redo/api.lua | 78 +- mods/mobs_redo/api.txt | 4 + mods/mobs_redo/crafts.lua | 22 +- mods/mywoodslopes/ethereal.lua | 10 +- mods/pie/init.lua | 43 +- mods/playerplus/README.md | 2 +- mods/playerplus/init.lua | 2 +- mods/skinsdb/meta/character_2024.txt | 3 + mods/skinsdb/meta/character_2025.txt | 3 + mods/skinsdb/meta/character_2026.txt | 3 + mods/skinsdb/meta/character_2027.txt | 3 + mods/skinsdb/meta/character_2028.txt | 3 + mods/skinsdb/meta/character_2029.txt | 3 + mods/skinsdb/meta/character_2030.txt | 3 + mods/skinsdb/textures/character_2024.png | Bin 0 -> 1138 bytes mods/skinsdb/textures/character_2025.png | Bin 0 -> 8325 bytes mods/skinsdb/textures/character_2026.png | Bin 0 -> 8325 bytes mods/skinsdb/textures/character_2027.png | Bin 0 -> 8238 bytes mods/skinsdb/textures/character_2028.png | Bin 0 -> 7125 bytes mods/skinsdb/textures/character_2029.png | Bin 0 -> 6672 bytes mods/skinsdb/textures/character_2030.png | Bin 0 -> 1932 bytes mods/techpack/tubelib_addons1/nodes.lua | 2 + mods/ts_doors/init.lua | 104 ++- mods/unified_inventory/api.lua | 6 + mods/unifieddyes/airbrush.lua | 9 +- mods/wine/init.lua | 18 +- 121 files changed, 2343 insertions(+), 1516 deletions(-) mode change 100644 => 100755 mods/basic_trains/advtrains_train_industrial/init.lua create mode 100644 mods/basic_trains/license.txt create mode 100755 mods/basic_trains/license_media.txt create mode 100644 mods/biome_lib/api.lua create mode 100644 mods/biome_lib/block_queue_checks.lua create mode 100644 mods/biome_lib/compat.lua create mode 100644 mods/farming/textures/farming_melon_bottom.png create mode 100644 mods/farming/textures/farming_tomato_soup.png create mode 100644 mods/mob_horse/textures/mobs_horseshoe_crystal.png create mode 100644 mods/mob_horse/textures/mobs_horseshoe_crystalo.png create mode 100644 mods/mobs_monster/fire_spirit.lua create mode 100644 mods/mobs_monster/textures/mobs_fire_spirit.png create mode 100644 mods/mobs_npc/textures/mobs_npc3.png create mode 100644 mods/mobs_npc/textures/mobs_npc4.png create mode 100644 mods/skinsdb/meta/character_2024.txt create mode 100644 mods/skinsdb/meta/character_2025.txt create mode 100644 mods/skinsdb/meta/character_2026.txt create mode 100644 mods/skinsdb/meta/character_2027.txt create mode 100644 mods/skinsdb/meta/character_2028.txt create mode 100644 mods/skinsdb/meta/character_2029.txt create mode 100644 mods/skinsdb/meta/character_2030.txt create mode 100644 mods/skinsdb/textures/character_2024.png create mode 100644 mods/skinsdb/textures/character_2025.png create mode 100644 mods/skinsdb/textures/character_2026.png create mode 100644 mods/skinsdb/textures/character_2027.png create mode 100644 mods/skinsdb/textures/character_2028.png create mode 100644 mods/skinsdb/textures/character_2029.png create mode 100644 mods/skinsdb/textures/character_2030.png diff --git a/mods/3d_armor/3d_armor_ui/init.lua b/mods/3d_armor/3d_armor_ui/init.lua index 293cd28c..397a6318 100644 --- a/mods/3d_armor/3d_armor_ui/init.lua +++ b/mods/3d_armor/3d_armor_ui/init.lua @@ -2,14 +2,14 @@ local S = minetest.get_translator(minetest.get_current_modname()) local F = minetest.formspec_escape local has_technic = minetest.get_modpath("technic") ~= nil -local ui = unified_inventory if not minetest.global_exists("unified_inventory") then - minetest.log("warning", S("3d_armor_ui: Mod loaded but unused.")) + minetest.log("warning", "3d_armor_ui: Mod loaded but unused.") return end -if unified_inventory.sfinv_compat_layer then +local ui = unified_inventory +if ui.sfinv_compat_layer then return end diff --git a/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr b/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr index b7538f6c..38e0f05a 100644 --- a/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr +++ b/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr @@ -4,7 +4,6 @@ ### init.lua ### 3d Armor=Armure 3d -3d_armor_ui: Mod loaded but unused.=3d_armor_ui : Mod chargé mais inutilisé. Armor=Armure Armor not initialized!=Armure non initialisée ! Fire=Feu diff --git a/mods/3d_armor/3d_armor_ui/locale/template.txt b/mods/3d_armor/3d_armor_ui/locale/template.txt index be95c086..0f7a8cb5 100644 --- a/mods/3d_armor/3d_armor_ui/locale/template.txt +++ b/mods/3d_armor/3d_armor_ui/locale/template.txt @@ -4,7 +4,6 @@ ### init.lua ### 3d Armor= -3d_armor_ui: Mod loaded but unused.= Armor= Armor not initialized!= Fire= diff --git a/mods/Minetest-WorldEdit/worldedit/manipulations.lua b/mods/Minetest-WorldEdit/worldedit/manipulations.lua index 3bad0ddc..54dc8885 100644 --- a/mods/Minetest-WorldEdit/worldedit/manipulations.lua +++ b/mods/Minetest-WorldEdit/worldedit/manipulations.lua @@ -640,10 +640,34 @@ function worldedit.clear_objects(pos1, pos2) worldedit.keep_loaded(pos1, pos2) + local function should_delete(obj) + -- Avoid players and WorldEdit entities + if obj:is_player() then + return false + end + local entity = obj:get_luaentity() + return not entity or not entity.name:find("^worldedit:") + end + -- Offset positions to include full nodes (positions are in the center of nodes) local pos1x, pos1y, pos1z = pos1.x - 0.5, pos1.y - 0.5, pos1.z - 0.5 local pos2x, pos2y, pos2z = pos2.x + 0.5, pos2.y + 0.5, pos2.z + 0.5 + local count = 0 + if minetest.get_objects_in_area then + local objects = minetest.get_objects_in_area({x=pos1x, y=pos1y, z=pos1z}, + {x=pos2x, y=pos2y, z=pos2z}) + + for _, obj in pairs(objects) do + if should_delete(obj) then + obj:remove() + count = count + 1 + end + end + return count + end + + -- Fallback implementation via get_objects_inside_radius -- Center of region local center = { x = pos1x + ((pos2x - pos1x) / 2), @@ -655,12 +679,8 @@ function worldedit.clear_objects(pos1, pos2) (center.x - pos1x) ^ 2 + (center.y - pos1y) ^ 2 + (center.z - pos1z) ^ 2) - local count = 0 for _, obj in pairs(minetest.get_objects_inside_radius(center, radius)) do - local entity = obj:get_luaentity() - -- Avoid players and WorldEdit entities - if not obj:is_player() and (not entity or - not entity.name:find("^worldedit:")) then + if should_delete(obj) then local pos = obj:get_pos() if pos.x >= pos1x and pos.x <= pos2x and pos.y >= pos1y and pos.y <= pos2y and diff --git a/mods/advtrains/advtrains/couple.lua b/mods/advtrains/advtrains/couple.lua index a38ca69a..3dc336fa 100644 --- a/mods/advtrains/advtrains/couple.lua +++ b/mods/advtrains/advtrains/couple.lua @@ -149,7 +149,6 @@ minetest.register_entity("advtrains:couple", { end self.position_set=true end - atprintbm("couple step", t) advtrains.atprint_context_tid=nil end, }) diff --git a/mods/advtrains/advtrains/nodedb.lua b/mods/advtrains/advtrains/nodedb.lua index c6647926..36b5deae 100644 --- a/mods/advtrains/advtrains/nodedb.lua +++ b/mods/advtrains/advtrains/nodedb.lua @@ -116,6 +116,8 @@ function ndb.load_callback(file) local stid_byte = file:read(2) local stid = bytes_to_int(stid_byte) local stna = file:read("*l") + -- possibly windows fix: strip trailing \r's from line + stna = string.gsub(stna, "\r$", "") --atdebug("content id:", stid, "->", stna) ndb_nodeids[stid] = stna end diff --git a/mods/advtrains/advtrains/trackplacer.lua b/mods/advtrains/advtrains/trackplacer.lua index 356df15f..fe762909 100644 --- a/mods/advtrains/advtrains/trackplacer.lua +++ b/mods/advtrains/advtrains/trackplacer.lua @@ -286,6 +286,7 @@ function tp.register_track_placer(nnprefix, imgprefix, dispname, def) return itemstack, false end if minetest.registered_nodes[minetest.get_node(pos).name] and minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then + local s if def.suitable_substrate then s = def.suitable_substrate(upos) else diff --git a/mods/advtrains/advtrains/tracks.lua b/mods/advtrains/advtrains/tracks.lua index 33a79997..261818e3 100644 --- a/mods/advtrains/advtrains/tracks.lua +++ b/mods/advtrains/advtrains/tracks.lua @@ -524,7 +524,7 @@ function advtrains.register_tracks(tracktype, def, preset) end ndef.on_rightclick = function(pos, node, player) if advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then - advtrains.setstate(pos, newstate, node) + advtrains.setstate(pos, nil, node) advtrains.log("Switch", player:get_player_name(), pos) end end @@ -667,7 +667,7 @@ function sl.create_slopeplacer_on_place(def, preset) local yaw=player.get_look_horizontal and player:get_look_horizontal() or (player:get_look_yaw() - math.pi/2) --rounding unit vectors is a nice way for selecting 1 of 8 directions since sin(30°) is 0.5. - dirvec={x=math.floor(math.sin(-yaw)+0.5), y=0, z=math.floor(math.cos(-yaw)+0.5)} + local dirvec={x=math.floor(math.sin(-yaw)+0.5), y=0, z=math.floor(math.cos(-yaw)+0.5)} --translate to direction to look up inside the preset table local param2, rot45=({ [-1]={ diff --git a/mods/advtrains/advtrains/trainlogic.lua b/mods/advtrains/advtrains/trainlogic.lua index c9c7e769..d83d89fc 100644 --- a/mods/advtrains/advtrains/trainlogic.lua +++ b/mods/advtrains/advtrains/trainlogic.lua @@ -139,9 +139,12 @@ minetest.register_on_joinplayer(function(player) advtrains.hhud[player:get_player_name()] = nil --independent of this, cause all wagons of the train which are loaded to reattach their players --needed because already loaded wagons won't call reattach_all() - for _,wagon in pairs(minetest.luaentities) do - if wagon.is_wagon and wagon.initialized and wagon.train_id==id then - wagon:reattach_all() + local id=advtrains.player_to_train_mapping[pname] + if id then + for _,wagon in pairs(minetest.luaentities) do + if wagon.is_wagon and wagon.initialized and wagon.train_id==id then + wagon:reattach_all() + end end end end) @@ -160,6 +163,8 @@ minetest.register_on_dieplayer(function(player) wagon:get_off_plr(pname) end end + -- just in case no wagon felt responsible for this player: clear train mapping + advtrains.player_to_train_mapping[pname] = nil end end) @@ -1076,6 +1081,12 @@ function advtrains.split_train_at_index(train, index) atwarn("Train",train_id,"is not initialized! Operation aborted!") return end + + -- make sure that the train is fully on track before splitting. May cause problems otherwise + if train.index > train.path_trk_f or train.end_index < train.path_trk_b then + atwarn("Train",train_id,": cannot split train because it is off track!") + return + end local p_index=advtrains.path_get_index_by_offset(train, train.index, - data.pos_in_train + wagon.wagon_span) local pos, connid, frac = advtrains.path_getrestore(train, p_index) diff --git a/mods/advtrains/advtrains/wagons.lua b/mods/advtrains/advtrains/wagons.lua index f918571d..e9b6d7a1 100644 --- a/mods/advtrains/advtrains/wagons.lua +++ b/mods/advtrains/advtrains/wagons.lua @@ -934,6 +934,7 @@ function wagon:show_bordcom(pname) if not self:train() then return end local train = self:train() local data = advtrains.wagons[self.id] + local linhei local form = "size[11,9]label[0.5,0;AdvTrains Boardcom v0.1]" form=form.."textarea[0.5,1.5;7,1;text_outside;"..attrans("Text displayed outside on train")..";"..(minetest.formspec_escape(train.text_outside or "")).."]" diff --git a/mods/advtrains/advtrains_luaautomation/atc_rail.lua b/mods/advtrains/advtrains_luaautomation/atc_rail.lua index 2d6efe5b..b862129a 100644 --- a/mods/advtrains/advtrains_luaautomation/atc_rail.lua +++ b/mods/advtrains/advtrains_luaautomation/atc_rail.lua @@ -201,7 +201,10 @@ advtrains.register_tracks("default", { --set arrowconn (for ATC) local ph=minetest.pos_to_string(pos) local _, conns=advtrains.get_rail_info_at(pos, advtrains.all_tracktypes) - atlatc.active.nodes[ph].arrowconn=conns[1].c + local nodeent = atlatc.active.nodes[ph] + if nodeent then + nodeent.arrowconn=conns[1].c + end end, advtrains = { diff --git a/mods/advtrains/advtrains_luaautomation/init.lua b/mods/advtrains/advtrains_luaautomation/init.lua index b6fe464a..ab625b10 100644 --- a/mods/advtrains/advtrains_luaautomation/init.lua +++ b/mods/advtrains/advtrains_luaautomation/init.lua @@ -2,12 +2,8 @@ -- Lua automation features for advtrains -- Uses global table 'atlatc' (AdvTrains_LuaATC) --- Boilerplate to support localized strings if intllib mod is installed. -if intllib then - atltrans = intllib.Getter() -else - atltrans = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end -end +--TODO: re-add localization (if merging localization, discard this hunk please) +atltrans = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end --Privilege --Only trusted players should be enabled to build stuff which can break the server. diff --git a/mods/advtrains/advtrains_train_track/init.lua b/mods/advtrains/advtrains_train_track/init.lua index 744d86b7..6bb8b338 100755 --- a/mods/advtrains/advtrains_train_track/init.lua +++ b/mods/advtrains/advtrains_train_track/init.lua @@ -226,25 +226,25 @@ local function train_load(pos, train_id, unload) local inv = minetest.get_inventory({type="node", pos={x=pos.x, y=pos.y-1, z=pos.z}}) if inv and train.velocity < 2 then for k, v in ipairs(train.trainparts) do - - local i=minetest.get_inventory({type="detached", name="advtrains_wgn_"..v}) - if i then - if not unload then - for _, item in ipairs(inv:get_list("main")) do - if i:get_list("box") and i:room_for_item("box", item) then - i:add_item("box", item) - inv:remove_item("main", item) - end - end - else - for _, item in ipairs(i:get_list("box")) do - if inv:get_list("main") and inv:room_for_item("main", item) then - i:remove_item("box", item) - inv:add_item("main", item) - end - end - end - end + + local i=minetest.get_inventory({type="detached", name="advtrains_wgn_"..v}) + if i and i:get_list("box") then + if not unload then + for _, item in ipairs(inv:get_list("main")) do + if i:get_list("box") and i:room_for_item("box", item) then + i:add_item("box", item) + inv:remove_item("main", item) + end + end + else + for _, item in ipairs(i:get_list("box")) do + if inv:get_list("main") and inv:room_for_item("main", item) then + i:remove_item("box", item) + inv:add_item("main", item) + end + end + end + end end end end diff --git a/mods/advtrains/serialize_lib/atomic.lua b/mods/advtrains/serialize_lib/atomic.lua index 4a48c274..886b6a4a 100644 --- a/mods/advtrains/serialize_lib/atomic.lua +++ b/mods/advtrains/serialize_lib/atomic.lua @@ -107,7 +107,7 @@ function serialize_lib.load_atomic(filename, callback) end end - if minetest.settings:get_bool("serialize_lib_strict_loading") then + if minetest.settings:get_bool("serialize_lib_strict_loading", true) then serialize_lib.save_lock = true error("Loading data from file '"..filename.."' failed:\n" ..ret.."\nDisable Strict Loading to ignore.") diff --git a/mods/advtrains/serialize_lib/serialize.lua b/mods/advtrains/serialize_lib/serialize.lua index 4b1ebb79..78ddcfdc 100644 --- a/mods/advtrains/serialize_lib/serialize.lua +++ b/mods/advtrains/serialize_lib/serialize.lua @@ -117,6 +117,8 @@ function read_table(t, file) file:close() error("Unexpected EOF or read error!") end + -- possibly windows fix: strip trailing \r's from line + line = string.gsub(line, "\r$", "") if line=="E" then -- done with this table @@ -203,6 +205,8 @@ end -- config: see above local function read_from_fd(file) local first_line = file:read("*line") + -- possibly windows fix: strip trailing \r's from line + first_line = string.gsub(first_line, "\r$", "") if not string.match(first_line, "LUA_SER v=[12]") then file:close() error("Expected header, got '"..first_line.."' instead!") @@ -210,6 +214,8 @@ local function read_from_fd(file) local t = {} read_table(t, file) local last_line = file:read("*line") + -- possibly windows fix: strip trailing \r's from line + last_line = string.gsub(last_line, "\r$", "") file:close() if last_line ~= "END_SER" then error("Missing END_SER, got '"..last_line.."' instead!") diff --git a/mods/ambience/init.lua b/mods/ambience/init.lua index f911d378..88dfc735 100644 --- a/mods/ambience/init.lua +++ b/mods/ambience/init.lua @@ -129,13 +129,13 @@ local get_ambience = function(player, tod, name) pos.y = pos.y + 1.4 -- head level - local nod_head = pplus and name and playerplus[name].nod_head or - minetest.get_node(pos).name + local nod_head = pplus and name and playerplus[name] + and playerplus[name].nod_head or minetest.get_node(pos).name pos.y = pos.y - 1.2 -- foot level - local nod_feet = pplus and name and playerplus[name].nod_feet or - minetest.get_node(pos).name + local nod_feet = pplus and name and playerplus[name] + and playerplus[name].nod_feet or minetest.get_node(pos).name pos.y = pos.y - 0.2 -- reset pos diff --git a/mods/anvils/depends.txt b/mods/anvils/depends.txt index 37b0856b..bc6710fa 100644 --- a/mods/anvils/depends.txt +++ b/mods/anvils/depends.txt @@ -4,5 +4,6 @@ farming? ethereal? moreores? 3d_armor? +shields? xanadu? mobs? diff --git a/mods/anvils/init.lua b/mods/anvils/init.lua index 408295cd..3aaf626f 100644 --- a/mods/anvils/init.lua +++ b/mods/anvils/init.lua @@ -208,6 +208,7 @@ local anvildef = { is_ground_content = false, paramtype2 = "facedir", drawtype = "nodebox", + use_texture_alpha = "clip", node_box = { type = "fixed", fixed = { diff --git a/mods/anvils/tools.lua b/mods/anvils/tools.lua index b01708d4..d84729e2 100644 --- a/mods/anvils/tools.lua +++ b/mods/anvils/tools.lua @@ -180,4 +180,7 @@ if minetest.get_modpath("xanadu") then add_tool("xanadu:chestplate_ccrystal", "ethereal:crystal_ingot", 8) add_tool("xanadu:leggings_ccrystal", "ethereal:crystal_ingot", 7) add_tool("xanadu:boots_ccrystal", "ethereal:crystal_ingot", 4) + add_tool("3d_armor:boots_nyan", "nyancat:nyancat_rainbow", 4) + add_tool("3d_armor:helmet_watercrystal", "ethereal:crystal_ingot", 5) + add_tool("3d_armor:boots_mese", "default:mese_crystal", 8) end diff --git a/mods/basic_trains/advtrains_train_industrial/init.lua b/mods/basic_trains/advtrains_train_industrial/init.lua old mode 100644 new mode 100755 index dde7d83f..f22f8065 --- a/mods/basic_trains/advtrains_train_industrial/init.lua +++ b/mods/basic_trains/advtrains_train_industrial/init.lua @@ -45,7 +45,7 @@ advtrains.register_wagon("engine_industrial_big", { seats = { { name=S("Driver Stand (right)"), - attach_offset={x=5, y=7, z=20}, + attach_offset={x=5, y=-3, z=20}, view_offset={x=5.2, y=-4, z=11}, driving_ctrl_access=true, group = "dstand", diff --git a/mods/basic_trains/advtrains_train_steam/init.lua b/mods/basic_trains/advtrains_train_steam/init.lua index 057ad8f5..2f46ac29 100755 --- a/mods/basic_trains/advtrains_train_steam/init.lua +++ b/mods/basic_trains/advtrains_train_steam/init.lua @@ -81,13 +81,13 @@ advtrains.register_wagon("detailed_steam_engine", { seats = { { name=S("Driver Stand (left)"), - attach_offset={x=-5, y=10, z=-10}, + attach_offset={x=-8, y=0, z=-10}, view_offset={x=9, y=-2, z=-6}, group = "dstand", }, { name=S("Driver Stand (right)"), - attach_offset={x=5, y=10, z=-10}, + attach_offset={x=8, y=0, z=-10}, view_offset={x=0, y=6, z=0}, group = "dstand", }, diff --git a/mods/basic_trains/license.txt b/mods/basic_trains/license.txt new file mode 100644 index 00000000..83596b37 --- /dev/null +++ b/mods/basic_trains/license.txt @@ -0,0 +1,198 @@ +Copyright (C) 2016-2020 Moritz Blei (orwell96) and contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + +================================= + +GNU AFFERO GENERAL PUBLIC LICENSE + +Version 3, 19 November 2007 + +Copyright © 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +Preamble + +The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. + +A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. + +The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. + +An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS +0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. +1. Source Code. + +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. + +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. +2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. +7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. \ No newline at end of file diff --git a/mods/basic_trains/license_media.txt b/mods/basic_trains/license_media.txt new file mode 100755 index 00000000..888cf00e --- /dev/null +++ b/mods/basic_trains/license_media.txt @@ -0,0 +1,68 @@ +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. + "Creative Commons Compatible License" means a license that is listed at https://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. + "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + to Distribute and Publicly Perform Adaptations. + + For the avoidance of doubt: + Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. + You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. + If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. + + Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. + + Creative Commons may be contacted at https://creativecommons.org/. diff --git a/mods/biome_lib/API.txt b/mods/biome_lib/API.txt index a7a5f62d..b2bd94d8 100644 --- a/mods/biome_lib/API.txt +++ b/mods/biome_lib/API.txt @@ -1,30 +1,28 @@ This document describes the Plantlife mod API. -Last revision: 2015-02-16 +Last revision: 2021-04-20 ========= Functions ========= -There are three main functions defined by the main "biome_lib" mod: +There are two main functions defined by this mod: -spawn_on_surfaces() -register_generate_plant() -grow_plants() +biome_lib.register_active_spawner() +biome_lib.register_on_generate() There are also several internal, helper functions that can be called if so desired, but they are not really intended for use by other mods and may change at any time. They are briefly described below these main functions, but see init.lua for details. -Most functions in plants lib are declared locally to avoid namespace -collisions with other mods. They are accessible via the "biome_lib" method, -e.g. biome_lib:spawn_on_surfaces() and so forth. +Most functions in biome_lib are either declared locally or kept within its +own namespace to avoid collisions/conflicts with other mods. ===== -spawn_on_surfaces(biome) -spawn_on_surfaces(sdelay, splant, sradius, schance, ssurface, savoid) +biome_lib.register_active_spawner(biome) +biome_lib.register_active_spawner(sdelay, splant, sradius, schance, ssurface, savoid) This first function is an ABM-based spawner function originally created as part of Ironzorg's flowers mod. It has since been largely extended and @@ -112,9 +110,9 @@ biome = { depth_max = num, -- If the object spawns on top of a water source, the -- water must be at most this deep. Defaults to 1. min_elevation = num, -- Surface must be at this altitude or higher to - -- spawn at all. Defaults to -31000... - max_elevation = num, -- ...but must be no higher than this altitude. - -- Defaults to +31000. + -- spawn at all. Defaults to -16 meters. + max_elevation = num, -- Surface must be no higher than this altitude. + -- Defaults to +48. near_nodes = {table}, -- List of nodes that must be somewhere in the -- vicinity in order for the plant to spawn. Can also -- be a string with a single node name. If not @@ -220,7 +218,7 @@ checking is disabled. Same holds true for the nneighbors bit above that. ===== -biome_lib:register_generate_plant(biome, nodes_or_function_or_treedef) +biome_lib.register_on_generate(biome, nodes_or_function_or_treedef) To register an object to be spawned at mapgen time rather than via an ABM, call this function with two parameters: a table with your object's biome @@ -270,8 +268,8 @@ biome = { depth = num, -- How deep/thick of a layer the spawned-on node must -- be. Typically used for water. min_elevation = num, -- Minimum elevation in meters/nodes. Defaults to - -- -31000 (unlimited). - max_elevation = num, -- Max elevation. Defaults to +31000 (unlimited). + -- -16 meters. + max_elevation = num, -- Max elevation. Defaults to +48m. near_nodes = {table}, -- what nodes must be in the general vicinity of the -- object being spawned. near_nodes_size = num, -- how wide of a search area to look for the nodes @@ -334,18 +332,17 @@ will be called in the form: somefunction(pos) - ===== -biome_lib:grow_plants(options) +biome_lib.update_plant(options) -The third function, grow_plants() is used to turn the spawned nodes above -into something else over time. This function has no return value, and accepts -a biome definition table as the only parameter. These are defined like so: +This third function is used to turn the spawned nodes above into something +else over time. This function has no return value, and accepts a biome +definition table as the only parameter. These are defined like so: options = { label = string, -- set this to identify the ABM for Minetest's -- profiler. If not set, biome_lib will set it to - -- "biome_lib grow_plants(): " appended with the node + -- "biome_lib.update_plant(): " appended with the node -- in grow_plant (or the first item if it's a table) grow_plant = "string" or {table}, -- Name(s) of the node(s) to be grown -- into something else. This value is passed to the @@ -426,7 +423,7 @@ and grow_result is ignored. ===== -find_adjacent_wall(pos, verticals, randomflag) +biome_lib.find_adjacent_wall(pos, verticals, randomflag) Of the few helper functions, this one expects a position parameter and a table with the list of nodes that should be considered as walls. The code will @@ -438,7 +435,7 @@ random wall it finds adjacent to the target position. Defaults to false if not specified. ===== -is_node_loaded(pos) +biome_lib.is_node_loaded(pos) This acts as a wrapper for the minetest.get_node_or_nil(node_pos) function and accepts a single position parameter. Returns true if the node in @@ -446,7 +443,7 @@ question is already loaded, or false if not. ===== -dbg(string, level) +biome_lib.dbg(string, level) This is a simple debug output function which takes one string parameter. It just checks if DEBUG is true and outputs the phrase "[Plantlife] " followed by @@ -463,8 +460,8 @@ ought always be shown, 1 for errors, 2 for warnings, 3 for info, 4 for verbose spammy stuff. ===== -biome_lib:generate_tree(pos, treemodel) -biome_lib:grow_tree(pos, treemodel) +biome_lib.generate_ltree(pos, treemodel) +biome_lib.grow_ltree(pos, treemodel) In the case of the growing code and the mapgen-based tree generator code, generating a tree is done via the above two calls, which in turn immediately @@ -472,13 +469,13 @@ call the usual spawn_tree() functions. This rerouting exists as a way for other mods to hook into biome_lib's tree-growing functions in general, perhaps to execute something extra whenever a tree is spawned. -biome_lib:generate_tree(pos, treemodel) is called any time a tree is spawned +biome_lib.generate_ltree(pos, treemodel) is called any time a tree is spawned at map generation time. 'pos' is the position of the block on which the tree is to be placed. 'treemodel' is the standard L-Systems tree definition table expected by the spawn_tree() function. Refer to the 'trunk' field in that table to derive the name of the tree being spawned. -biome_lib:grow_tree(pos, treemodel) does the same sort of thing whenever a +biome_lib.grow_ltree(pos, treemodel) does the same sort of thing whenever a tree is spawned within the abm-based growing code, for example when growing a sapling into a tree. @@ -487,22 +484,6 @@ sapling into a tree. There are other, internal helper functions that are not meant for use by other mods. Don't rely on them, as they are subject to change without notice. - -=============== -Global Settings -=============== - -Set this to true if you want the mod to spam your console with debug info :-) - - plantlife_debug = false - -To slow down the playback of the queue (e.g. for really slow machines where -the 0.2 second max limiter isn't enough), set: - - biome_lib_queue_run_ratio = - -Default is 100 (basically percent of maximum runtime) - ====================== Fertile Ground Mapping ====================== @@ -514,7 +495,6 @@ Perlin noise used. The first one is for a "fertile ground" layer, which I tend to refer to as the generic "stuff can potentially grow here" layer. Its values are hard-coded: - biome_lib.plantlife_seed_diff = 329 perlin_octaves = 3 perlin_persistence = 0.6 perlin_scale = 100 @@ -611,3 +591,66 @@ See settingtypes.txt for a list. Any item listed there can be changed either by adding it to your minetest.conf, or by using the "all settings" menu in Minetest, whatever's appropriate for your particular setup. +================== +Engine Decorations +================== + +If a call to biome_lib.register_on_generate() contains items and biome +definition settings that are suitable, biome_lib will pass that call on to the +engine instead, to use its built-in decorations feature, since it'll be much +faster than Lua. + +For this to work, first the item to be added must either be a node, or a +table with a list of nodes that biome_lib would normally pick from randomly. +That is to say, you cannot specify an L-tree or a function here, as the engine +does not support that sort of thing (biome_lib will just switch to its normal +handling if you do). + +Second, these biome definition items must not be present: + +* below_nodes +* avoid_nodes +* avoid_radius +* neighbors +* ncount +* depth +* near_nodes_size +* near_nodes_vertical +* temp_min +* temp_max +* verticals_list +* delete_above +* delete_above_surround + +The plantlife_limit definition item is ignored when checking if a particular +call can be routed to the engine. + +The call given to the engine will use the remaining biome definition items in +the following manner: + +deco_type = "simple", +flags = "all_floors" +decoration = node or table with node list +place_on = surface +y_min = min_elevation +y_max = max_elevation +spawn_by = near_nodes +num_spawn_by = near_nodes_count +param2 = \_ set to the range specified by the biome definition's +param2_max = / random_facedir table, if present, otherwise omitted +noise_params = { + octaves = biome_lib.fertile_perlin_octaves, + persist = biome_lib.fertile_perlin_persistence * (250/biome_lib.fertile_perlin_scale), + scale = ((100-biome.rarity)/100) * (math.min(biome.max_count, 6400)/6400), + seed = biome.seed_diff, + offset = 0, + spread = {x = 100, y = 100, z = 100}, + lacunarity = 2, + flags = "absvalue" +} + +If the biome definition's check_air setting is false, "force_placement" is +added to the decoration's flags setting. + +If the biome def's spawn_replace_node is set to true, the decoration's +place_offset_y is set to -1 (otherwise it is omitted). diff --git a/mods/biome_lib/README.md b/mods/biome_lib/README.md index 2cfd09d4..21779e01 100644 --- a/mods/biome_lib/README.md +++ b/mods/biome_lib/README.md @@ -25,4 +25,6 @@ It is primarily intended for mapgen v6, but it should work fine when used with m * biome_lib:find_valid_wall() * biome_lib:is_node_loaded() -For a complete description of these functions as well as several of the internal variables within the mod, [read the API.txt document](https://raw.githubusercontent.com/minetest-mods/biome_lib/master/API.txt) included in this package. +For a complete description of these functions as well as several of the internal variables within the mod, see `API.txt`. + +**Configuration:** This mod has several variables you can set in your `minetest.conf` to change things a bit, from the default nodes it uses, to the debug log level and the block queue behavior. For a list with complete descriptions, see `settingtypes.txt`. diff --git a/mods/biome_lib/api.lua b/mods/biome_lib/api.lua new file mode 100644 index 00000000..d4ec661f --- /dev/null +++ b/mods/biome_lib/api.lua @@ -0,0 +1,689 @@ +biome_lib.block_log = {} +biome_lib.block_recheck_list = {} +biome_lib.run_block_recheck_list = false + +biome_lib.actionslist_aircheck = {} +biome_lib.actionslist_no_aircheck = {} + +biome_lib.surfaceslist_aircheck = {} +biome_lib.surfaceslist_no_aircheck = {} + +biome_lib.registered_decorations = {} + +biome_lib.fertile_perlin_octaves = 3 +biome_lib.fertile_perlin_persistence = 0.6 +biome_lib.fertile_perlin_scale = 100 + +local temperature_seeddiff = 112 +local temperature_octaves = 3 +local temperature_persistence = 0.5 +local temperature_scale = 150 + +local humidity_seeddiff = 9130 +local humidity_octaves = 3 +local humidity_persistence = 0.5 +local humidity_scale = 250 + +local time_speed = tonumber(minetest.settings:get("time_speed")) +biome_lib.time_scale = 1 + +if time_speed and time_speed > 0 then + biome_lib.time_scale = 72 / time_speed +end + +biome_lib.air = {name = "air"} + +-- the mapgen rarely creates useful surfaces outside this range, but mods can +-- still specify a wider range if needed. +biome_lib.mapgen_elevation_limit = { ["min"] = -16, ["max"] = 48 } + +--PerlinNoise(seed, octaves, persistence, scale) + +biome_lib.perlin_temperature = PerlinNoise(temperature_seeddiff, temperature_octaves, temperature_persistence, temperature_scale) +biome_lib.perlin_humidity = PerlinNoise(humidity_seeddiff, humidity_octaves, humidity_persistence, humidity_scale) + +-- Local functions + +local function tableize(s) + return string.split(string.trim(string.gsub(s, " ", ""))) +end + +function biome_lib.dbg(msg, level) + local l = tonumber(level) or 0 + if biome_lib.debug_log_level >= l then + print(os.date("%Y-%m-%d %H:%M:%S").." [Biome Lib]: "..msg) + minetest.log("verbose", "[Biome Lib]: "..msg) + end +end + +local function get_biome_data(pos, perlin_fertile) + local fertility = perlin_fertile:get_2d({x=pos.x, y=pos.z}) + + if type(minetest.get_biome_data) == "function" then + local data = minetest.get_biome_data(pos) + if data then + return fertility, data.heat / 100, data.humidity / 100 + end + end + + local temperature = biome_lib.perlin_temperature:get2d({x=pos.x, y=pos.z}) + local humidity = biome_lib.perlin_humidity:get2d({x=pos.x+150, y=pos.z+50}) + + return fertility, temperature, humidity +end + +function biome_lib.is_node_loaded(node_pos) + local n = minetest.get_node_or_nil(node_pos) + if (not n) or (n.name == "ignore") then + return false + end + return true +end + +function biome_lib.set_defaults(biome) + + biome.seed_diff = biome.seed_diff or 0 + biome.min_elevation = biome.min_elevation or biome_lib.mapgen_elevation_limit.min + biome.max_elevation = biome.max_elevation or biome_lib.mapgen_elevation_limit.max + biome.temp_min = biome.temp_min or 1 + biome.temp_max = biome.temp_max or -1 + biome.humidity_min = biome.humidity_min or 1 + biome.humidity_max = biome.humidity_max or -1 + biome.plantlife_limit = biome.plantlife_limit or 0.1 + biome.near_nodes_vertical = biome.near_nodes_vertical or 1 + +-- specific to on-generate + + biome.neighbors = biome.neighbors or biome.surface + biome.near_nodes_size = biome.near_nodes_size or 0 + biome.near_nodes_count = biome.near_nodes_count or 1 + biome.rarity = biome.rarity or 50 + biome.max_count = biome.max_count or 125 + if biome.check_air ~= false then biome.check_air = true end + +-- specific to abm spawner + biome.seed_diff = biome.seed_diff or 0 + biome.light_min = biome.light_min or 0 + biome.light_max = biome.light_max or 15 + biome.depth_max = biome.depth_max or 1 + biome.facedir = biome.facedir or 0 + return biome +end + +local function search_table(t, s) + for i = 1, #t do + if t[i] == s then return true end + end + return false +end + +-- register the list of surfaces to spawn stuff on, filtering out all duplicates. +-- separate the items by air-checking or non-air-checking map eval methods + +function biome_lib.register_on_generate(biomedef, nodes_or_function_or_model) + + -- if calling code passes an undefined node for a surface or + -- as a node to be spawned, don't register an action for it. + + if type(nodes_or_function_or_model) == "string" + and string.find(nodes_or_function_or_model, ":") + and not minetest.registered_nodes[nodes_or_function_or_model] then + biome_lib.dbg("Warning: Ignored registration for undefined spawn node: "..dump(nodes_or_function_or_model), 2) + return + end + + if type(nodes_or_function_or_model) == "string" + and not string.find(nodes_or_function_or_model, ":") then + biome_lib.dbg("Warning: Registered function call using deprecated string method: "..dump(nodes_or_function_or_model), 2) + end + + biome_lib.mapgen_elevation_limit.min = math.min(biomedef.min_elevation or 0, biome_lib.mapgen_elevation_limit.min) + biome_lib.mapgen_elevation_limit.max = math.max(biomedef.max_elevation or 0, biome_lib.mapgen_elevation_limit.max) + + local decor_def = biome_lib.can_use_decorations(biomedef, nodes_or_function_or_model) + + if decor_def then + biome_lib.dbg("Using engine decorations instead of biome_lib functions for node(s): "..dump(nodes_or_function_or_model), 3) + biome_lib.registered_decorations[#biome_lib.registered_decorations + 1] = nodes_or_function_or_model + minetest.register_decoration(decor_def) + return + elseif biomedef.check_air == false then + biome_lib.dbg("Register no-air-check mapgen hook: "..dump(nodes_or_function_or_model), 3) + biome_lib.actionslist_no_aircheck[#biome_lib.actionslist_no_aircheck + 1] = { biomedef, nodes_or_function_or_model } + local s = biomedef.surface + if type(s) == "string" then + if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then + if not search_table(biome_lib.surfaceslist_no_aircheck, s) then + biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s + end + else + biome_lib.dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s), 2) + end + else + for i = 1, #biomedef.surface do + local s = biomedef.surface[i] + if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then + if not search_table(biome_lib.surfaceslist_no_aircheck, s) then + biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s + end + else + biome_lib.dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s), 2) + end + end + end + else + biome_lib.dbg("Register with-air-checking mapgen hook: "..dump(nodes_or_function_or_model), 3) + biome_lib.actionslist_aircheck[#biome_lib.actionslist_aircheck + 1] = { biomedef, nodes_or_function_or_model } + local s = biomedef.surface + if type(s) == "string" then + if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then + if not search_table(biome_lib.surfaceslist_aircheck, s) then + biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s + end + else + biome_lib.dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s), 2) + end + else + for i = 1, #biomedef.surface do + local s = biomedef.surface[i] + if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then + if not search_table(biome_lib.surfaceslist_aircheck, s) then + biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s + end + else + biome_lib.dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s), 2) + end + end + end + end +end + +-- Function to check whether a position matches the given biome definition +-- Returns true when the surface can be populated + +local function populate_single_surface(biome, pos, perlin_fertile_area, checkair) + local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } + + if math.random(1, 100) <= biome.rarity then + return + end + + local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area) + + local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation + and fertility > biome.plantlife_limit + and temperature <= biome.temp_min and temperature >= biome.temp_max + and humidity <= biome.humidity_min and humidity >= biome.humidity_max + + if not pos_biome_ok then + return -- Y position mismatch, outside of biome + end + + local biome_surfaces_string = dump(biome.surface) + local surface_ok = false + + if not biome.depth then + local dest_node = minetest.get_node(pos) + if string.find(biome_surfaces_string, dest_node.name) then + surface_ok = true + else + if string.find(biome_surfaces_string, "group:") then + for j = 1, #biome.surface do + if string.find(biome.surface[j], "^group:") + and minetest.get_item_group(dest_node.name, biome.surface[j]) then + surface_ok = true + break + end + end + end + end + elseif not string.find(biome_surfaces_string, + minetest.get_node({ x = pos.x, y = pos.y-biome.depth-1, z = pos.z }).name) then + surface_ok = true + end + + if not surface_ok then + return -- Surface does not match the given node group/name + end + + if checkair and minetest.get_node(p_top).name ~= "air" then + return + end + + if biome.below_nodes and + not string.find(dump(biome.below_nodes), + minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + ) then + return -- Node below does not match + end + + if biome.ncount and + #minetest.find_nodes_in_area( + {x=pos.x-1, y=pos.y, z=pos.z-1}, + {x=pos.x+1, y=pos.y, z=pos.z+1}, + biome.neighbors + ) <= biome.ncount then + return -- Not enough similar biome nodes around + end + + if biome.near_nodes and + #minetest.find_nodes_in_area( + {x=pos.x-biome.near_nodes_size, y=pos.y-biome.near_nodes_vertical, z=pos.z-biome.near_nodes_size}, + {x=pos.x+biome.near_nodes_size, y=pos.y+biome.near_nodes_vertical, z=pos.z+biome.near_nodes_size}, + biome.near_nodes + ) < biome.near_nodes_count then + return -- Long distance neighbours do not match + end + + -- Position fits into given biome + return true +end + +function biome_lib.populate_surfaces(b, nodes_or_function_or_model, snodes, checkair) + local items_added = 0 + + local biome = biome_lib.set_defaults(b) + + -- filter stage 1 - find nodes from the supplied surfaces that are within the current biome. + + local in_biome_nodes = {} + local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, biome_lib.fertile_perlin_octaves, biome_lib.fertile_perlin_persistence, biome_lib.fertile_perlin_scale) + + for i = 1, #snodes do + local pos = vector.new(snodes[i]) + if populate_single_surface(biome, pos, perlin_fertile_area, checkair) then + in_biome_nodes[#in_biome_nodes + 1] = pos + end + end + + -- filter stage 2 - find places within that biome area to place the plants. + + local num_in_biome_nodes = #in_biome_nodes + + if num_in_biome_nodes == 0 then + return 0 + end + + for i = 1, math.min(math.ceil(biome.max_count/25), num_in_biome_nodes) do + local tries = 0 + local spawned = false + while tries < 2 and not spawned do + local pos = in_biome_nodes[math.random(1, num_in_biome_nodes)] + if biome.spawn_replace_node then + pos.y = pos.y-1 + end + local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } + + if not (biome.avoid_nodes and biome.avoid_radius + and minetest.find_node_near(p_top, biome.avoid_radius + + math.random(-1.5,2), biome.avoid_nodes)) then + if biome.delete_above then + minetest.swap_node(p_top, biome_lib.air) + minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z}, biome_lib.air) + end + + if biome.delete_above_surround then + minetest.swap_node({x=p_top.x-1, y=p_top.y, z=p_top.z}, biome_lib.air) + minetest.swap_node({x=p_top.x+1, y=p_top.y, z=p_top.z}, biome_lib.air) + minetest.swap_node({x=p_top.x, y=p_top.y, z=p_top.z-1}, biome_lib.air) + minetest.swap_node({x=p_top.x, y=p_top.y, z=p_top.z+1}, biome_lib.air) + + minetest.swap_node({x=p_top.x-1, y=p_top.y+1, z=p_top.z}, biome_lib.air) + minetest.swap_node({x=p_top.x+1, y=p_top.y+1, z=p_top.z}, biome_lib.air) + minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z-1}, biome_lib.air) + minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z+1}, biome_lib.air) + end + + if biome.spawn_replace_node then + minetest.swap_node(pos, biome_lib.air) + end + + local objtype = type(nodes_or_function_or_model) + + if objtype == "table" then + if nodes_or_function_or_model.axiom then + biome_lib.generate_ltree(p_top, nodes_or_function_or_model) + biome_lib.dbg("An L-tree was spawned at "..minetest.pos_to_string(p_top), 4) + spawned = true + else + local fdir = nil + if biome.random_facedir then + fdir = math.random(biome.random_facedir[1], biome.random_facedir[2]) + end + local n=nodes_or_function_or_model[math.random(#nodes_or_function_or_model)] + minetest.swap_node(p_top, { name = n, param2 = fdir }) + biome_lib.dbg("Node \""..n.."\" was randomly picked from a list and placed at "..minetest.pos_to_string(p_top), 4) + spawned = true + end + elseif objtype == "string" and + minetest.registered_nodes[nodes_or_function_or_model] then + local fdir = nil + if biome.random_facedir then + fdir = math.random(biome.random_facedir[1], biome.random_facedir[2]) + end + minetest.swap_node(p_top, { name = nodes_or_function_or_model, param2 = fdir }) + biome_lib.dbg("Node \""..nodes_or_function_or_model.."\" was placed at "..minetest.pos_to_string(p_top), 4) + spawned = true + elseif objtype == "function" then + nodes_or_function_or_model(pos) + biome_lib.dbg("A function was run on surface node at "..minetest.pos_to_string(pos), 4) + spawned = true + elseif objtype == "string" and pcall(loadstring(("return %s(...)"): + format(nodes_or_function_or_model)),pos) then + spawned = true + biome_lib.dbg("An obsolete string-specified function was run on surface node at "..minetest.pos_to_string(p_top), 4) + else + biome_lib.dbg("Warning: Ignored invalid definition for object "..dump(nodes_or_function_or_model).." that was pointed at {"..dump(pos).."}", 2) + end + else + tries = tries + 1 + end + end + if spawned then items_added = items_added + 1 end + end + return items_added +end + +-- Primary log read-out/mapgen spawner + +local function confirm_block_surroundings(p) + local n=minetest.get_node_or_nil(p) + if not n or n.name == "ignore" then return false end + + for x = -32,32,64 do -- step of 64 causes it to only check the 8 corner blocks + for y = -32,32,64 do + for z = -32,32,64 do + local n=minetest.get_node_or_nil({x=p.x + x, y=p.y + y, z=p.z + z}) + if not n or n.name == "ignore" then return false end + end + end + end + return true +end + +function biome_lib.generate_block(shutting_down) + + if shutting_down then + if #biome_lib.block_recheck_list > 0 then + for i = 1, #biome_lib.block_recheck_list do + biome_lib.block_log[#biome_lib.block_log + 1] = biome_lib.block_recheck_list[i] + end + biome_lib.block_recheck_list = {} + end + biome_lib.run_block_recheck_list = false + else + if biome_lib.run_block_recheck_list + and not biome_lib.block_recheck_list[1] then + biome_lib.run_block_recheck_list = false + end + end + + local blocklog = biome_lib.run_block_recheck_list + and biome_lib.block_recheck_list + or biome_lib.block_log + + if not blocklog[1] then return end + + local minp = blocklog[1][1] + local maxp = blocklog[1][2] + local airflag = blocklog[1][3] + local pos_hash = minetest.hash_node_position(minp) + + if not biome_lib.pos_hash then -- we need to read the maplock and get the surfaces list + local now = minetest.get_us_time() + biome_lib.pos_hash = {} + minetest.load_area(minp) + if not confirm_block_surroundings(minp) + and not shutting_down + and (blocklog[1][4] + biome_lib.block_timeout) > now then -- if any neighbors appear not to be loaded and the block hasn't expired yet, defer it + + if biome_lib.run_block_recheck_list then + biome_lib.block_log[#biome_lib.block_log + 1] = table.copy(biome_lib.block_recheck_list[1]) + table.remove(biome_lib.block_recheck_list, 1) + else + biome_lib.block_recheck_list[#biome_lib.block_recheck_list + 1] = table.copy(biome_lib.block_log[1]) + table.remove(biome_lib.block_log, 1) + end + biome_lib.pos_hash = nil + biome_lib.dbg("Mapblock at "..minetest.pos_to_string(minp).. + " had a neighbor not fully emerged, skipped it for now.", 4) + return + else + biome_lib.pos_hash.surface_node_list = airflag + and minetest.find_nodes_in_area_under_air(minp, maxp, biome_lib.surfaceslist_aircheck) + or minetest.find_nodes_in_area(minp, maxp, biome_lib.surfaceslist_no_aircheck) + if #biome_lib.pos_hash.surface_node_list == 0 then + biome_lib.dbg("Mapblock at "..minetest.pos_to_string(minp).." dequeued: no detected surfaces.", 4) + table.remove(blocklog, 1) + biome_lib.pos_hash = nil + return + else + biome_lib.pos_hash.action_index = 1 + biome_lib.dbg("Mapblock at "..minetest.pos_to_string(minp).. + " has "..#biome_lib.pos_hash.surface_node_list.. + " surface nodes to work on (airflag="..dump(airflag)..")", 4) + end + end + elseif not (airflag and biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index]) + and not (not airflag and biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index]) then + -- the block is finished, remove it + if #biome_lib.pos_hash.surface_node_list > 0 then + biome_lib.dbg("Deleted mapblock "..minetest.pos_to_string(minp).." from the block log", 4) + end + table.remove(blocklog, 1) + biome_lib.pos_hash = nil + else + -- below, [1] is biome, [2] is the thing to be added + local added = 0 + if airflag then + if biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index] then + added = biome_lib.populate_surfaces( + biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index][1], + biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index][2], + biome_lib.pos_hash.surface_node_list, true) + biome_lib.pos_hash.action_index = biome_lib.pos_hash.action_index + 1 + end + else + if biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index] then + added = biome_lib.populate_surfaces( + biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index][1], + biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index][2], + biome_lib.pos_hash.surface_node_list, false) + biome_lib.pos_hash.action_index = biome_lib.pos_hash.action_index + 1 + end + end + if added > 0 then + biome_lib.dbg("biome_lib.populate_surfaces ran on mapblock at ".. + minetest.pos_to_string(minp)..". Entry #".. + (biome_lib.pos_hash.action_index-1).." added "..added.." items.", 4) + end + end +end + +-- The spawning ABM + +function biome_lib.register_active_spawner(sd,sp,sr,sc,ss,sa) + + local b = {} + + if type(sd) ~= "table" then + b.spawn_delay = sd -- old api expects ABM interval param here. + b.spawn_plants = {sp} + b.avoid_radius = sr + b.spawn_chance = sc + b.spawn_surfaces = {ss} + b.avoid_nodes = sa + else + b = sd + end + + if b.spawn_delay*biome_lib.time_scale >= 1 then + b.interval = b.spawn_delay*biome_lib.time_scale + else + b.interval = 1 + end + + local biome = biome_lib.set_defaults(b) + + biome.spawn_plants_count = #(biome.spawn_plants) + + local n + if type(biome.spawn_plants) == "table" then + n = "random: "..biome.spawn_plants[1]..", ..." + else + n = biome.spawn_plants + end + biome.label = biome.label or "biome_lib spawn_on_surfaces(): "..n + + minetest.register_abm({ + nodenames = biome.spawn_surfaces, + interval = biome.interval, + chance = biome.spawn_chance, + neighbors = biome.neighbors, + label = biome.label, + action = function(pos, node, active_object_count, active_object_count_wider) + local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } + local n_top = minetest.get_node(p_top) + local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, biome_lib.fertile_perlin_octaves, biome_lib.fertile_perlin_persistence, biome_lib.fertile_perlin_scale) + + local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area) + + local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation + and fertility > biome.plantlife_limit + and temperature <= biome.temp_min and temperature >= biome.temp_max + and humidity <= biome.humidity_min and humidity >= biome.humidity_max + and biome_lib.is_node_loaded(p_top) + + if not pos_biome_ok then + return -- Outside of biome + end + + local n_light = minetest.get_node_light(p_top, nil) + if n_light < biome.light_min or n_light > biome.light_max then + return -- Too dark or too bright + end + + if biome.avoid_nodes and biome.avoid_radius and minetest.find_node_near( + p_top, biome.avoid_radius + math.random(-1.5,2), biome.avoid_nodes) then + return -- Nodes to avoid are nearby + end + + if biome.neighbors and biome.ncount and + #minetest.find_nodes_in_area( + {x=pos.x-1, y=pos.y, z=pos.z-1}, + {x=pos.x+1, y=pos.y, z=pos.z+1}, + biome.neighbors + ) <= biome.ncount then + return -- Near neighbour nodes are not present + end + + local NEAR_DST = biome.near_nodes_size + if biome.near_nodes and biome.near_nodes_count and biome.near_nodes_size and + #minetest.find_nodes_in_area( + {x=pos.x-NEAR_DST, y=pos.y-biome.near_nodes_vertical, z=pos.z-NEAR_DST}, + {x=pos.x+NEAR_DST, y=pos.y+biome.near_nodes_vertical, z=pos.z+NEAR_DST}, + biome.near_nodes + ) < biome.near_nodes_count then + return -- Far neighbour nodes are not present + end + + if (biome.air_count and biome.air_size) and + #minetest.find_nodes_in_area( + {x=p_top.x-biome.air_size, y=p_top.y, z=p_top.z-biome.air_size}, + {x=p_top.x+biome.air_size, y=p_top.y, z=p_top.z+biome.air_size}, + "air" + ) < biome.air_count then + return -- Not enough air + end + + local walldir = biome_lib.find_adjacent_wall(p_top, biome.verticals_list, biome.choose_random_wall) + if biome.alt_wallnode and walldir then + if n_top.name == "air" then + minetest.swap_node(p_top, { name = biome.alt_wallnode, param2 = walldir }) + end + return + end + + local currentsurface = minetest.get_node(pos).name + + if biome_lib.default_water_nodes[currentsurface] and + #minetest.find_nodes_in_area( + {x=pos.x, y=pos.y-biome.depth_max-1, z=pos.z}, + vector.new(pos), + biome_lib.default_wet_surfaces + ) == 0 then + return -- On water but no ground nearby + end + + local rnd = math.random(1, biome.spawn_plants_count) + local plant_to_spawn = biome.spawn_plants[rnd] + local fdir = biome.facedir + if biome.random_facedir then + fdir = math.random(biome.random_facedir[1],biome.random_facedir[2]) + end + if type(biome.spawn_plants) == "string" then + assert(loadstring(biome.spawn_plants.."(...)"))(pos) + elseif not biome.spawn_on_side and not biome.spawn_on_bottom and not biome.spawn_replace_node then + if n_top.name == "air" then + minetest.swap_node(p_top, { name = plant_to_spawn, param2 = fdir }) + end + elseif biome.spawn_replace_node then + minetest.swap_node(pos, { name = plant_to_spawn, param2 = fdir }) + + elseif biome.spawn_on_side then + local onside = biome_lib.find_open_side(pos) + if onside then + minetest.swap_node(onside.newpos, { name = plant_to_spawn, param2 = onside.facedir }) + end + elseif biome.spawn_on_bottom then + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then + minetest.swap_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = plant_to_spawn, param2 = fdir} ) + end + end + end + }) +end + +-- Function to decide how to replace a plant - either grow it, replace it with +-- a tree, run a function, or die with an error. + +function biome_lib.replace_plant(pos, replacement, grow_function, walldir, seeddiff) + local growtype = type(grow_function) + if growtype == "table" then + minetest.swap_node(pos, biome_lib.air) + biome_lib.grow_ltree(pos, grow_function) + return + elseif growtype == "function" then + local perlin_fertile_area = minetest.get_perlin(seeddiff, biome_lib.fertile_perlin_octaves, biome_lib.fertile_perlin_persistence, biome_lib.fertile_perlin_scale) + local fertility, temperature, _ = get_biome_data(pos, perlin_fertile_area) + grow_function(pos, fertility, temperature, walldir) + return + elseif growtype == "string" then + local perlin_fertile_area = minetest.get_perlin(seeddiff, biome_lib.fertile_perlin_octaves, biome_lib.fertile_perlin_persistence, biome_lib.fertile_perlin_scale) + local fertility, temperature, _ = get_biome_data(pos, perlin_fertile_area) + assert(loadstring(grow_function.."(...)"))(pos, fertility, temperature, walldir) + return + elseif growtype == "nil" then + minetest.swap_node(pos, { name = replacement, param2 = walldir}) + return + elseif growtype ~= "nil" and growtype ~= "string" and growtype ~= "table" then + error("Invalid grow function "..dump(grow_function).." used on object at ("..dump(pos)..")") + end +end + +-- Check for infinite stacks + +if minetest.get_modpath("unified_inventory") or not minetest.settings:get_bool("creative_mode") then + biome_lib.expect_infinite_stacks = false +else + biome_lib.expect_infinite_stacks = true +end + +-- read a field from a node's definition + +function biome_lib.get_nodedef_field(nodename, fieldname) + if not minetest.registered_nodes[nodename] then + return nil + end + return minetest.registered_nodes[nodename][fieldname] +end diff --git a/mods/biome_lib/block_queue_checks.lua b/mods/biome_lib/block_queue_checks.lua new file mode 100644 index 00000000..ffa6825c --- /dev/null +++ b/mods/biome_lib/block_queue_checks.lua @@ -0,0 +1,140 @@ +-- Iterate through the mapblock log, +-- populating blocks with new stuff in the process. + +minetest.register_globalstep(function(dtime) + if not biome_lib.block_log[1] then return end -- the block log is empty + + if math.random(100) > biome_lib.queue_ratio then return end + for s = 1, biome_lib.entries_per_step do + biome_lib.generate_block() + end +end) + +-- Periodically wake-up the queue to give old blocks a chance to time-out +-- if the player isn't currently exploring (i.e. they're just playing in one area) + +function biome_lib.wake_up_queue() + if #biome_lib.block_recheck_list > 1 + and #biome_lib.block_log == 0 then + biome_lib.block_log[#biome_lib.block_log + 1] = + table.copy(biome_lib.block_recheck_list[#biome_lib.block_recheck_list]) + biome_lib.block_recheck_list[#biome_lib.block_recheck_list] = nil + biome_lib.run_block_recheck_list = true + biome_lib.dbg("Woke-up the map queue to give old blocks a chance to time-out.", 3) + end + minetest.after(biome_lib.block_queue_wakeup_time, biome_lib.wake_up_queue) +end + +biome_lib.wake_up_queue() + +-- Play out the entire log all at once on shutdown +-- to prevent unpopulated map areas + +local function format_time(t) + if t > 59999999 then + return os.date("!%M minutes and %S seconds", math.ceil(t/1000000)) + else + return os.date("!%S seconds", math.ceil(t/1000000)) + end +end + +function biome_lib.check_remaining_time() + if minetest.get_us_time() > (biome_lib.shutdown_last_timestamp + 10000000) then -- report progress every 10s + biome_lib.shutdown_last_timestamp = minetest.get_us_time() + + local entries_remaining = #biome_lib.block_log + #biome_lib.block_recheck_list + + local total_purged = biome_lib.starting_count - entries_remaining + local elapsed_time = biome_lib.shutdown_last_timestamp - biome_lib.shutdown_start_time + biome_lib.dbg(string.format("%i entries, approximately %s remaining.", + entries_remaining, format_time(elapsed_time/total_purged * entries_remaining))) + end +end + +--Purge the block log at shutdown + +minetest.register_on_shutdown(function() + + biome_lib.shutdown_start_time = minetest.get_us_time() + biome_lib.shutdown_last_timestamp = minetest.get_us_time()+1 + + biome_lib.starting_count = #biome_lib.block_log + #biome_lib.block_recheck_list + + if biome_lib.starting_count == 0 then + return + end + + biome_lib.dbg("Stand by, purging the mapblock log ".. + "(there are "..biome_lib.starting_count.." entries) ...", 0) + + while #biome_lib.block_log > 0 do + biome_lib.generate_block(true) + biome_lib.check_remaining_time() + end + + if #biome_lib.block_recheck_list > 0 then + biome_lib.block_log = table.copy(biome_lib.block_recheck_list) + biome_lib.block_recheck_list = {} + while #biome_lib.block_log > 0 do + biome_lib.generate_block(true) + biome_lib.check_remaining_time() + end + end + biome_lib.dbg("Log purge completed after ".. + format_time(minetest.get_us_time() - biome_lib.shutdown_start_time)..".", 0) +end) + +-- "Record" the map chunks being generated by the core mapgen, +-- split into individual mapblocks to reduce lag + +minetest.register_on_generated(function(minp, maxp, blockseed) + local timestamp = minetest.get_us_time() + for y = 0, 4 do + local miny = minp.y + y*16 + + if miny >= biome_lib.mapgen_elevation_limit.min + and (miny + 15) <= biome_lib.mapgen_elevation_limit.max then + + for x = 0, 4 do + local minx = minp.x + x*16 + + for z = 0, 4 do + local minz = minp.z + z*16 + + local bmin = {x=minx, y=miny, z=minz} + local bmax = {x=minx + 15, y=miny + 15, z=minz + 15} + biome_lib.block_log[#biome_lib.block_log + 1] = { bmin, bmax, true, timestamp } + biome_lib.block_log[#biome_lib.block_log + 1] = { bmin, bmax, false, timestamp } + end + end + else + biome_lib.dbg("Did not enqueue mapblocks at elevation "..miny.."m, they're out of range of any generate_plant() calls.", 4) + end + end + biome_lib.run_block_recheck_list = true +end) + +if biome_lib.debug_log_level >= 3 then + biome_lib.last_count = 0 + + function biome_lib.show_pending_block_count() + if biome_lib.last_count ~= #biome_lib.block_log then + biome_lib.dbg(string.format("Pending block counts - ready to process: %-8icurrently deferred: %i", + #biome_lib.block_log, #biome_lib.block_recheck_list), 3) + biome_lib.last_count = #biome_lib.block_log + biome_lib.queue_idle_flag = false + elseif not biome_lib.queue_idle_flag then + if #biome_lib.block_recheck_list > 0 then + biome_lib.dbg("Mapblock queue only contains blocks that can't yet be processed.", 3) + biome_lib.dbg("Idling the queue until new blocks arrive or the next wake-up call occurs.", 3) + else + biome_lib.dbg("Mapblock queue has run dry.", 3) + biome_lib.dbg("Idling the queue until new blocks arrive.", 3) + end + biome_lib.queue_idle_flag = true + end + minetest.after(1, biome_lib.show_pending_block_count) + end + + biome_lib.show_pending_block_count() +end diff --git a/mods/biome_lib/compat.lua b/mods/biome_lib/compat.lua new file mode 100644 index 00000000..5180e973 --- /dev/null +++ b/mods/biome_lib/compat.lua @@ -0,0 +1,115 @@ +-- compatibility shims for old mods + +function biome_lib:register_generate_plant(b, n) + biome_lib.dbg("Warning: biome_lib:register_generate_plant() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.register_on_generate() instead", 2) + biome_lib.dbg("Item: "..dump(n), 2) + biome_lib.register_on_generate(b, n) +end + +function biome_lib:spawn_on_surfaces(sd, sp, sr, sc, ss, sa) + biome_lib.dbg("Warning: biome_lib:spawn_on_surfaces() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.register_active_spawner() instead.", 2) + biome_lib.dbg("Item: "..dump(sd.spawn_plants or sp[1] or sp), 2) + biome_lib.register_active_spawner(sd, sp, sr, sc, ss, sa) +end + +function biome_lib:replace_object(p, r, f, w, d) + biome_lib.dbg("Warning: biome_lib:replace_object() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.replace_plant() instead.", 2) + biome_lib.dbg("Item: "..dump(r), 2) + biome_lib.replace_plant(p, r, f, w, d) +end + +function biome_lib:grow_plants(o) + biome_lib.dbg("Warning: biome_lib:grow_plants() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.update_plant() instead.", 2) + biome_lib.dbg("Item: "..dump(o.grow_nodes), 2) + biome_lib.update_plant(o) +end + +function biome_lib.generate_ltree(p, n) + minetest.spawn_tree(p, n) +end + +function biome_lib.grow_ltree(p, n) + minetest.spawn_tree(p, n) +end + +function biome_lib:generate_tree(p, n) + biome_lib.dbg("Warning: biome_lib:generate_tree() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.generate_ltree() instead.", 2) + biome_lib.dbg("Item: "..dump(n), 2) + biome_lib.generate_ltree(p, n) +end + +function biome_lib:grow_tree(p, n) + biome_lib.dbg("Warning: biome_lib:grow_tree() is deprecated!", 2) + biome_lib.dbg("Use biome_lib.grow_ltree() instead.", 2) + biome_lib.dbg("Item: "..dump(n), 2) + biome_lib.grow_ltree(p, n) +end + +function biome_lib.can_use_decorations(b, nodes_or_function_or_treedef) + if not b or not nodes_or_function_or_treedef + or b.below_nodes + or b.avoid_nodes + or b.avoid_radius + or b.neighbors + or b.ncount + or b.depth + or b.near_nodes_size + or b.near_nodes_vertical + or b.temp_min + or b.temp_max + or b.verticals_list + or b.delete_above + or b.delete_above_surround + or ( type(nodes_or_function_or_treedef) == "string" and not minetest.registered_nodes[nodes_or_function_or_treedef] ) + or ( type(nodes_or_function_or_treedef) == "table" and nodes_or_function_or_treedef.axiom ) + or type(nodes_or_function_or_treedef) == "function" + then return false + end + + local biome = biome_lib.set_defaults(b) + + local decor_def = { + ["deco_type"] = "simple", + ["flags"] = "all_floors", + ["decoration"] = nodes_or_function_or_treedef, + ["place_on"] = biome.surface, + ["y_min"] = biome.min_elevation, + ["y_max"] = biome.max_elevation, + ["spawn_by"] = biome.near_nodes, + ["num_spawn_by"] = biome.near_nodes and biome.near_nodes_count, + } + + local r = (100-biome.rarity)/100 + local mc = math.min(biome.max_count, 6400)/6400 + + decor_def.noise_params = { + octaves = biome_lib.fertile_perlin_octaves, + persist = biome_lib.fertile_perlin_persistence * (100/biome_lib.fertile_perlin_scale), + scale = math.min(r, mc), + seed = biome.seed_diff, + offset = 0, + spread = {x = 100, y = 100, z = 100}, + lacunarity = 2, + flags = "absvalue" + } + + if not b.check_air then + decor_def.flags = decor_def.flags..",force_placement" + end + + if b.spawn_replace_node then + decor_def.place_offset_y = -1 + end + + if b.random_facedir then + decor_def.param2 = math.min(b.random_facedir[1], b.random_facedir[2]) + decor_def.param2_max = math.max(b.random_facedir[1], b.random_facedir[2]) + end + + return decor_def +end diff --git a/mods/biome_lib/growth.lua b/mods/biome_lib/growth.lua index ba5285ca..e03417db 100644 --- a/mods/biome_lib/growth.lua +++ b/mods/biome_lib/growth.lua @@ -1,5 +1,3 @@ -local time_scale = ... - -- The growing ABM function biome_lib.check_surface(name, nodes) @@ -15,7 +13,7 @@ function biome_lib.check_surface(name, nodes) return false end -function biome_lib:grow_plants(opts) +function biome_lib.update_plant(opts) local options = opts @@ -32,10 +30,10 @@ function biome_lib:grow_plants(opts) n = options.grow_plant end - options.label = options.label or "biome_lib grow_plants(): "..n + options.label = options.label or "biome_lib.update_plant(): "..n - if options.grow_delay*time_scale >= 1 then - options.interval = options.grow_delay*time_scale + if options.grow_delay*biome_lib.time_scale >= 1 then + options.interval = options.grow_delay*biome_lib.time_scale else options.interval = 1 end @@ -53,12 +51,12 @@ function biome_lib:grow_plants(opts) local root_node = minetest.get_node({x=pos.x, y=pos.y-options.height_limit, z=pos.z}) local walldir = nil if options.need_wall and options.verticals_list then - walldir = biome_lib:find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall) + walldir = biome_lib.find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall) end if biome_lib.default_grow_through_nodes[n_top.name] and (not options.need_wall or (options.need_wall and walldir)) then if options.grow_vertically and walldir then - if biome_lib:search_downward(pos, options.height_limit, options.ground_nodes) then + if biome_lib.search_downward(pos, options.height_limit, options.ground_nodes) then minetest.swap_node(p_top, { name = options.grow_plant, param2 = walldir}) end @@ -67,24 +65,10 @@ function biome_lib:grow_plants(opts) minetest.swap_node(pos, biome_lib.air) else - biome_lib:replace_object(pos, options.grow_result, options.grow_function, options.facedir, options.seed_diff) + biome_lib.replace_plant(pos, options.grow_result, options.grow_function, options.facedir, options.seed_diff) end end end end }) end - - --- spawn_tree() on generate is routed through here so that other mods can hook --- into it. - -function biome_lib:generate_tree(pos, nodes_or_function_or_model) - minetest.spawn_tree(pos, nodes_or_function_or_model) -end - --- and this one's for the call used in the growing code - -function biome_lib:grow_tree(pos, nodes_or_function_or_model) - minetest.spawn_tree(pos, nodes_or_function_or_model) -end diff --git a/mods/biome_lib/init.lua b/mods/biome_lib/init.lua index a59c17c2..cbefb9a0 100644 --- a/mods/biome_lib/init.lua +++ b/mods/biome_lib/init.lua @@ -5,6 +5,7 @@ -- biome_lib = {} +biome_lib.modpath = minetest.get_modpath("biome_lib") -- Boilerplate to support localized strings if intllib mod is installed. local S @@ -19,26 +20,6 @@ else end biome_lib.intllib = S --- Various settings - most of these probably won't need to be changed - -biome_lib.air = {name = "air"} - -biome_lib.block_log = {} -biome_lib.block_recheck_list = {} -biome_lib.run_block_recheck_list = false - -biome_lib.actionslist_aircheck = {} -biome_lib.actionslist_no_aircheck = {} - -biome_lib.surfaceslist_aircheck = {} -biome_lib.surfaceslist_no_aircheck = {} - -biome_lib.modpath = minetest.get_modpath("biome_lib") - -local function tableize(s) - return string.split(string.trim(string.gsub(s, " ", ""))) -end - local c1 = minetest.settings:get("biome_lib_default_grow_through_nodes") biome_lib.default_grow_through_nodes = {["air"] = true} if c1 then @@ -72,8 +53,8 @@ biome_lib.default_grow_nodes = c5 and tableize(c5) or {"default:dirt_with_gras biome_lib.debug_log_level = tonumber(minetest.settings:get("biome_lib_debug_log_level")) or 0 -local rr = tonumber(minetest.settings:get("biome_lib_queue_run_ratio")) or -100 -biome_lib.queue_run_ratio = 100 - rr +local rr = tonumber(minetest.settings:get("biome_lib_queue_ratio")) or -200 +biome_lib.queue_ratio = 100 - rr biome_lib.entries_per_step = math.max(-rr, 1) -- the timer that manages the block timeout is in microseconds, but the timer @@ -86,773 +67,35 @@ biome_lib.block_timeout = t * 1000000 -- we don't want the wakeup function to trigger TOO often, -- in case the user's block timeout setting is really low + biome_lib.block_queue_wakeup_time = math.min(t/2, math.max(20, t/10)) -local time_speed = tonumber(minetest.settings:get("time_speed")) - -biome_lib.plantlife_seed_diff = 329 -- needs to be global so other mods can see it - -local perlin_octaves = 3 -local perlin_persistence = 0.6 -local perlin_scale = 100 - -local temperature_seeddiff = 112 -local temperature_octaves = 3 -local temperature_persistence = 0.5 -local temperature_scale = 150 - -local humidity_seeddiff = 9130 -local humidity_octaves = 3 -local humidity_persistence = 0.5 -local humidity_scale = 250 - -local time_scale = 1 - -if time_speed and time_speed > 0 then - time_scale = 72 / time_speed -end - ---PerlinNoise(seed, octaves, persistence, scale) - -biome_lib.perlin_temperature = PerlinNoise(temperature_seeddiff, temperature_octaves, temperature_persistence, temperature_scale) -biome_lib.perlin_humidity = PerlinNoise(humidity_seeddiff, humidity_octaves, humidity_persistence, humidity_scale) - --- Local functions - -function biome_lib.dbg(msg, level) - local l = tonumber(level) or 0 - if biome_lib.debug_log_level >= l then - print("[Biome Lib] "..msg) - minetest.log("verbose", "[Biome Lib] "..msg) - end -end - -local function get_biome_data(pos, perlin_fertile) - local fertility = perlin_fertile:get_2d({x=pos.x, y=pos.z}) - - if type(minetest.get_biome_data) == "function" then - local data = minetest.get_biome_data(pos) - if data then - return fertility, data.heat / 100, data.humidity / 100 - end - end - - local temperature = biome_lib.perlin_temperature:get2d({x=pos.x, y=pos.z}) - local humidity = biome_lib.perlin_humidity:get2d({x=pos.x+150, y=pos.z+50}) - - return fertility, temperature, humidity -end - -function biome_lib:is_node_loaded(node_pos) - local n = minetest.get_node_or_nil(node_pos) - if (not n) or (n.name == "ignore") then - return false - end - return true -end - -function biome_lib:set_defaults(biome) - biome.seed_diff = biome.seed_diff or 0 - biome.min_elevation = biome.min_elevation or -31000 - biome.max_elevation = biome.max_elevation or 31000 - biome.temp_min = biome.temp_min or 1 - biome.temp_max = biome.temp_max or -1 - biome.humidity_min = biome.humidity_min or 1 - biome.humidity_max = biome.humidity_max or -1 - biome.plantlife_limit = biome.plantlife_limit or 0.1 - biome.near_nodes_vertical = biome.near_nodes_vertical or 1 - --- specific to on-generate - - biome.neighbors = biome.neighbors or biome.surface - biome.near_nodes_size = biome.near_nodes_size or 0 - biome.near_nodes_count = biome.near_nodes_count or 1 - biome.rarity = biome.rarity or 50 - biome.max_count = biome.max_count or 125 - if biome.check_air ~= false then biome.check_air = true end - --- specific to abm spawner - biome.seed_diff = biome.seed_diff or 0 - biome.light_min = biome.light_min or 0 - biome.light_max = biome.light_max or 15 - biome.depth_max = biome.depth_max or 1 - biome.facedir = biome.facedir or 0 -end - -local function search_table(t, s) - for i = 1, #t do - if t[i] == s then return true end - end - return false -end - --- register the list of surfaces to spawn stuff on, filtering out all duplicates. --- separate the items by air-checking or non-air-checking map eval methods - -function biome_lib:register_generate_plant(biomedef, nodes_or_function_or_model) - - -- if calling code passes an undefined node for a surface or - -- as a node to be spawned, don't register an action for it. - - if type(nodes_or_function_or_model) == "string" - and string.find(nodes_or_function_or_model, ":") - and not minetest.registered_nodes[nodes_or_function_or_model] then - biome_lib.dbg("Warning: Ignored registration for undefined spawn node: "..dump(nodes_or_function_or_model), 2) - return - end - - if type(nodes_or_function_or_model) == "string" - and not string.find(nodes_or_function_or_model, ":") then - biome_lib.dbg("Warning: Registered function call using deprecated string method: "..dump(nodes_or_function_or_model), 2) - end - - if biomedef.check_air == false then - biome_lib.dbg("Register no-air-check mapgen hook: "..dump(nodes_or_function_or_model), 3) - biome_lib.actionslist_no_aircheck[#biome_lib.actionslist_no_aircheck + 1] = { biomedef, nodes_or_function_or_model } - local s = biomedef.surface - if type(s) == "string" then - if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then - if not search_table(biome_lib.surfaceslist_no_aircheck, s) then - biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s - end - else - biome_lib.dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s), 2) - end - else - for i = 1, #biomedef.surface do - local s = biomedef.surface[i] - if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then - if not search_table(biome_lib.surfaceslist_no_aircheck, s) then - biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s - end - else - biome_lib.dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s), 2) - end - end - end - else - biome_lib.dbg("Register with-air-checking mapgen hook: "..dump(nodes_or_function_or_model), 3) - biome_lib.actionslist_aircheck[#biome_lib.actionslist_aircheck + 1] = { biomedef, nodes_or_function_or_model } - local s = biomedef.surface - if type(s) == "string" then - if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then - if not search_table(biome_lib.surfaceslist_aircheck, s) then - biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s - end - else - biome_lib.dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s), 2) - end - else - for i = 1, #biomedef.surface do - local s = biomedef.surface[i] - if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then - if not search_table(biome_lib.surfaceslist_aircheck, s) then - biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s - end - else - biome_lib.dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s), 2) - end - end - end - end -end - --- Function to check whether a position matches the given biome definition --- Returns true when the surface can be populated - -local function populate_single_surface(biome, pos, perlin_fertile_area, checkair) - local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } - - if math.random(1, 100) <= biome.rarity then - return - end - - local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area) - - local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation - and fertility > biome.plantlife_limit - and temperature <= biome.temp_min and temperature >= biome.temp_max - and humidity <= biome.humidity_min and humidity >= biome.humidity_max - - if not pos_biome_ok then - return -- Y position mismatch, outside of biome - end - - local biome_surfaces_string = dump(biome.surface) - local surface_ok = false - - if not biome.depth then - local dest_node = minetest.get_node(pos) - if string.find(biome_surfaces_string, dest_node.name) then - surface_ok = true - else - if string.find(biome_surfaces_string, "group:") then - for j = 1, #biome.surface do - if string.find(biome.surface[j], "^group:") - and minetest.get_item_group(dest_node.name, biome.surface[j]) then - surface_ok = true - break - end - end - end - end - elseif not string.find(biome_surfaces_string, - minetest.get_node({ x = pos.x, y = pos.y-biome.depth-1, z = pos.z }).name) then - surface_ok = true - end - - if not surface_ok then - return -- Surface does not match the given node group/name - end - - if checkair and minetest.get_node(p_top).name ~= "air" then - return - end - - if biome.below_nodes and - not string.find(dump(biome.below_nodes), - minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - ) then - return -- Node below does not match - end - - if biome.ncount and - #minetest.find_nodes_in_area( - {x=pos.x-1, y=pos.y, z=pos.z-1}, - {x=pos.x+1, y=pos.y, z=pos.z+1}, - biome.neighbors - ) <= biome.ncount then - return -- Not enough similar biome nodes around - end - - if biome.near_nodes and - #minetest.find_nodes_in_area( - {x=pos.x-biome.near_nodes_size, y=pos.y-biome.near_nodes_vertical, z=pos.z-biome.near_nodes_size}, - {x=pos.x+biome.near_nodes_size, y=pos.y+biome.near_nodes_vertical, z=pos.z+biome.near_nodes_size}, - biome.near_nodes - ) < biome.near_nodes_count then - return -- Long distance neighbours do not match - end - - -- Position fits into given biome - return true -end - -function biome_lib.populate_surfaces(biome, nodes_or_function_or_model, snodes, checkair) - local items_added = 0 - - biome_lib:set_defaults(biome) - - -- filter stage 1 - find nodes from the supplied surfaces that are within the current biome. - - local in_biome_nodes = {} - local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, perlin_octaves, perlin_persistence, perlin_scale) - - for i = 1, #snodes do - local pos = vector.new(snodes[i]) - if populate_single_surface(biome, pos, perlin_fertile_area, checkair) then - in_biome_nodes[#in_biome_nodes + 1] = pos - end - end - - -- filter stage 2 - find places within that biome area to place the plants. - - local num_in_biome_nodes = #in_biome_nodes - - if num_in_biome_nodes == 0 then - return 0 - end - - for i = 1, math.min(math.ceil(biome.max_count/25), num_in_biome_nodes) do - local tries = 0 - local spawned = false - while tries < 2 and not spawned do - local pos = in_biome_nodes[math.random(1, num_in_biome_nodes)] - if biome.spawn_replace_node then - pos.y = pos.y-1 - end - local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } - - if not (biome.avoid_nodes and biome.avoid_radius - and minetest.find_node_near(p_top, biome.avoid_radius - + math.random(-1.5,2), biome.avoid_nodes)) then - if biome.delete_above then - minetest.swap_node(p_top, biome_lib.air) - minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z}, biome_lib.air) - end - - if biome.delete_above_surround then - minetest.swap_node({x=p_top.x-1, y=p_top.y, z=p_top.z}, biome_lib.air) - minetest.swap_node({x=p_top.x+1, y=p_top.y, z=p_top.z}, biome_lib.air) - minetest.swap_node({x=p_top.x, y=p_top.y, z=p_top.z-1}, biome_lib.air) - minetest.swap_node({x=p_top.x, y=p_top.y, z=p_top.z+1}, biome_lib.air) - - minetest.swap_node({x=p_top.x-1, y=p_top.y+1, z=p_top.z}, biome_lib.air) - minetest.swap_node({x=p_top.x+1, y=p_top.y+1, z=p_top.z}, biome_lib.air) - minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z-1}, biome_lib.air) - minetest.swap_node({x=p_top.x, y=p_top.y+1, z=p_top.z+1}, biome_lib.air) - end - - if biome.spawn_replace_node then - minetest.swap_node(pos, biome_lib.air) - end - - local objtype = type(nodes_or_function_or_model) - - if objtype == "table" then - if nodes_or_function_or_model.axiom then - biome_lib:generate_tree(p_top, nodes_or_function_or_model) - biome_lib.dbg("An L-tree was spawned at "..minetest.pos_to_string(p_top), 4) - spawned = true - else - local fdir = nil - if biome.random_facedir then - fdir = math.random(biome.random_facedir[1], biome.random_facedir[2]) - end - local n=nodes_or_function_or_model[math.random(#nodes_or_function_or_model)] - minetest.swap_node(p_top, { name = n, param2 = fdir }) - biome_lib.dbg("Node \""..n.."\" was randomly picked from a list and placed at "..minetest.pos_to_string(p_top), 4) - spawned = true - end - elseif objtype == "string" and - minetest.registered_nodes[nodes_or_function_or_model] then - local fdir = nil - if biome.random_facedir then - fdir = math.random(biome.random_facedir[1], biome.random_facedir[2]) - end - minetest.swap_node(p_top, { name = nodes_or_function_or_model, param2 = fdir }) - biome_lib.dbg("Node \""..nodes_or_function_or_model.."\" was placed at "..minetest.pos_to_string(p_top), 4) - spawned = true - elseif objtype == "function" then - nodes_or_function_or_model(pos) - biome_lib.dbg("A function was run on surface node at "..minetest.pos_to_string(pos), 4) - spawned = true - elseif objtype == "string" and pcall(loadstring(("return %s(...)"): - format(nodes_or_function_or_model)),pos) then - spawned = true - biome_lib.dbg("An obsolete string-specified function was run on surface node at "..minetest.pos_to_string(p_top), 4) - else - biome_lib.dbg("Warning: Ignored invalid definition for object "..dump(nodes_or_function_or_model).." that was pointed at {"..dump(pos).."}", 2) - end - else - tries = tries + 1 - end - end - if spawned then items_added = items_added + 1 end - end - return items_added -end - --- Primary log read-out/mapgen spawner - -local function confirm_block_surroundings(p) - local n=minetest.get_node_or_nil(p) - if not n or n.name == "ignore" then return false end - - for x = -32,32,64 do -- step of 64 causes it to only check the 8 corner blocks - for y = -32,32,64 do - for z = -32,32,64 do - local n=minetest.get_node_or_nil({x=p.x + x, y=p.y + y, z=p.z + z}) - if not n or n.name == "ignore" then return false end - end - end - end - return true -end - -function biome_lib.generate_block(shutting_down) - - if shutting_down then - if #biome_lib.block_recheck_list > 0 then - for i = 1, #biome_lib.block_recheck_list do - biome_lib.block_log[#biome_lib.block_log + 1] = biome_lib.block_recheck_list[i] - end - biome_lib.block_recheck_list = {} - end - biome_lib.run_block_recheck_list = false - else - if biome_lib.run_block_recheck_list - and not biome_lib.block_recheck_list[1] then - biome_lib.run_block_recheck_list = false - end - end - - local blocklog = biome_lib.run_block_recheck_list - and biome_lib.block_recheck_list - or biome_lib.block_log - - if not blocklog[1] then return end - - local minp = blocklog[1][1] - local maxp = blocklog[1][2] - local airflag = blocklog[1][3] - local pos_hash = minetest.hash_node_position(minp) - - if not biome_lib.pos_hash then -- we need to read the maplock and get the surfaces list - local now = minetest.get_us_time() - biome_lib.pos_hash = {} - minetest.load_area(minp) - if not confirm_block_surroundings(minp) - and not shutting_down - and (blocklog[1][4] + biome_lib.block_timeout) > now then -- if any neighbors appear not to be loaded and the block hasn't expired yet, defer it - - if biome_lib.run_block_recheck_list then - biome_lib.block_log[#biome_lib.block_log + 1] = table.copy(biome_lib.block_recheck_list[1]) - table.remove(biome_lib.block_recheck_list, 1) - else - biome_lib.block_recheck_list[#biome_lib.block_recheck_list + 1] = table.copy(biome_lib.block_log[1]) - table.remove(biome_lib.block_log, 1) - end - biome_lib.pos_hash = nil - biome_lib.dbg("Mapblock at "..minetest.pos_to_string(minp).. - " had a neighbor not fully emerged, skipped it for now.", 4) - return - else - biome_lib.pos_hash.surface_node_list = airflag - and minetest.find_nodes_in_area_under_air(minp, maxp, biome_lib.surfaceslist_aircheck) - or minetest.find_nodes_in_area(minp, maxp, biome_lib.surfaceslist_no_aircheck) - biome_lib.pos_hash.action_index = 1 - if #biome_lib.pos_hash.surface_node_list > 0 then - biome_lib.dbg("Mapblock at "..minetest.pos_to_string(minp).. - " has "..#biome_lib.pos_hash.surface_node_list.. - " surface nodes to work on (airflag="..dump(airflag)..")", 4) - end - end - elseif not (airflag and biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index]) - and not (not airflag and biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index]) then - -- the block is finished, remove it - if #biome_lib.pos_hash.surface_node_list > 0 then - biome_lib.dbg("Deleted mapblock "..minetest.pos_to_string(minp).." from the block log", 4) - end - table.remove(blocklog, 1) - biome_lib.pos_hash = nil - else - -- below, [1] is biome, [2] is the thing to be added - local added = 0 - if airflag then - if biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index] then - added = biome_lib.populate_surfaces( - biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index][1], - biome_lib.actionslist_aircheck[biome_lib.pos_hash.action_index][2], - biome_lib.pos_hash.surface_node_list, true) - biome_lib.pos_hash.action_index = biome_lib.pos_hash.action_index + 1 - end - else - if biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index] then - added = biome_lib.populate_surfaces( - biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index][1], - biome_lib.actionslist_no_aircheck[biome_lib.pos_hash.action_index][2], - biome_lib.pos_hash.surface_node_list, false) - biome_lib.pos_hash.action_index = biome_lib.pos_hash.action_index + 1 - end - end - if added > 0 then - biome_lib.dbg("biome_lib.populate_surfaces ran on mapblock at ".. - minetest.pos_to_string(minp)..". Entry #".. - (biome_lib.pos_hash.action_index-1).." added "..added.." items.", 4) - end - end -end - --- "Play" them back, populating them with new stuff in the process - -minetest.register_globalstep(function(dtime) - if not biome_lib.block_log[1] then return end -- the block log is empty - - if math.random(100) > biome_lib.queue_run_ratio then return end - for s = 1, biome_lib.entries_per_step do - biome_lib.generate_block() - end -end) - --- Periodically wake-up the queue to give old blocks a chance to time-out --- if the player isn't currently exploring (i.e. they're just playing in one area) - -function biome_lib.wake_up_queue() - if #biome_lib.block_recheck_list > 1 - and #biome_lib.block_log == 0 then - biome_lib.block_log[#biome_lib.block_log + 1] = - table.copy(biome_lib.block_recheck_list[#biome_lib.block_recheck_list]) - biome_lib.block_recheck_list[#biome_lib.block_recheck_list] = nil - biome_lib.run_block_recheck_list = true - biome_lib.dbg("Woke-up the map queue to give old blocks a chance to time-out.", 3) - end - minetest.after(biome_lib.block_queue_wakeup_time, biome_lib.wake_up_queue) -end - -biome_lib.wake_up_queue() - --- Play out the entire log all at once on shutdown --- to prevent unpopulated map areas - -local function format_time(t) - if t > 59999999 then - return os.date("!%M minutes and %S seconds", math.ceil(t/1000000)) - else - return os.date("!%S seconds", math.ceil(t/1000000)) - end -end - -function biome_lib.check_remaining_time() - if minetest.get_us_time() > (biome_lib.shutdown_last_timestamp + 10000000) then -- report progress every 10s - biome_lib.shutdown_last_timestamp = minetest.get_us_time() - - local entries_remaining = #biome_lib.block_log + #biome_lib.block_recheck_list - - local total_purged = biome_lib.starting_count - entries_remaining - local elapsed_time = biome_lib.shutdown_last_timestamp - biome_lib.shutdown_start_time - biome_lib.dbg(string.format("%i entries, approximately %s remaining.", - entries_remaining, format_time(elapsed_time/total_purged * entries_remaining))) - end -end - -minetest.register_on_shutdown(function() - biome_lib.shutdown_start_time = minetest.get_us_time() - biome_lib.shutdown_last_timestamp = minetest.get_us_time()+1 - - biome_lib.starting_count = #biome_lib.block_log + #biome_lib.block_recheck_list - - if biome_lib.starting_count == 0 then - return - end - - biome_lib.dbg("Stand by, purging the mapblock log ".. - "(there are "..(#biome_lib.block_log + #biome_lib.block_recheck_list).." entries) ...", 0) - - while #biome_lib.block_log > 0 do - biome_lib.generate_block(true) - biome_lib.check_remaining_time() - end - - if #biome_lib.block_recheck_list > 0 then - biome_lib.block_log = table.copy(biome_lib.block_recheck_list) - while #biome_lib.block_log > 0 do - biome_lib.generate_block(true) - biome_lib.check_remaining_time() - end - end - biome_lib.dbg("Log purge completed after ".. - format_time(minetest.get_us_time() - biome_lib.shutdown_start_time)..".", 0) -end) - --- The spawning ABM - -function biome_lib:spawn_on_surfaces(sd,sp,sr,sc,ss,sa) - - local biome = {} - - if type(sd) ~= "table" then - biome.spawn_delay = sd -- old api expects ABM interval param here. - biome.spawn_plants = {sp} - biome.avoid_radius = sr - biome.spawn_chance = sc - biome.spawn_surfaces = {ss} - biome.avoid_nodes = sa - else - biome = sd - end - - if biome.spawn_delay*time_scale >= 1 then - biome.interval = biome.spawn_delay*time_scale - else - biome.interval = 1 - end - - biome_lib:set_defaults(biome) - biome.spawn_plants_count = #(biome.spawn_plants) - - local n - if type(biome.spawn_plants) == "table" then - n = "random: "..biome.spawn_plants[1]..", ..." - else - n = biome.spawn_plants - end - biome.label = biome.label or "biome_lib spawn_on_surfaces(): "..n - - minetest.register_abm({ - nodenames = biome.spawn_surfaces, - interval = biome.interval, - chance = biome.spawn_chance, - neighbors = biome.neighbors, - label = biome.label, - action = function(pos, node, active_object_count, active_object_count_wider) - local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } - local n_top = minetest.get_node(p_top) - local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, perlin_octaves, perlin_persistence, perlin_scale) - - local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area) - - local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation - and fertility > biome.plantlife_limit - and temperature <= biome.temp_min and temperature >= biome.temp_max - and humidity <= biome.humidity_min and humidity >= biome.humidity_max - and biome_lib:is_node_loaded(p_top) - - if not pos_biome_ok then - return -- Outside of biome - end - - local n_light = minetest.get_node_light(p_top, nil) - if n_light < biome.light_min or n_light > biome.light_max then - return -- Too dark or too bright - end - - if biome.avoid_nodes and biome.avoid_radius and minetest.find_node_near( - p_top, biome.avoid_radius + math.random(-1.5,2), biome.avoid_nodes) then - return -- Nodes to avoid are nearby - end - - if biome.neighbors and biome.ncount and - #minetest.find_nodes_in_area( - {x=pos.x-1, y=pos.y, z=pos.z-1}, - {x=pos.x+1, y=pos.y, z=pos.z+1}, - biome.neighbors - ) <= biome.ncount then - return -- Near neighbour nodes are not present - end - - local NEAR_DST = biome.near_nodes_size - if biome.near_nodes and biome.near_nodes_count and biome.near_nodes_size and - #minetest.find_nodes_in_area( - {x=pos.x-NEAR_DST, y=pos.y-biome.near_nodes_vertical, z=pos.z-NEAR_DST}, - {x=pos.x+NEAR_DST, y=pos.y+biome.near_nodes_vertical, z=pos.z+NEAR_DST}, - biome.near_nodes - ) < biome.near_nodes_count then - return -- Far neighbour nodes are not present - end - - if (biome.air_count and biome.air_size) and - #minetest.find_nodes_in_area( - {x=p_top.x-biome.air_size, y=p_top.y, z=p_top.z-biome.air_size}, - {x=p_top.x+biome.air_size, y=p_top.y, z=p_top.z+biome.air_size}, - "air" - ) < biome.air_count then - return -- Not enough air - end - - local walldir = biome_lib:find_adjacent_wall(p_top, biome.verticals_list, biome.choose_random_wall) - if biome.alt_wallnode and walldir then - if n_top.name == "air" then - minetest.swap_node(p_top, { name = biome.alt_wallnode, param2 = walldir }) - end - return - end - - local currentsurface = minetest.get_node(pos).name - - if biome_lib.default_water_nodes[currentsurface] and - #minetest.find_nodes_in_area( - {x=pos.x, y=pos.y-biome.depth_max-1, z=pos.z}, - vector.new(pos), - biome_lib.default_wet_surfaces - ) == 0 then - return -- On water but no ground nearby - end - - local rnd = math.random(1, biome.spawn_plants_count) - local plant_to_spawn = biome.spawn_plants[rnd] - local fdir = biome.facedir - if biome.random_facedir then - fdir = math.random(biome.random_facedir[1],biome.random_facedir[2]) - end - if type(biome.spawn_plants) == "string" then - assert(loadstring(biome.spawn_plants.."(...)"))(pos) - elseif not biome.spawn_on_side and not biome.spawn_on_bottom and not biome.spawn_replace_node then - if n_top.name == "air" then - minetest.swap_node(p_top, { name = plant_to_spawn, param2 = fdir }) - end - elseif biome.spawn_replace_node then - minetest.swap_node(pos, { name = plant_to_spawn, param2 = fdir }) - - elseif biome.spawn_on_side then - local onside = biome_lib:find_open_side(pos) - if onside then - minetest.swap_node(onside.newpos, { name = plant_to_spawn, param2 = onside.facedir }) - end - elseif biome.spawn_on_bottom then - if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then - minetest.swap_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = plant_to_spawn, param2 = fdir} ) - end - end - end - }) -end - --- Function to decide how to replace a plant - either grow it, replace it with --- a tree, run a function, or die with an error. - -function biome_lib:replace_object(pos, replacement, grow_function, walldir, seeddiff) - local growtype = type(grow_function) - if growtype == "table" then - minetest.swap_node(pos, biome_lib.air) - biome_lib:grow_tree(pos, grow_function) - return - elseif growtype == "function" then - local perlin_fertile_area = minetest.get_perlin(seeddiff, perlin_octaves, perlin_persistence, perlin_scale) - local fertility, temperature, _ = get_biome_data(pos, perlin_fertile_area) - grow_function(pos, fertility, temperature, walldir) - return - elseif growtype == "string" then - local perlin_fertile_area = minetest.get_perlin(seeddiff, perlin_octaves, perlin_persistence, perlin_scale) - local fertility, temperature, _ = get_biome_data(pos, perlin_fertile_area) - assert(loadstring(grow_function.."(...)"))(pos, fertility, temperature, walldir) - return - elseif growtype == "nil" then - minetest.swap_node(pos, { name = replacement, param2 = walldir}) - return - elseif growtype ~= "nil" and growtype ~= "string" and growtype ~= "table" then - error("Invalid grow function "..dump(grow_function).." used on object at ("..dump(pos)..")") - end -end +-- the actual important stuff starts here ;-) +dofile(biome_lib.modpath .. "/api.lua") dofile(biome_lib.modpath .. "/search_functions.lua") -assert(loadfile(biome_lib.modpath .. "/growth.lua"))(time_scale) +dofile(biome_lib.modpath .. "/growth.lua") +dofile(biome_lib.modpath .. "/compat.lua") --- Check for infinite stacks +minetest.after(0.01, function() + -- report the final registration results and enable the active block queue stuff -if minetest.get_modpath("unified_inventory") or not minetest.settings:get_bool("creative_mode") then - biome_lib.expect_infinite_stacks = false -else - biome_lib.expect_infinite_stacks = true -end + local n = #biome_lib.actionslist_aircheck + #biome_lib.actionslist_no_aircheck --- read a field from a node's definition + biome_lib.dbg("All mapgen registrations completed.", 0) -function biome_lib:get_nodedef_field(nodename, fieldname) - if not minetest.registered_nodes[nodename] then - return nil - end - return minetest.registered_nodes[nodename][fieldname] -end - -if biome_lib.debug_log_level >= 3 then - biome_lib.last_count = 0 - - function biome_lib.show_pending_block_count() - if biome_lib.last_count ~= #biome_lib.block_log then - biome_lib.dbg(string.format("Pending block counts - ready to process: %-8icurrently deferred: %i", - #biome_lib.block_log, #biome_lib.block_recheck_list), 3) - biome_lib.last_count = #biome_lib.block_log - biome_lib.queue_idle_flag = false - elseif not biome_lib.queue_idle_flag then - if #biome_lib.block_recheck_list > 0 then - biome_lib.dbg("Mapblock queue only contains blocks that can't yet be processed.", 3) - biome_lib.dbg("Idling the queue until new blocks arrive or the next wake-up call occurs.", 3) - else - biome_lib.dbg("Mapblock queue has run dry.", 3) - biome_lib.dbg("Idling the queue until new blocks arrive.", 3) - end - biome_lib.queue_idle_flag = true - end - minetest.after(1, biome_lib.show_pending_block_count) + if n > 0 then + biome_lib.dbg("Total items/actions to handle manually: "..n.." ("..#biome_lib.actionslist_no_aircheck.." without air checks)", 0) + biome_lib.dbg("Total surface types to handle manually: "..#biome_lib.surfaceslist_aircheck + #biome_lib.surfaceslist_no_aircheck, 0) + else + biome_lib.dbg("There are no \"handle manually\" items/actions registered,", 0) + biome_lib.dbg("so the mapblock queue will not be not used this session.", 0) end - biome_lib.show_pending_block_count() -end + biome_lib.dbg("Items sent to the engine's decorations handler: "..#biome_lib.registered_decorations, 0) + biome_lib.dbg("Elevation range: "..biome_lib.mapgen_elevation_limit.min.." to "..string.format("%+d", biome_lib.mapgen_elevation_limit.max).." meters.", 0) -minetest.after(0, function() - biome_lib.dbg("Registered a total of "..(#biome_lib.surfaceslist_aircheck)+(#biome_lib.surfaceslist_no_aircheck).." surface types to be evaluated, spread", 0) - biome_lib.dbg("across "..#biome_lib.actionslist_aircheck.." actions with air-checking and "..#biome_lib.actionslist_no_aircheck.." actions without.", 0) + if n > 0 then + dofile(biome_lib.modpath .. "/block_queue_checks.lua") + end end) - -biome_lib.dbg("[Biome Lib] Loaded", 0) diff --git a/mods/biome_lib/search_functions.lua b/mods/biome_lib/search_functions.lua index 118e121d..2bd48b7e 100644 --- a/mods/biome_lib/search_functions.lua +++ b/mods/biome_lib/search_functions.lua @@ -2,7 +2,7 @@ -- function to decide if a node has a wall that's in verticals_list{} -- returns wall direction of valid node, or nil if invalid. -function biome_lib:find_adjacent_wall(pos, verticals, randomflag) +function biome_lib.find_adjacent_wall(pos, verticals, randomflag) local verts = dump(verticals) if randomflag then local walltab = {} @@ -27,7 +27,7 @@ end -- node that matches the ground table. Returns the new position, or nil if -- height limit is exceeded before finding it. -function biome_lib:search_downward(pos, heightlimit, ground) +function biome_lib.search_downward(pos, heightlimit, ground) for i = 0, heightlimit do if string.find(dump(ground), minetest.get_node({x=pos.x, y=pos.y-i, z = pos.z}).name) then return {x=pos.x, y=pos.y-i, z = pos.z} @@ -36,7 +36,7 @@ function biome_lib:search_downward(pos, heightlimit, ground) return false end -function biome_lib:find_open_side(pos) +function biome_lib.find_open_side(pos) if minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name == "air" then return {newpos = { x=pos.x-1, y=pos.y, z=pos.z }, facedir = 2} end @@ -51,25 +51,3 @@ function biome_lib:find_open_side(pos) end return nil end - --- "Record" the map chunks being generated by the core mapgen, --- split into individual mapblocks to reduce lag - -minetest.register_on_generated(function(minp, maxp, blockseed) - local timestamp = minetest.get_us_time() - for x = 0, 4 do - local minx = minp.x + x*16 - for y = 0, 4 do - local miny = minp.y + y*16 - for z = 0, 4 do - local minz = minp.z + z*16 - - local bmin = {x=minx, y=miny, z=minz} - local bmax = {x=minx + 15, y=miny + 15, z=minz + 15} - biome_lib.block_log[#biome_lib.block_log + 1] = { bmin, bmax, true, timestamp } - biome_lib.block_log[#biome_lib.block_log + 1] = { bmin, bmax, false, timestamp } - end - end - end - biome_lib.run_block_recheck_list = true -end) diff --git a/mods/biome_lib/settingtypes.txt b/mods/biome_lib/settingtypes.txt index df804f5d..24558f8a 100644 --- a/mods/biome_lib/settingtypes.txt +++ b/mods/biome_lib/settingtypes.txt @@ -28,7 +28,7 @@ biome_lib_default_ground_nodes (List of default root nodes) string default:dirt_ # that many actions are executed on every single tick, skipping none. # More negative means more throughput, at the expense of lag. On fast PC's, # a setting of between -500 and -2000 might be good. -biome_lib_queue_run_ratio (Queue run ratio) int -100 +biome_lib_queue_ratio (Queue run ratio) int -200 # Minetest's map generator allows neighboring areas to overflow into one # another, to create smooth terrain, but it often hands the map blocks that diff --git a/mods/bonemeal/init.lua b/mods/bonemeal/init.lua index b7990eb1..139fef52 100644 --- a/mods/bonemeal/init.lua +++ b/mods/bonemeal/init.lua @@ -618,51 +618,51 @@ minetest.register_craft({ -- bonemeal (from bone) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:bonemeal 2", - recipe = {"group:bone"} + recipe = {{"group:bone"}} }) -- bonemeal (from player bones) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:bonemeal 4", - recipe = {"bones:bones"} + recipe = {{"bones:bones"}} }) -- bonemeal (from coral skeleton) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:bonemeal 2", - recipe = {"default:coral_skeleton"} + recipe = {{"default:coral_skeleton"}} }) -- mulch minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:mulch 4", recipe = { - "group:tree", "group:leaves", "group:leaves", - "group:leaves", "group:leaves", "group:leaves", - "group:leaves", "group:leaves", "group:leaves" + {"group:tree", "group:leaves", "group:leaves"}, + {"group:leaves", "group:leaves", "group:leaves"}, + {"group:leaves", "group:leaves", "group:leaves"} } }) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:mulch", recipe = { - "group:seed", "group:seed", "group:seed", - "group:seed", "group:seed", "group:seed", - "group:seed", "group:seed", "group:seed" + {"group:seed", "group:seed", "group:seed"}, + {"group:seed", "group:seed", "group:seed"}, + {"group:seed", "group:seed", "group:seed"} } }) -- fertiliser minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "bonemeal:fertiliser 2", - recipe = {"bonemeal:bonemeal", "bonemeal:mulch"} + recipe = {{"bonemeal:bonemeal", "bonemeal:mulch"}} }) diff --git a/mods/builtin_item/init.lua b/mods/builtin_item/init.lua index 021dbe6d..504cdb1c 100644 --- a/mods/builtin_item/init.lua +++ b/mods/builtin_item/init.lua @@ -1,26 +1,18 @@ -- Minetest: builtin/item_entity.lua --- override ice to make slippery for 0.4.16 -if not minetest.raycast then - minetest.override_item("default:ice", { - groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3}}) -end - - function core.spawn_item(pos, item) - local stack = ItemStack(item) local obj = core.add_entity(pos, "__builtin:item") if obj then - obj:get_luaentity():set_item(stack:to_string()) + obj:get_luaentity():set_item(ItemStack(item):to_string()) end return obj end --- If item_entity_ttl is not set, enity will have default life time +-- If item_entity_ttl is not set, entity will have default life time -- Setting it to -1 disables the feature local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900 local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81 @@ -78,8 +70,7 @@ local function quick_flow_logic(node, pos_testing, direction) param2 = 0 end - if minetest.registered_nodes[node_testing.name].liquidtype ~= "flowing" - and minetest.registered_nodes[node_testing.name].liquidtype ~= "source" then + if minetest.registered_nodes[node_testing.name].liquidtype ~= "flowing" then return 0 end @@ -108,7 +99,7 @@ end local function quick_flow(pos, node) - local x, z = 0.0, 0.0 + local x, z = 0, 0 x = x + quick_flow_logic(node, {x = pos.x - 1, y = pos.y, z = pos.z},-1) x = x + quick_flow_logic(node, {x = pos.x + 1, y = pos.y, z = pos.z}, 1) @@ -135,19 +126,14 @@ local function add_effects(pos) maxexptime = 3, minsize = 1, maxsize = 4, - texture = "tnt_smoke.png", + texture = "tnt_smoke.png" }) end --- print vector, helpful when debugging -local function vec_print(head, vec) - print(head, vec.x, vec.y, vec.z) -end - local water_force = tonumber(minetest.settings:get("builtin_item.waterflow_force") or 1.6) local water_drag = tonumber(minetest.settings:get("builtin_item.waterflow_drag") or 0.8) -local dry_friction = tonumber(minetest.settings:get("builtin_item.friction_dry") or 2.5) +local dry_friction = tonumber(minetest.settings:get("builtin_item.friction_dry") or 2.6) local air_drag = tonumber(minetest.settings:get("builtin_item.air_drag") or 0.4) local items_collect_on_slippery = tonumber( minetest.settings:get("builtin_item.items_collect_on_slippery") or 1) ~= 0 @@ -194,7 +180,7 @@ core.register_entity(":__builtin:item", { local col_height = size * 0.75 local def = core.registered_nodes[itemname] local glow = def and def.light_source - local c1, c2 = "","" + local c1, c2 = "", "" if not(stack:get_count() == 1) then c1 = " x" .. tostring(stack:get_count()) @@ -225,23 +211,20 @@ core.register_entity(":__builtin:item", { glow = glow, infotext = name .. c1 .. "\n(" .. itemname .. c2 .. ")" }) - end, get_staticdata = function(self) - local data = { + return core.serialize({ itemstring = self.itemstring, age = self.age, dropped_by = self.dropped_by - } - - return core.serialize(data) + }) end, on_activate = function(self, staticdata, dtime_s) - if string.sub(staticdata, 1, string.len("return")) == "return" then + if string.sub(staticdata, 1, 6) == "return" then local data = core.deserialize(staticdata) @@ -351,11 +334,9 @@ core.register_entity(":__builtin:item", { step_node_inside_checks = function(self) local pos = self.object:get_pos() - local node = self.node_inside - local def = self.def_inside -- Delete in 'ignore' nodes - if node and node.name == "ignore" then + if self.node_inside and self.node_inside.name == "ignore" then self.itemstring = "" self.object:remove() @@ -363,6 +344,8 @@ core.register_entity(":__builtin:item", { return true end + local def = self.def_inside + -- item inside block, move to vacant space if def and (def.walkable == nil or def.walkable == true) and (def.collision_box == nil or def.collision_box.type == "regular") @@ -384,7 +367,7 @@ core.register_entity(":__builtin:item", { pos = pos, max_hear_distance = 6, gain = 0.5 - }) + }, true) self.itemstring = "" self.object:remove() @@ -401,17 +384,16 @@ core.register_entity(":__builtin:item", { -- don't check for slippery ground if we're not on -- any ground to begin with - local node = self.node_under - local def = self.def_under + if self.falling_state or not self.node_under then - if self.falling_state or not node then self.slippery_state = false + return end - if node and def and def.walkable then + if self.node_under and self.def_under and self.def_under.walkable then - local slippery = core.get_item_group(node.name, "slippery") + local slippery = core.get_item_group(self.node_under.name, "slippery") self.slippery_state = slippery ~= 0 end @@ -419,17 +401,16 @@ core.register_entity(":__builtin:item", { step_water_physics = function(self) - local pos = self.object:get_pos() - local vel = self.object:get_velocity() - local node = self.node_inside - local def = self.def_inside - - self.waterflow_state = def and def.liquidtype == "flowing" + self.waterflow_state = self.def_inside and + self.def_inside.liquidtype == "flowing" if self.waterflow_state then + local pos = self.object:get_pos() + local vel = self.object:get_velocity() + -- get flow velocity - local flow_vel = quick_flow(pos, node) + local flow_vel = quick_flow(pos, self.node_inside) -- calculate flow force and drag local flow_force_x = flow_vel.x * water_force @@ -444,17 +425,6 @@ core.register_entity(":__builtin:item", { end end, - step_air_drag_physics = function(self) - - local vel = self.object:get_velocity() - - -- apply air drag - if self.falling_state or (self.slippery_state and not self.waterflow_state) then - self.accel.x = self.accel.x - vel.x * air_drag - self.accel.z = self.accel.z - vel.z * air_drag - end - end, - step_gravity = function(self) if self.falling_state then @@ -473,12 +443,10 @@ core.register_entity(":__builtin:item", { if self.slippery_state then - local node = self.node_under - -- apply slip factor (tiny friction that depends on the actual block type) - if (abs(vel.x) > 0.2 or abs(vel.z) > 0.2) then + if abs(vel.x) > 0.2 or abs(vel.z) > 0.2 then - local slippery = core.get_item_group(node.name, "slippery") + local slippery = core.get_item_group(self.node_under.name, "slippery") local slip_factor = 4.0 / (slippery + 4) self.accel.x = self.accel.x - vel.x * slip_factor @@ -497,17 +465,15 @@ core.register_entity(":__builtin:item", { step_check_timeout = function(self, dtime) - local pos = self.object:get_pos() - self.age = self.age + dtime if time_to_live > 0 and self.age > time_to_live then + add_effects(self.object:get_pos()) + self.itemstring = "" self.object:remove() - add_effects(pos) - return true end @@ -516,14 +482,13 @@ core.register_entity(":__builtin:item", { step_check_custom_step = function(self, dtime, moveresult) - local pos = self.object:get_pos() - -- do custom step function local name = ItemStack(self.itemstring):get_name() or "" local custom = core.registered_items[name] and core.registered_items[name].dropped_step - if custom and custom(self, pos, dtime, moveresult) == false then + if custom + and custom(self, self.object:get_pos(), dtime, moveresult) == false then return true -- skip further checks if false end @@ -532,8 +497,6 @@ core.register_entity(":__builtin:item", { step_try_collect = function(self) - local self_pos = self.object:get_pos() - -- Don't collect items if falling if self.falling_state then return @@ -551,6 +514,7 @@ core.register_entity(":__builtin:item", { return end + local self_pos = self.object:get_pos() local objects = core.get_objects_inside_radius(self_pos, 1.0) for _, obj in pairs(objects) do @@ -574,6 +538,18 @@ core.register_entity(":__builtin:item", { end end, + step_air_drag_physics = function(self) + + local vel = self.object:get_velocity() + + -- apply air drag + if self.falling_state + or (self.slippery_state and not self.waterflow_state) then + self.accel.x = self.accel.x - vel.x * air_drag + self.accel.z = self.accel.z - vel.z * air_drag + end + end, + on_step = function(self, dtime, moveresult) -- reset acceleration @@ -602,7 +578,7 @@ core.register_entity(":__builtin:item", { self:step_water_physics() self:step_ground_friction() self:step_gravity() - + self:step_air_drag_physics() self:step_apply_forces() -- do item checks @@ -618,12 +594,14 @@ core.register_entity(":__builtin:item", { local left = inv:add_item("main", self.itemstring) if left and not left:is_empty() then + self:set_item(left) + return end end self.itemstring = "" self.object:remove() - end, + end }) diff --git a/mods/castle/pillars.lua b/mods/castle/pillars.lua index ee4580ee..0df86d34 100644 --- a/mods/castle/pillars.lua +++ b/mods/castle/pillars.lua @@ -9,8 +9,8 @@ local pillar = { } if minetest.get_modpath("ethereal") then - pillar[7] = {"mushroomtrunk", "Mushroom Trunk", "mushroom_trunk", "ethereal:mushroom_trunk"} - pillar[8] = {"icebrick", "Ice Brick", "brick_ice", "ethereal:icebrick"} + pillar[7] = {"mushroomtrunk", "Mushroom Trunk", "ethereal_mushroom_trunk", "ethereal:mushroom_trunk"} + pillar[8] = {"icebrick", "Ice Brick", "ethereal_brick_ice", "ethereal:icebrick"} end local grp = {cracky = 3} @@ -30,7 +30,7 @@ for n = 1, #pillar do fixed = { {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,0.500000}, {-0.375000,-0.375000,-0.375000,0.375000,-0.125000,0.375000}, - {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000}, + {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000}, }, }, }) @@ -54,8 +54,8 @@ for n = 1, #pillar do node_box = { type = "fixed", fixed = { - {-0.500000,0.312500,-0.500000,0.500000,0.500000,0.500000}, - {-0.375000,0.062500,-0.375000,0.375000,0.312500,0.375000}, + {-0.500000,0.312500,-0.500000,0.500000,0.500000,0.500000}, + {-0.375000,0.062500,-0.375000,0.375000,0.312500,0.375000}, {-0.250000,-0.500000,-0.250000,0.250000,0.062500,0.250000}, }, }, diff --git a/mods/castle/town_item.lua b/mods/castle/town_item.lua index b5461930..b7ff8a95 100644 --- a/mods/castle/town_item.lua +++ b/mods/castle/town_item.lua @@ -5,9 +5,9 @@ minetest.register_node("castle:light",{ sunlight_propagates = true, light_source = 12, tiles = {"castle_street_light.png"}, - groups = {cracky=2, oddly_breakable_by_hand = 3}, + groups = {cracky = 2, oddly_breakable_by_hand = 3}, sounds = default.node_sound_glass_defaults(), - paramtype = "light", + paramtype = "light" }) minetest.register_craft({ @@ -15,7 +15,7 @@ minetest.register_craft({ recipe = { {"default:stick", "default:glass", "default:stick"}, {"default:glass", "default:torch", "default:glass"}, - {"default:stick", "default:glass", "default:stick"}, + {"default:stick", "default:glass", "default:stick"} } }) @@ -25,13 +25,13 @@ minetest.register_node("castle:dungeon_stone", { tiles = {"castle_dungeon_stone.png"}, groups = {cracky = 2}, paramtype = "light", - sounds = default.node_sound_stone_defaults(), + sounds = default.node_sound_stone_defaults() }) minetest.register_craft({ - type = "shapeless", + --type = "shapeless", output = "castle:dungeon_stone", - recipe = {"default:stonebrick", "default:obsidian"}, + recipe = {{"default:stonebrick", "default:obsidian"}} }) minetest.register_node("castle:crate", { @@ -40,7 +40,8 @@ minetest.register_node("castle:crate", { tiles = { "castle_crate_top.png", "castle_crate_top.png", "castle_crate.png", "castle_crate.png", - "castle_crate.png", "castle_crate.png"}, + "castle_crate.png", "castle_crate.png" + }, groups = {choppy = 3}, paramtype = "light", sounds = default.node_sound_wood_defaults(), @@ -70,14 +71,14 @@ minetest.register_node("castle:crate", { local inv = meta:get_inventory() return inv:is_empty("main") - end, + end }) minetest.register_craft({ output = "castle:crate", recipe = { {"group:wood", "group:wood", "group:wood"}, - {"group:wood", "default:steel_ingot", "group:wood"}, + {"group:wood", "default:steel_ingot", "group:wood"} } }) @@ -88,20 +89,17 @@ minetest.register_node("castle:ropes",{ tiles = {"castle_ropes.png"}, groups = {choppy = 3, snappy = 3, oddly_breakable_by_hand = 3,flammable = 1}, paramtype = "light", + use_texture_alpha = "clip", paramtype2 = "facedir", climbable = true, walkable = false, node_box = { type = "fixed", - fixed = { - {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, - }, + fixed = {{-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}} }, selection_box = { type = "fixed", - fixed = { - {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, - }, + fixed = {{-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}} } }) @@ -110,6 +108,6 @@ minetest.register_craft({ recipe = { {"farming:string"}, {"farming:string"}, - {"farming:string"}, + {"farming:string"} } }) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index df12536b..7b0af7b9 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -14,52 +14,78 @@ doors = { registered_trapdoors = {} } + -- returns an object to a door object or nil function doors.get(pos) + local node_name = minetest.get_node(pos).name + if doors.registered_doors[node_name] then + -- A normal upright door return { + pos = pos, + open = function(self, player) + if self:state() then return false end + return doors.door_toggle(self.pos, nil, player) end, + close = function(self, player) + if not self:state() then return false end + return doors.door_toggle(self.pos, nil, player) end, + toggle = function(self, player) return doors.door_toggle(self.pos, nil, player) end, + state = function(self) + local state = minetest.get_meta(self.pos):get_int("state") + return state %2 == 1 end } + elseif doors.registered_trapdoors[node_name] then + -- A trapdoor return { + pos = pos, + open = function(self, player) + if self:state() then return false end + return doors.trapdoor_toggle(self.pos, nil, player) end, + close = function(self, player) + if not self:state() then return false end + return doors.trapdoor_toggle(self.pos, nil, player) end, + toggle = function(self, player) return doors.trapdoor_toggle(self.pos, nil, player) end, + state = function(self) return minetest.get_node(self.pos).name:sub(-5) == "_open" end @@ -69,6 +95,7 @@ function doors.get(pos) end end + -- this hidden node is placed on top of the bottom, and prevents -- nodes from being placed in the top half of the door. minetest.register_node("doors:hidden", { @@ -79,6 +106,7 @@ minetest.register_node("doors:hidden", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, + use_texture_alpha = "clip", -- has to be walkable for falling nodes to stop falling. walkable = true, pointable = false, @@ -92,51 +120,57 @@ minetest.register_node("doors:hidden", { -- 1px transparent block inside door hinge near node top. node_box = { type = "fixed", - fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, + fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32} }, -- collision_box needed otherise selection box would be full node size collision_box = { type = "fixed", - fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, - }, + fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32} + } }) + -- table used to aid door opening/closing local transform = { { { v = "_a", param2 = 3 }, { v = "_a", param2 = 0 }, { v = "_a", param2 = 1 }, - { v = "_a", param2 = 2 }, + { v = "_a", param2 = 2 } }, { { v = "_b", param2 = 1 }, { v = "_b", param2 = 2 }, { v = "_b", param2 = 3 }, - { v = "_b", param2 = 0 }, + { v = "_b", param2 = 0 } }, { { v = "_b", param2 = 1 }, { v = "_b", param2 = 2 }, { v = "_b", param2 = 3 }, - { v = "_b", param2 = 0 }, + { v = "_b", param2 = 0 } }, { { v = "_a", param2 = 3 }, { v = "_a", param2 = 0 }, { v = "_a", param2 = 1 }, - { v = "_a", param2 = 2 }, - }, + { v = "_a", param2 = 2 } + } } + function doors.door_toggle(pos, node, clicker) + local meta = minetest.get_meta(pos) ; if not meta then return false end + node = node or minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] local name = def.door.name - local state = meta:get_string("state") + if state == "" then + -- fix up lvm-placed right-hinged doors, default closed if node.name:sub(-2) == "_b" then state = 2 @@ -148,8 +182,10 @@ function doors.door_toggle(pos, node, clicker) end if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then + local owner = meta:get_string("doors_owner") local prot = meta:get_string("doors_protected") + if prot ~= "" then if minetest.is_protected(pos, clicker:get_player_name()) then @@ -165,6 +201,7 @@ function doors.door_toggle(pos, node, clicker) end local old = state + -- until Lua-5.2 we have no bitwise operators :( if state % 2 == 1 then state = state - 1 @@ -182,15 +219,19 @@ function doors.door_toggle(pos, node, clicker) end if state % 2 == 0 then - minetest.sound_play(def.door.sounds[1], {pos = pos, gain = 0.3, max_hear_distance = 10}) + + minetest.sound_play(def.door.sounds[1], + {pos = pos, gain = 0.3, max_hear_distance = 10}) else - minetest.sound_play(def.door.sounds[2], {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.sound_play(def.door.sounds[2], + {pos = pos, gain = 0.3, max_hear_distance = 10}) end minetest.swap_node(pos, { - name = name .. transform[state + 1][dir+1].v, - param2 = transform[state + 1][dir+1].param2 + name = name .. transform[state + 1][dir + 1].v, + param2 = transform[state + 1][dir + 1].param2 }) + meta:set_int("state", state) return true @@ -198,32 +239,50 @@ end local function on_place_node(place_to, newnode, placer, oldnode, itemstack, pointed_thing) + -- Run script hook local _, callback + for _, callback in pairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them local place_to_copy = {x = place_to.x, y = place_to.y, z = place_to.z} - local newnode_copy = {name = newnode.name, param1 = newnode.param1, param2 = newnode.param2} - local oldnode_copy = {name = oldnode.name, param1 = oldnode.param1, param2 = oldnode.param2} + local newnode_copy = { + name = newnode.name, + param1 = newnode.param1, + param2 = newnode.param2 + } + local oldnode_copy = { + name = oldnode.name, + param1 = oldnode.param1, + param2 = oldnode.param2 + } local pointed_thing_copy = { - type = pointed_thing.type, + type = pointed_thing.type, above = vector.new(pointed_thing.above), under = vector.new(pointed_thing.under), - ref = pointed_thing.ref, + ref = pointed_thing.ref } - callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, pointed_thing_copy) + + callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack, + pointed_thing_copy) end end + local function can_dig_door(pos, digger) + local digger_name = digger and digger:get_player_name() + if digger_name and minetest.get_player_privs(digger_name).protection_bypass then return true end + return minetest.get_meta(pos):get_string("doors_owner") == digger_name end function doors.register(name, def) + if not name:find(":") then name = "doors:" .. name end @@ -232,7 +291,9 @@ function doors.register(name, def) minetest.register_lbm({ name = ":doors:replace_" .. name:gsub(":", "_"), nodenames = {name.."_b_1", name.."_b_2"}, + action = function(pos, node) + local l = tonumber(node.name:sub(-1)) local meta = minetest.get_meta(pos) local h = meta:get_int("right") + 1 @@ -242,21 +303,27 @@ function doors.register(name, def) { { type = "b", state = 1 }, { type = "b", state = 2 } } } local new = replace[l][h] + -- retain infotext and doors_owner fields minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2}) meta:set_int("state", new.state) + -- properly place doors:hidden at the right spot local p3 = p2 + if new.state >= 2 then p3 = (p3 + 3) % 4 end + if new.state % 2 == 1 then + if new.state >= 2 then p3 = (p3 + 1) % 4 else p3 = (p3 + 3) % 4 end end + -- wipe meta on top node as it's unused minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "doors:hidden", param2 = p3}) @@ -269,6 +336,7 @@ function doors.register(name, def) groups = table.copy(def.groups), on_place = function(itemstack, placer, pointed_thing) + local pos = nil if not pointed_thing.type == "node" then @@ -277,9 +345,12 @@ function doors.register(name, def) local node = minetest.get_node(pointed_thing.under) local pdef = minetest.registered_nodes[node.name] - if pdef and pdef.on_rightclick and - not (placer and placer:is_player() and - placer:get_player_control().sneak) then + + if pdef + and pdef.on_rightclick + and not (placer and placer:is_player() + and placer:get_player_control().sneak) then + return pdef.on_rightclick(pointed_thing.under, node, placer, itemstack, pointed_thing) end @@ -290,6 +361,7 @@ function doors.register(name, def) pos = pointed_thing.above node = minetest.get_node(pos) pdef = minetest.registered_nodes[node.name] + if not pdef or not pdef.buildable_to then return itemstack end @@ -304,6 +376,7 @@ function doors.register(name, def) end local pn = placer and placer:get_player_name() or "" + if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) then return itemstack end @@ -314,16 +387,17 @@ function doors.register(name, def) { x = -1, y = 0, z = 0 }, { x = 0, y = 0, z = 1 }, { x = 1, y = 0, z = 0 }, - { x = 0, y = 0, z = -1 }, + { x = 0, y = 0, z = -1 } } local aside = { x = pos.x + ref[dir + 1].x, y = pos.y + ref[dir + 1].y, - z = pos.z + ref[dir + 1].z, + z = pos.z + ref[dir + 1].z } local state = 0 + if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then state = state + 2 minetest.set_node(pos, {name = name .. "_b", param2 = dir}) @@ -334,10 +408,13 @@ function doors.register(name, def) end local meta = minetest.get_meta(pos) + meta:set_int("state", state) if def.protected then + local pn = placer:get_player_name() + meta:set_string("doors_owner", pn) meta:set_string("infotext", "Owned by " .. pn) end @@ -346,19 +423,23 @@ function doors.register(name, def) itemstack:take_item() end - on_place_node(pos, minetest.get_node(pos), placer, node, itemstack, pointed_thing) + on_place_node(pos, minetest.get_node(pos), placer, node, itemstack, + pointed_thing) return itemstack end }) + def.inventory_image = nil if def.recipe then + minetest.register_craft({ output = name, recipe = def.recipe, }) end + def.recipe = nil if not def.sounds then @@ -378,17 +459,23 @@ function doors.register(name, def) def.drop = name def.door = { name = name, - sounds = { def.sound_close, def.sound_open }, + sounds = { def.sound_close, def.sound_open } } def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.door_toggle(pos, node, clicker) + return itemstack end + def.after_dig_node = function(pos, node, meta, digger) + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z}) end + def.on_rotate = false if def.protected then @@ -396,9 +483,12 @@ function doors.register(name, def) def.on_blast = function() end else def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + -- hidden node doesn't get blasted away. minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + return {name} end end @@ -411,6 +501,7 @@ function doors.register(name, def) def.paramtype = "light" def.paramtype2 = "facedir" def.sunlight_propagates = true + def.use_texture_alpha = "clip" def.walkable = true def.is_ground_content = false def.buildable_to = false @@ -427,79 +518,88 @@ function doors.register(name, def) doors.registered_doors[name .. "_b"] = true end + doors.register("door_wood", { - tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, - description = "Wooden Door", - inventory_image = "doors_item_wood.png", - groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }, - recipe = { - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"}, - {"group:wood", "group:wood"}, - } + tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, + description = "Wooden Door", + inventory_image = "doors_item_wood.png", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"} + } }) doors.register("door_steel", { - tiles = {{ name = "doors_door_steel.png", backface_culling = true }}, - description = "Steel Door", - inventory_image = "doors_item_steel.png", - protected = true, - groups = { cracky = 1, level = 2 }, - sounds = default.node_sound_stone_defaults(), - sound_open = "doors_steel_door_open", - sound_close = "doors_steel_door_close", - recipe = { - {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"}, - } + tiles = {{ name = "doors_door_steel.png", backface_culling = true }}, + description = "Steel Door", + inventory_image = "doors_item_steel.png", + protected = true, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_stone_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"} + } }) + doors.register("door_glass", { - tiles = { "doors_door_glass.png"}, - description = "Glass Door", - inventory_image = "doors_item_glass.png", - groups = { cracky = 3, oddly_breakable_by_hand = 3 }, - sounds = default.node_sound_glass_defaults(), - sound_open = "doors_glass_door_open", - sound_close = "doors_glass_door_close", - recipe = { - {"default:glass", "default:glass"}, - {"default:glass", "default:glass"}, - {"default:glass", "default:glass"}, - } + tiles = { "doors_door_glass.png"}, + description = "Glass Door", + inventory_image = "doors_item_glass.png", + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + recipe = { + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"} + } }) + doors.register("door_obsidian_glass", { - tiles = { "doors_door_obsidian_glass.png" }, - description = "Obsidian Glass Door", - inventory_image = "doors_item_obsidian_glass.png", - groups = { cracky = 3 }, - sounds = default.node_sound_glass_defaults(), - sound_open = "doors_glass_door_open", - sound_close = "doors_glass_door_close", - recipe = { - {"default:obsidian_glass", "default:obsidian_glass"}, - {"default:obsidian_glass", "default:obsidian_glass"}, - {"default:obsidian_glass", "default:obsidian_glass"}, - }, + tiles = { "doors_door_obsidian_glass.png" }, + description = "Obsidian Glass Door", + inventory_image = "doors_item_obsidian_glass.png", + groups = {cracky = 3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + recipe = { + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"} + } }) + -- Capture mods using the old API as best as possible. function doors.register_door(name, def) + if def.only_placer_can_open then def.protected = true end + def.only_placer_can_open = nil local i = name:find(":") local modname = name:sub(1, i - 1) + if not def.tiles then + if def.protected then def.tiles = {{name = "doors_door_steel.png", backface_culling = true}} else def.tiles = {{name = "doors_door_wood.png", backface_culling = true}} end + minetest.log("warning", modname .. " registered door \"" .. name .. "\" " .. "using deprecated API method \"doors.register_door()\" but " .. "did not provide the \"tiles\" parameter. A fallback tiledef " .. @@ -512,11 +612,15 @@ end ----trapdoor---- function doors.trapdoor_toggle(pos, node, clicker) + node = node or minetest.get_node(pos) + if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then + local meta = minetest.get_meta(pos) ; if not meta then return false end local owner = meta:get_string("doors_owner") local prot = meta:get_string("doors_protected") + if prot ~= "" then if minetest.is_protected(pos, clicker:get_player_name()) then @@ -534,15 +638,28 @@ function doors.trapdoor_toggle(pos, node, clicker) local def = minetest.registered_nodes[node.name] if string.sub(node.name, -5) == "_open" then - minetest.sound_play(def.sound_close, {pos = pos, gain = 0.3, max_hear_distance = 10}) - minetest.swap_node(pos, {name = string.sub(node.name, 1, string.len(node.name) - 5), param1 = node.param1, param2 = node.param2}) + + minetest.sound_play(def.sound_close, + {pos = pos, gain = 0.3, max_hear_distance = 10}) + + minetest.swap_node(pos, { + name = string.sub(node.name, 1, string.len(node.name) - 5), + param1 = node.param1, param2 = node.param2 + }) else - minetest.sound_play(def.sound_open, {pos = pos, gain = 0.3, max_hear_distance = 10}) - minetest.swap_node(pos, {name = node.name .. "_open", param1 = node.param1, param2 = node.param2}) + minetest.sound_play(def.sound_open, + {pos = pos, gain = 0.3, max_hear_distance = 10}) + + minetest.swap_node(pos, { + name = node.name .. "_open", + param1 = node.param1, param2 = node.param2 + }) end end + function doors.register_trapdoor(name, def) + if not name:find(":") then name = "doors:" .. name end @@ -551,7 +668,9 @@ function doors.register_trapdoor(name, def) local name_opened = name.."_open" def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.trapdoor_toggle(pos, node, clicker) + return itemstack end @@ -559,13 +678,17 @@ function doors.register_trapdoor(name, def) def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" + def.use_texture_alpha = "clip" def.is_ground_content = false if def.protected then + def.can_dig = can_dig_door def.after_place_node = function(pos, placer, itemstack, pointed_thing) + local pn = placer:get_player_name() local meta = minetest.get_meta(pos) + meta:set_string("doors_owner", pn) meta:set_string("infotext", "Owned by "..pn) @@ -575,7 +698,9 @@ function doors.register_trapdoor(name, def) def.on_blast = function() end else def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + return { name } end end @@ -638,13 +763,14 @@ function doors.register_trapdoor(name, def) doors.registered_trapdoors[name_closed] = true end + doors.register_trapdoor("doors:trapdoor", { description = "Trapdoor", inventory_image = "doors_trapdoor.png", wield_image = "doors_trapdoor.png", tile_front = "doors_trapdoor.png", tile_side = "doors_trapdoor_side.png", - groups = { choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1 }, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1} }) doors.register_trapdoor("doors:trapdoor_steel", { @@ -656,7 +782,7 @@ doors.register_trapdoor("doors:trapdoor_steel", { protected = true, sound_open = "doors_steel_door_open", sound_close = "doors_steel_door_close", - groups = { cracky = 1, level = 2, door = 1 }, + groups = {cracky = 1, level = 2, door = 1} }) minetest.register_craft({ @@ -664,7 +790,7 @@ minetest.register_craft({ recipe = { {"group:wood", "group:wood", "group:wood"}, {"group:wood", "group:wood", "group:wood"}, - {"", "", ""}, + {"", "", ""} } }) @@ -672,11 +798,10 @@ minetest.register_craft({ output = "doors:trapdoor_steel", recipe = { {"default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"} } }) - -----key tool----- minetest.register_tool("doors:key", { @@ -754,7 +879,7 @@ minetest.register_craft({ recipe = { {"", "", "default:steel_ingot"}, {"default:steel_ingot", "default:steel_ingot", ""}, - {"default:steel_ingot", "default:steel_ingot", ""}, + {"default:steel_ingot", "default:steel_ingot", ""} } }) @@ -766,6 +891,7 @@ minetest.register_craft({ ----fence gate---- function doors.register_fencegate(name, def) + local fence = { description = def.description, drawtype = "mesh", @@ -787,8 +913,8 @@ function doors.register_fencegate(name, def) end, selection_box = { type = "fixed", - fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4}, - }, + fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4} + } } if not fence.sounds then @@ -798,15 +924,17 @@ function doors.register_fencegate(name, def) fence.groups.fence = 1 local fence_closed = table.copy(fence) + fence_closed.mesh = "doors_fencegate_closed.obj" fence_closed.gate = name .. "_open" fence_closed.sound = "doors_fencegate_open" fence_closed.collision_box = { type = "fixed", - fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4}, + fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4} } local fence_open = table.copy(fence) + fence_open.mesh = "doors_fencegate_open.obj" fence_open.gate = name .. "_closed" fence_open.sound = "doors_fencegate_close" @@ -829,6 +957,7 @@ function doors.register_fencegate(name, def) }) end + doors.register_fencegate("doors:gate_wood", { description = "Wooden Fence Gate", texture = "default_wood.png", @@ -864,47 +993,46 @@ doors.register_fencegate("doors:gate_aspen_wood", { groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} }) - ----fuels---- minetest.register_craft({ type = "fuel", recipe = "doors:trapdoor", - burntime = 7, + burntime = 7 }) minetest.register_craft({ type = "fuel", recipe = "doors:door_wood", - burntime = 14, + burntime = 14 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_wood_closed", - burntime = 7, + burntime = 7 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_acacia_wood_closed", - burntime = 8, + burntime = 8 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_junglewood_closed", - burntime = 9, + burntime = 9 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_pine_wood_closed", - burntime = 6, + burntime = 6 }) minetest.register_craft({ type = "fuel", recipe = "doors:gate_aspen_wood_closed", - burntime = 5, + burntime = 5 }) diff --git a/mods/farming/crops/barley.lua b/mods/farming/crops/barley.lua index 65d1f03e..e7f38408 100644 --- a/mods/farming/crops/barley.lua +++ b/mods/farming/crops/barley.lua @@ -28,11 +28,10 @@ minetest.register_craftitem("farming:barley", { -- flour minetest.register_craft({ - type = "shapeless", output = "farming:flour", recipe = { - "farming:barley", "farming:barley", "farming:barley", - "farming:barley", "farming:mortar_pestle" + {"farming:barley", "farming:barley", "farming:barley"}, + {"farming:barley", "farming:mortar_pestle", ""} }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) diff --git a/mods/farming/crops/beans.lua b/mods/farming/crops/beans.lua index 38d8fa94..59ae2ead 100644 --- a/mods/farming/crops/beans.lua +++ b/mods/farming/crops/beans.lua @@ -81,9 +81,7 @@ minetest.register_craftitem("farming:beans", { -- beans can be used for green dye minetest.register_craft({ output = "dye:green", - recipe = { - {"farming:beans"} - } + recipe = {{"farming:beans"}} }) -- beanpole diff --git a/mods/farming/crops/beetroot.lua b/mods/farming/crops/beetroot.lua index ef57986a..05e0b3a9 100644 --- a/mods/farming/crops/beetroot.lua +++ b/mods/farming/crops/beetroot.lua @@ -21,20 +21,17 @@ minetest.register_craftitem("farming:beetroot_soup", { }) minetest.register_craft({ - type = "shapeless", output = "farming:beetroot_soup", recipe = { - "group:food_beetroot", "group:food_beetroot", - "group:food_beetroot", "group:food_beetroot", - "group:food_beetroot", "group:food_beetroot","group:food_bowl" + {"group:food_beetroot", "group:food_beetroot", "group:food_beetroot"}, + {"group:food_beetroot", "group:food_bowl", "group:food_beetroot"} } }) -- red dye minetest.register_craft({ - type = "shapeless", output = "dye:red", - recipe = {"group:food_beetroot"} + recipe = {{"group:food_beetroot"}} }) local def = { diff --git a/mods/farming/crops/blueberry.lua b/mods/farming/crops/blueberry.lua index e8d83c3a..9ec14b62 100644 --- a/mods/farming/crops/blueberry.lua +++ b/mods/farming/crops/blueberry.lua @@ -36,10 +36,9 @@ minetest.register_craftitem("farming:blueberry_pie", { minetest.register_craft({ output = "farming:blueberry_pie", - type = "shapeless", recipe = { - "group:food_flour", "group:food_sugar", - "group:food_blueberries", "group:food_baking_tray" + {"group:food_flour", "group:food_sugar", "group:food_blueberries"}, + {"group:food_baking_tray", "", ""} }, replacements = {{"group:food_baking_tray", "farming:baking_tray"}} }) @@ -79,7 +78,7 @@ def.drop = { items = { {items = {"farming:blueberries 2"}, rarity = 1}, {items = {"farming:blueberries"}, rarity = 2}, - {items = {"farming:blueberries"}, rarity = 3}, + {items = {"farming:blueberries"}, rarity = 3} } } minetest.register_node("farming:blueberry_4", table.copy(def)) diff --git a/mods/farming/crops/carrot.lua b/mods/farming/crops/carrot.lua index 8be1f4eb..2dd45f3c 100644 --- a/mods/farming/crops/carrot.lua +++ b/mods/farming/crops/carrot.lua @@ -27,9 +27,10 @@ minetest.register_craftitem("farming:carrot_juice", { minetest.register_craft({ output = "farming:carrot_juice", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_carrot", "farming:juicer" + {"group:food_carrot"}, + {"farming:juicer"}, + {"vessels:drinking_glass"} }, replacements = { {"group:food_juicer", "farming:juicer"} diff --git a/mods/farming/crops/chili.lua b/mods/farming/crops/chili.lua index 43345566..95f3a30e 100644 --- a/mods/farming/crops/chili.lua +++ b/mods/farming/crops/chili.lua @@ -20,20 +20,17 @@ minetest.register_craftitem("farming:chili_bowl", { }) minetest.register_craft({ - type = "shapeless", output = "farming:chili_bowl", recipe = { - "group:food_chili_pepper", "group:food_barley", - "group:food_tomato", "group:food_beans", "group:food_bowl" + {"group:food_chili_pepper", "group:food_rice", "group:food_tomato"}, + {"group:food_beans", "group:food_bowl", ""} } }) -- chili can be used for red dye minetest.register_craft({ output = "dye:red", - recipe = { - {"farming:chili_pepper"} - } + recipe = {{"farming:chili_pepper"}} }) -- chili definition diff --git a/mods/farming/crops/cocoa.lua b/mods/farming/crops/cocoa.lua index 72e37d04..1fc78757 100644 --- a/mods/farming/crops/cocoa.lua +++ b/mods/farming/crops/cocoa.lua @@ -75,9 +75,7 @@ minetest.register_craftitem("farming:cocoa_beans", { minetest.register_craft( { output = "dye:brown 2", - recipe = { - { "farming:cocoa_beans" } - } + recipe = {{"farming:cocoa_beans"}} }) -- chocolate cookie @@ -128,9 +126,7 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:chocolate_dark 9", - recipe = { - {"farming:chocolate_block"} - } + recipe = {{"farming:chocolate_block"}} }) -- cocoa definition diff --git a/mods/farming/crops/coffee.lua b/mods/farming/crops/coffee.lua index f64369c8..aa67c5e3 100644 --- a/mods/farming/crops/coffee.lua +++ b/mods/farming/crops/coffee.lua @@ -34,10 +34,10 @@ minetest.register_alias("farming:drinking_cup", "vessels:drinking_glass") minetest.register_craft( { output = "farming:coffee_cup", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_coffee", - "group:water_bucket", "group:food_saucepan"}, + {"group:food_saucepan", "group:food_coffee", "group:water_bucket"}, + {"", "vessels:drinking_glass", ""} + }, replacements = { {"group:water_bucket", "bucket:bucket_empty"}, {"group:food_saucepan", "farming:saucepan"} @@ -47,10 +47,10 @@ minetest.register_craft( { if minetest.get_modpath("bucket_wooden") then minetest.register_craft( { output = "farming:coffee_cup", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_coffee", - "group:water_bucket_wooden", "group:food_saucepan"}, + {"group:food_saucepan", "group:food_coffee", "group:water_bucket_wooden"}, + {"", "vessels:drinking_glass", ""} + }, replacements = { {"group:water_bucket_wooden", "bucket_wooden:bucket_empty"}, {"group:food_saucepan", "farming:saucepan"} diff --git a/mods/farming/crops/corn.lua b/mods/farming/crops/corn.lua index ce000c4a..e03c8ba1 100644 --- a/mods/farming/crops/corn.lua +++ b/mods/farming/crops/corn.lua @@ -47,7 +47,7 @@ minetest.register_craft({ }, replacements = { {"group:food_mortar_pestle", "farming:mortar_pestle"}, - {"group:food_baking_tray", "farming:baking_tray"}, + {"group:food_baking_tray", "farming:baking_tray"} } }) @@ -72,9 +72,9 @@ minetest.register_node("farming:bottle_ethanol", { minetest.register_craft( { output = "farming:bottle_ethanol", recipe = { - { "vessels:glass_bottle", "group:food_corn", "group:food_corn"}, - { "group:food_corn", "group:food_corn", "group:food_corn"}, - { "group:food_corn", "group:food_corn", "group:food_corn"} + {"group:food_corn", "group:food_corn", "group:food_corn"}, + {"group:food_corn", "vessels:glass_bottle", "group:food_corn"}, + {"group:food_corn", "group:food_corn", "group:food_corn"} } }) @@ -82,7 +82,7 @@ minetest.register_craft({ type = "fuel", recipe = "farming:bottle_ethanol", burntime = 80, - replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}} + replacements = {{"farming:bottle_ethanol", "vessels:glass_bottle"}} }) -- corn definition diff --git a/mods/farming/crops/grapes.lua b/mods/farming/crops/grapes.lua index 8c5e4586..e0c491d8 100644 --- a/mods/farming/crops/grapes.lua +++ b/mods/farming/crops/grapes.lua @@ -76,9 +76,7 @@ minetest.register_craftitem("farming:grapes", { -- grapes can be used for violet dye minetest.register_craft({ output = "dye:violet", - recipe = { - {"farming:grapes"} - } + recipe = {{"farming:grapes"}} }) -- trellis diff --git a/mods/farming/crops/hemp.lua b/mods/farming/crops/hemp.lua index f8dfd0b5..4cc05e5f 100644 --- a/mods/farming/crops/hemp.lua +++ b/mods/farming/crops/hemp.lua @@ -65,7 +65,7 @@ minetest.register_craft({ type = "fuel", recipe = "farming:hemp_oil", burntime = 20, - replacements = {{ "farming:hemp_oil", "vessels:glass_bottle"}} + replacements = {{"farming:hemp_oil", "vessels:glass_bottle"}} }) -- hemp fibre diff --git a/mods/farming/crops/lettuce.lua b/mods/farming/crops/lettuce.lua index 07ef43ad..bbd7138d 100644 --- a/mods/farming/crops/lettuce.lua +++ b/mods/farming/crops/lettuce.lua @@ -48,7 +48,7 @@ def.groups.growing = nil def.drop = { items = { {items = {'farming:lettuce 2'}, rarity = 1}, - {items = {'farming:lettuce 1'}, rarity = 2}, + {items = {'farming:lettuce 1'}, rarity = 2} } } minetest.register_node("farming:lettuce_5", table.copy(def)) diff --git a/mods/farming/crops/melon.lua b/mods/farming/crops/melon.lua index 0549dd35..4c199da9 100644 --- a/mods/farming/crops/melon.lua +++ b/mods/farming/crops/melon.lua @@ -21,9 +21,8 @@ minetest.register_craft({ }) minetest.register_craft({ - type = "shapeless", output = "farming:melon_slice 4", - recipe = {"farming:melon_8", "farming:cutting_board"}, + recipe = {{"farming:cutting_board", "farming:melon_8"}}, replacements = {{"farming:cutting_board", "farming:cutting_board"}} }) @@ -74,14 +73,19 @@ minetest.register_node("farming:melon_7", table.copy(def)) -- stage 8 (final) def.drawtype = "nodebox" def.description = S("Melon") -def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"} +def.tiles = { + "farming_melon_top.png", "farming_melon_bottom.png", "farming_melon_side.png" +} def.selection_box = {-.5, -.5, -.5, .5, .5, .5} def.walkable = true +def.buildable_to = false +def.paramtype2 = "facedir" def.groups = { food_melon = 1, snappy = 2, oddly_breakable_by_hand = 1, flammable = 2, plant = 1 } def.drop = "farming:melon_8" +def.on_place = minetest.rotate_node minetest.register_node("farming:melon_8", table.copy(def)) -- add to registered_plants diff --git a/mods/farming/crops/mint.lua b/mods/farming/crops/mint.lua index 5bc40215..eceaa166 100644 --- a/mods/farming/crops/mint.lua +++ b/mods/farming/crops/mint.lua @@ -29,11 +29,9 @@ minetest.register_craftitem("farming:mint_tea", { minetest.register_craft({ output = "farming:mint_tea", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_mint", - "group:food_mint", "group:food_mint", - "farming:juicer", "group:water_bucket" + {"group:food_mint", "group:food_mint", "group:food_mint"}, + {"group:water_bucket", "farming:juicer", "vessels:drinking_glass"} }, replacements = { {"group:food_juicer", "farming:juicer"}, @@ -44,11 +42,9 @@ minetest.register_craft({ if minetest.get_modpath("bucket_wooden") then minetest.register_craft({ output = "farming:mint_tea", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_mint", - "group:food_mint", "group:food_mint", - "farming:juicer", "group:water_bucket_wooden" + {"group:food_mint", "group:food_mint", "group:food_mint"}, + {"group:water_bucket_wooden", "farming:juicer", "vessels:drinking_glass"} }, replacements = { {"group:food_juicer", "farming:juicer"}, @@ -92,7 +88,7 @@ def.drop = { {items = {"farming:mint_leaf 2"}, rarity = 1}, {items = {"farming:mint_leaf 2"}, rarity = 2}, {items = {"farming:seed_mint 1"}, rarity = 1}, - {items = {"farming:seed_mint 2"}, rarity = 2}, + {items = {"farming:seed_mint 2"}, rarity = 2} } } minetest.register_node("farming:mint_4", table.copy(def)) diff --git a/mods/farming/crops/onion.lua b/mods/farming/crops/onion.lua index 2a8c63f3..63cdbe53 100644 --- a/mods/farming/crops/onion.lua +++ b/mods/farming/crops/onion.lua @@ -27,12 +27,11 @@ minetest.register_craftitem("farming:onion_soup", { }) minetest.register_craft({ - type = "shapeless", output = "farming:onion_soup", recipe = { - "group:food_onion", "group:food_onion", "group:food_pot", - "group:food_onion", "group:food_onion", - "group:food_onion", "group:food_onion", "group:food_bowl" + {"group:food_onion", "group:food_onion", "group:food_onion"}, + {"group:food_onion", "group:food_pot", "group:food_onion"}, + {"", "group:food_bowl", ""} }, replacements = {{"farming:pot", "farming:pot"}} }) @@ -81,7 +80,7 @@ def.drop = { {items = {"farming:onion"}, rarity = 1}, {items = {"farming:onion"}, rarity = 2}, {items = {"farming:onion"}, rarity = 2}, - {items = {"farming:onion"}, rarity = 5}, + {items = {"farming:onion"}, rarity = 5} } } minetest.register_node("farming:onion_5", table.copy(def)) diff --git a/mods/farming/crops/peas.lua b/mods/farming/crops/peas.lua index 7c6a83df..77058892 100644 --- a/mods/farming/crops/peas.lua +++ b/mods/farming/crops/peas.lua @@ -21,9 +21,8 @@ minetest.register_craftitem("farming:peas", { }) minetest.register_craft({ - type = "shapeless", output = "farming:peas", - recipe = {"farming:pea_pod"} + recipe = {{"farming:pea_pod"}} }) -- pea soup @@ -35,9 +34,12 @@ minetest.register_craftitem("farming:pea_soup", { }) minetest.register_craft({ - type = "shapeless", output = "farming:pea_soup", - recipe = {"group:food_peas", "group:food_peas", "group:food_bowl"} + recipe = { + {"group:food_peas"}, + {"group:food_peas"}, + {"group:food_bowl"} + } }) local def = { diff --git a/mods/farming/crops/pepper.lua b/mods/farming/crops/pepper.lua index 086a0c60..bdf6287a 100644 --- a/mods/farming/crops/pepper.lua +++ b/mods/farming/crops/pepper.lua @@ -30,7 +30,7 @@ minetest.register_craftitem("farming:pepper_yellow", { description = S("Yellow Pepper"), inventory_image = "crops_pepper_yellow.png", on_use = minetest.item_eat(3), - groups = {food_pepper = 1, flammable = 3}, + groups = {food_pepper = 1, flammable = 3} }) -- red pepper @@ -38,13 +38,12 @@ minetest.register_craftitem("farming:pepper_red", { description = S("Red Pepper"), inventory_image = "crops_pepper_red.png", on_use = minetest.item_eat(4), - groups = {food_pepper = 1, flammable = 3}, + groups = {food_pepper = 1, flammable = 3} }) minetest.register_craft({ - type = "shapeless", output = "farming:peppercorn", - recipe = {"group:food_pepper"} + recipe = {{"group:food_pepper"}} }) -- ground pepper @@ -69,8 +68,11 @@ minetest.register_node("farming:pepper_ground", { minetest.register_craft( { output = "farming:pepper_ground", - type = "shapeless", - recipe = {"group:food_peppercorn", "vessels:glass_bottle", "farming:mortar_pestle"}, + recipe = { + {"group:food_peppercorn"}, + {"farming:mortar_pestle"}, + {"vessels:glass_bottle"} + }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) @@ -124,9 +126,9 @@ minetest.register_node("farming:pepper_5", table.copy(def)) def.tiles = {"crops_pepper_plant_6.png"} def.drop = { max_items = 2, items = { - {items = {'farming:pepper_yellow 2'}, rarity = 1}, - {items = {'farming:pepper_yellow'}, rarity = 2}, - {items = {'farming:pepper_yellow'}, rarity = 3}, + {items = {"farming:pepper_yellow 2"}, rarity = 1}, + {items = {"farming:pepper_yellow"}, rarity = 2}, + {items = {"farming:pepper_yellow"}, rarity = 3} } } minetest.register_node("farming:pepper_6", table.copy(def)) @@ -136,9 +138,9 @@ def.tiles = {"crops_pepper_plant_7.png"} def.groups.growing = nil def.drop = { max_items = 2, items = { - {items = {'farming:pepper_red 2'}, rarity = 1}, - {items = {'farming:pepper_red'}, rarity = 2}, - {items = {'farming:pepper_red'}, rarity = 3}, + {items = {"farming:pepper_red 2"}, rarity = 1}, + {items = {"farming:pepper_red"}, rarity = 2}, + {items = {"farming:pepper_red"}, rarity = 3} } } minetest.register_node("farming:pepper_7", table.copy(def)) diff --git a/mods/farming/crops/pineapple.lua b/mods/farming/crops/pineapple.lua index 839a627a..6bb1918e 100644 --- a/mods/farming/crops/pineapple.lua +++ b/mods/farming/crops/pineapple.lua @@ -38,8 +38,7 @@ minetest.register_craftitem("farming:pineapple_ring", { minetest.register_craft( { output = "farming:pineapple_ring 5", - type = "shapeless", - recipe = {"group:food_pineapple"}, + recipe = {{"group:food_pineapple"}}, replacements = {{"farming:pineapple", "farming:pineapple_top"}} }) @@ -53,11 +52,12 @@ minetest.register_craftitem("farming:pineapple_juice", { minetest.register_craft({ output = "farming:pineapple_juice", - type = "shapeless", recipe = { - "vessels:drinking_glass", "group:food_pineapple_ring", - "group:food_pineapple_ring", "group:food_pineapple_ring", - "farming:juicer"}, + {"group:food_pineapple_ring", "group:food_pineapple_ring", + "group:food_pineapple_ring"}, + {"", "farming:juicer", ""}, + {"", "vessels:drinking_glass", ""} + }, replacements = { {"group:food_juicer", "farming:juicer"} } @@ -65,10 +65,10 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:pineapple_juice 2", - type = "shapeless", recipe = { - "vessels:drinking_glass", "vessels:drinking_glass", - "group:food_pineapple", "farming:juicer" + {"group:food_pineapple", ""}, + {"farming:juicer", ""}, + {"vessels:drinking_glass", "vessels:drinking_glass"} }, replacements = { {"group:food_juicer", "farming:juicer"} diff --git a/mods/farming/crops/pumpkin.lua b/mods/farming/crops/pumpkin.lua index 5e29c015..0007ac7b 100644 --- a/mods/farming/crops/pumpkin.lua +++ b/mods/farming/crops/pumpkin.lua @@ -25,9 +25,8 @@ minetest.register_craft({ }) minetest.register_craft({ - type = "shapeless", output = "farming:pumpkin_slice 4", - recipe = {"farming:pumpkin", "farming:cutting_board"}, + recipe = {{"farming:cutting_board", "farming:pumpkin"}}, replacements = {{"farming:cutting_board", "farming:cutting_board"}} }) @@ -122,8 +121,9 @@ minetest.register_craftitem("farming:pumpkin_dough", { minetest.register_craft({ output = "farming:pumpkin_dough", - type = "shapeless", - recipe = {"group:food_flour", "group:food_pumpkin_slice", "group:food_pumpkin_slice"} + recipe = { + {"group:food_pumpkin_slice", "group:food_flour", "group:food_pumpkin_slice"} + } }) minetest.register_craft({ diff --git a/mods/farming/crops/rhubarb.lua b/mods/farming/crops/rhubarb.lua index 073cc18f..d0ac58af 100644 --- a/mods/farming/crops/rhubarb.lua +++ b/mods/farming/crops/rhubarb.lua @@ -45,7 +45,7 @@ local def = { }, sounds = default.node_sound_leaves_defaults(), minlight = 10, - maxlight = 12, + maxlight = 12 } -- stage 1 diff --git a/mods/farming/crops/ryeoatrice.lua b/mods/farming/crops/ryeoatrice.lua index c565a65b..e1f6a727 100644 --- a/mods/farming/crops/ryeoatrice.lua +++ b/mods/farming/crops/ryeoatrice.lua @@ -19,11 +19,10 @@ minetest.override_item("farming:rye", { }) minetest.register_craft({ - type = "shapeless", output = "farming:flour", recipe = { - "farming:rye", "farming:rye", "farming:rye", "farming:rye", - "farming:mortar_pestle" + {"farming:rye", "farming:rye", "farming:rye"}, + {"farming:rye", "farming:mortar_pestle", ""} }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) @@ -44,11 +43,10 @@ minetest.override_item("farming:oat", { }) minetest.register_craft({ - type = "shapeless", output = "farming:flour", recipe = { - "farming:oat", "farming:oat", "farming:oat", "farming:oat", - "farming:mortar_pestle" + {"farming:oat", "farming:oat", "farming:oat"}, + {"farming:oat", "farming:mortar_pestle", ""} }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) @@ -82,11 +80,10 @@ minetest.register_craftitem("farming:rice_flour", { }) minetest.register_craft({ - type = "shapeless", output = "farming:rice_flour", recipe = { - "farming:rice", "farming:rice", "farming:rice", "farming:rice", - "farming:mortar_pestle" + {"farming:rice", "farming:rice", "farming:rice"}, + {"farming:rice", "farming:mortar_pestle", ""} }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) diff --git a/mods/farming/crops/soy.lua b/mods/farming/crops/soy.lua index fa184cb3..053557dc 100644 --- a/mods/farming/crops/soy.lua +++ b/mods/farming/crops/soy.lua @@ -19,9 +19,8 @@ minetest.register_craftitem("farming:soy_beans", { }) minetest.register_craft({ - type = "shapeless", output = "farming:soy_beans", - recipe = {"farming:soy_pod"} + recipe = {{"farming:soy_pod"}} }) -- soy sauce @@ -44,11 +43,11 @@ minetest.register_node("farming:soy_sauce", { }) minetest.register_craft( { - type = "shapeless", output = "farming:soy_sauce", recipe = { - "group:food_soy", "group:food_soy", "group:food_juicer", - "bucket:bucket_river_water", "vessels:glass_bottle", "group:food_salt" + {"group:food_soy", "group:food_salt", "group:food_soy"}, + {"", "group:food_juicer", ""}, + {"", "bucket:bucket_river_water", "vessels:glass_bottle"} }, replacements = { {"bucket:bucket_river_water", "bucket:bucket_empty"}, @@ -78,11 +77,10 @@ minetest.register_node("farming:soy_milk", { }) minetest.register_craft( { - type = "shapeless", output = "farming:soy_milk", recipe = { - "group:food_soy", "group:food_soy", "group:food_soy", - "farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass" + {"group:food_soy", "group:food_soy", "group:food_soy"}, + {"farming:vanilla_extract", "bucket:bucket_water", "vessels:drinking_glass"} }, replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, @@ -100,10 +98,9 @@ minetest.register_craftitem("farming:tofu", { minetest.register_craft({ output = "farming:tofu", - type = "shapeless", recipe = { - "farming:baking_tray", "group:food_soy", "group:food_soy", - "group:food_soy", "group:food_soy", "group:food_soy", + {"farming:baking_tray", "group:food_soy", "group:food_soy"}, + {"group:food_soy", "group:food_soy", "group:food_soy"} }, replacements = {{"farming:baking_tray", "farming:baking_tray"}} }) @@ -163,7 +160,7 @@ minetest.register_node("farming:soy_4", table.copy(def)) def.tiles = {"farming_soy_5.png"} def.drop = { max_items = 1, items = { - {items = {'farming:soy_pod'}, rarity = 1}, + {items = {"farming:soy_pod"}, rarity = 1}, } } minetest.register_node("farming:soy_5", table.copy(def)) @@ -172,9 +169,9 @@ minetest.register_node("farming:soy_5", table.copy(def)) def.tiles = {"farming_soy_6.png"} def.drop = { max_items = 3, items = { - {items = {'farming:soy_pod'}, rarity = 1}, - {items = {'farming:soy_pod'}, rarity = 2}, - {items = {'farming:soy_pod'}, rarity = 3}, + {items = {"farming:soy_pod"}, rarity = 1}, + {items = {"farming:soy_pod"}, rarity = 2}, + {items = {"farming:soy_pod"}, rarity = 3}, } } minetest.register_node("farming:soy_6", table.copy(def)) @@ -184,11 +181,11 @@ def.tiles = {"farming_soy_7.png"} def.groups.growing = nil def.drop = { max_items = 5, items = { - {items = {'farming:soy_pod'}, rarity = 1}, - {items = {'farming:soy_pod'}, rarity = 2}, - {items = {'farming:soy_pod'}, rarity = 3}, - {items = {'farming:soy_pod'}, rarity = 4}, - {items = {'farming:soy_pod'}, rarity = 5} + {items = {"farming:soy_pod"}, rarity = 1}, + {items = {"farming:soy_pod"}, rarity = 2}, + {items = {"farming:soy_pod"}, rarity = 3}, + {items = {"farming:soy_pod"}, rarity = 4}, + {items = {"farming:soy_pod"}, rarity = 5} } } minetest.register_node("farming:soy_7", table.copy(def)) diff --git a/mods/farming/crops/tomato.lua b/mods/farming/crops/tomato.lua index 47879b64..6eff7c63 100644 --- a/mods/farming/crops/tomato.lua +++ b/mods/farming/crops/tomato.lua @@ -17,6 +17,23 @@ minetest.register_craftitem("farming:tomato", { on_use = minetest.item_eat(4) }) +-- tomato soup +minetest.register_craftitem("farming:tomato_soup", { + description = S("Tomato Soup"), + inventory_image = "farming_tomato_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + output = "farming:tomato_soup", + recipe = { + {"group:food_tomato"}, + {"group:food_tomato"}, + {"group:food_bowl"} + } +}) + -- tomato definition local def = { drawtype = "plantlike", diff --git a/mods/farming/crops/vanilla.lua b/mods/farming/crops/vanilla.lua index 17236a37..d17c8c39 100644 --- a/mods/farming/crops/vanilla.lua +++ b/mods/farming/crops/vanilla.lua @@ -8,7 +8,7 @@ minetest.register_craftitem("farming:vanilla", { on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1") end, - on_use = minetest.item_eat(1), + on_use = minetest.item_eat(1) }) -- crop definition @@ -49,8 +49,8 @@ minetest.register_node("farming:vanilla_extract", { minetest.register_craft( { output = "farming:vanilla_extract", recipe = { - { "group:food_vanilla", "group:food_vanilla", "group:food_vanilla"}, - { "group:food_vanilla", "farming:bottle_ethanol", "bucket:bucket_water"}, + {"group:food_vanilla", "group:food_vanilla", "group:food_vanilla"}, + {"group:food_vanilla", "farming:bottle_ethanol", "bucket:bucket_water"}, }, replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, @@ -61,7 +61,7 @@ minetest.register_craft({ type = "fuel", recipe = "farming:vanilla_extract", burntime = 25, - replacements = {{ "farming:vanilla_extract", "vessels:glass_bottle" }} + replacements = {{"farming:vanilla_extract", "vessels:glass_bottle"}} }) -- stage 1 @@ -92,9 +92,9 @@ minetest.register_node("farming:vanilla_6", table.copy(def)) def.tiles = {"farming_vanilla_7.png"} def.drop = { items = { - {items = {'farming:vanilla'}, rarity = 1}, - {items = {'farming:vanilla'}, rarity = 2}, - {items = {'farming:vanilla'}, rarity = 3} + {items = {"farming:vanilla"}, rarity = 1}, + {items = {"farming:vanilla"}, rarity = 2}, + {items = {"farming:vanilla"}, rarity = 3} } } minetest.register_node("farming:vanilla_7", table.copy(def)) @@ -104,10 +104,10 @@ def.tiles = {"farming_vanilla_8.png"} def.groups.growing = nil def.drop = { items = { - {items = {'farming:vanilla 2'}, rarity = 1}, - {items = {'farming:vanilla 2'}, rarity = 2}, - {items = {'farming:vanilla 2'}, rarity = 2}, - {items = {'farming:vanilla 2'}, rarity = 3} + {items = {"farming:vanilla 2"}, rarity = 1}, + {items = {"farming:vanilla 2"}, rarity = 2}, + {items = {"farming:vanilla 2"}, rarity = 2}, + {items = {"farming:vanilla 2"}, rarity = 3} } } minetest.register_node("farming:vanilla_8", table.copy(def)) diff --git a/mods/farming/crops/wheat.lua b/mods/farming/crops/wheat.lua index e21d7f67..1a7de8ac 100644 --- a/mods/farming/crops/wheat.lua +++ b/mods/farming/crops/wheat.lua @@ -46,9 +46,7 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:wheat 3", - recipe = { - {"farming:straw"} - } + recipe = {{"farming:straw"}} }) -- check and register stairs @@ -80,11 +78,10 @@ minetest.register_craftitem("farming:flour", { }) minetest.register_craft({ - type = "shapeless", output = "farming:flour", recipe = { - "farming:wheat", "farming:wheat", "farming:wheat", - "farming:wheat", "farming:mortar_pestle" + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:mortar_pestle", ""} }, replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}} }) @@ -113,9 +110,8 @@ minetest.register_craftitem("farming:bread_slice", { }) minetest.register_craft({ - type = "shapeless", output = "farming:bread_slice 5", - recipe = {"farming:bread", "group:food_cutting_board"}, + recipe = {{"group:food_cutting_board", "farming:bread"}}, replacements = {{"group:food_cutting_board", "farming:cutting_board"}} }) diff --git a/mods/farming/food.lua b/mods/farming/food.lua index a097e6c5..a7f5af15 100644 --- a/mods/farming/food.lua +++ b/mods/farming/food.lua @@ -117,9 +117,11 @@ minetest.register_node("farming:salt_crystal", { }, }) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "farming:salt 9", - recipe = {"farming:salt_crystal", "farming:mortar_pestle"}, + recipe = { + {"farming:salt_crystal", "farming:mortar_pestle"} + }, replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}} }) @@ -211,9 +213,11 @@ minetest.register_craftitem("farming:garlic_bread", { }) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "farming:garlic_bread", - recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"} + recipe = { + {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"} + } }) --= Donuts (thanks to Bockwurst for making the donut images) @@ -270,11 +274,11 @@ minetest.register_craftitem("farming:porridge", { }) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "farming:porridge", recipe = { - "group:food_oats", "group:food_oats", "group:food_oats", - "group:food_oats", "group:food_bowl", "group:food_milk_glass" + {"group:food_oats", "group:food_oats", "group:food_oats"}, + {"group:food_oats", "group:food_bowl", "group:food_milk_glass"} }, replacements = { {"mobs:glass_milk", "vessels:drinking_glass"}, @@ -291,12 +295,12 @@ minetest.register_craftitem("farming:jaffa_cake", { }) minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "farming:jaffa_cake", recipe = { - "farming:baking_tray", "group:food_egg", "group:food_sugar", - "group:food_flour", "group:food_cocoa", "group:food_orange", - "group:food_milk" + {"farming:baking_tray", "group:food_egg", "group:food_sugar"}, + {"group:food_flour", "group:food_cocoa", "group:food_orange"}, + {"group:food_milk", "", ""} }, replacements = { {"farming:baking_tray", "farming:baking_tray"}, @@ -314,10 +318,9 @@ minetest.register_craftitem("farming:apple_pie", { minetest.register_craft({ output = "farming:apple_pie", - type = "shapeless", recipe = { - "group:food_flour", "group:food_sugar", - "group:food_apple", "group:food_baking_tray" + {"group:food_flour", "group:food_sugar", "group:food_apple"}, + {"", "group:food_baking_tray", ""} }, replacements = {{"group:food_baking_tray", "farming:baking_tray"}} }) @@ -342,11 +345,11 @@ minetest.register_craftitem("farming:cactus_juice", { }) minetest.register_craft({ - output = "farming:cactus_juice 2", - type = "shapeless", + output = "farming:cactus_juice", recipe = { - "vessels:drinking_glass", "vessels:drinking_glass", - "default:cactus", "farming:juicer" + {"default:cactus"}, + {"farming:juicer"}, + {"vessels:drinking_glass"} }, replacements = { {"group:food_juicer", "farming:juicer"} @@ -363,20 +366,16 @@ minetest.register_craftitem("farming:pasta", { minetest.register_craft({ output = "farming:pasta", - type = "shapeless", recipe = { - "group:food_flour", "group:food_mixing_bowl", - "group:food_butter" + {"group:food_flour", "group:food_butter", "group:food_mixing_bowl"} }, replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}} }) minetest.register_craft({ output = "farming:pasta", - type = "shapeless", recipe = { - "group:food_flour", "group:food_mixing_bowl", - "group:food_oil" + {"group:food_flour", "group:food_oil", "group:food_mixing_bowl"} }, replacements = { {"group:food_mixing_bowl", "farming:mixing_bowl"}, @@ -394,10 +393,9 @@ minetest.register_craftitem("farming:spaghetti", { minetest.register_craft({ output = "farming:spaghetti", - type = "shapeless", recipe = { - "group:food_pasta", "group:food_saucepan", - "group:food_tomato", "group:food_garlic_clove", "group:food_garlic_clove" + {"group:food_pasta", "group:food_saucepan", "group:food_tomato"}, + {"group:food_garlic_clove", "group:food_garlic_clove", ""} }, replacements = {{"group:food_saucepan", "farming:saucepan"}} }) @@ -412,11 +410,10 @@ minetest.register_craftitem("farming:bibimbap", { minetest.register_craft({ output = "farming:bibimbap", - type = "shapeless", recipe = { - "group:food_skillet", "group:food_bowl", "group:food_egg", "group:food_rice", - "group:food_chicken_raw", "group:food_cabbage", "group:food_carrot", - "group:food_chili_pepper" + {"group:food_skillet", "group:food_bowl", "group:food_egg"}, + {"group:food_rice", "group:food_chicken_raw", "group:food_cabbage"}, + {"group:food_carrot", "group:food_chili_pepper", ""} }, replacements = {{"group:food_skillet", "farming:skillet"}} }) @@ -441,12 +438,11 @@ minetest.register_craftitem("farming:burger", { }) minetest.register_craft({ - type = "shapeless", output = "farming:burger", recipe = { - "farming:bread", "group:food_meat", "group:food_cheese", - "group:food_tomato", "group:food_cucumber", "group:food_onion", - "group:food_lettuce" + {"farming:bread", "group:food_meat", "group:food_cheese"}, + {"group:food_tomato", "group:food_cucumber", "group:food_onion"}, + {"group:food_lettuce", "", ""} } }) @@ -464,7 +460,7 @@ minetest.register_craft({ recipe = { "group:food_bowl", "group:food_tomato", "group:food_cucumber", "group:food_lettuce", "group:food_oil" - }, + } }) -- Triple Berry Smoothie @@ -510,7 +506,7 @@ minetest.register_craft({ minetest.register_craftitem("farming:potato_omelet", { description = S("Potato omelet"), inventory_image = "farming_potato_omelet.png", - on_use = minetest.item_eat(6, "farming:bowl"), + on_use = minetest.item_eat(6, "farming:bowl") }) minetest.register_craft({ @@ -549,11 +545,10 @@ minetest.register_craftitem("farming:flan", { }) minetest.register_craft({ - type = "shapeless", output = "farming:flan", recipe = { - "group:food_sugar", "group:food_milk", "farming:caramel", - "group:food_egg", "group:food_egg", "farming:vanilla_extract" + {"group:food_sugar", "group:food_milk", "farming:caramel"}, + {"group:food_egg", "group:food_egg", "farming:vanilla_extract"} }, replacements = { {"cucina_vegana:soy_milk", "vessels:drinking_glass"}, @@ -568,17 +563,16 @@ minetest.register_craftitem("farming:cheese_vegan", { description = S("Vegan Cheese"), inventory_image = "farming_cheese_vegan.png", on_use = minetest.item_eat(2), - groups = {food_cheese = 1, flammable = 2}, + groups = {food_cheese = 1, flammable = 2} }) minetest.register_craft({ - type = "shapeless", output = "farming:cheese_vegan", recipe = { - "farming:soy_milk", "farming:soy_milk", "farming:soy_milk", - "group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol", - "group:food_gelatin", "group:food_pot" + {"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"}, + {"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol"}, + {"group:food_gelatin", "group:food_pot", ""} }, replacements = { {"farming:soy_milk", "vessels:drinking_glass 3"}, @@ -588,16 +582,15 @@ minetest.register_craft({ }) minetest.register_craft({ - type = "shapeless", output = "farming:cheese_vegan", recipe = { - "farming:soy_milk", "farming:soy_milk", "farming:soy_milk", - "group:food_salt", "group:food_peppercorn", "group:food_lemon", - "group:food_gelatin", "group:food_pot" + {"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"}, + {"group:food_salt", "group:food_peppercorn", "group:food_lemon"}, + {"group:food_gelatin", "group:food_pot", ""} }, replacements = { {"farming:soy_milk", "vessels:drinking_glass 3"}, - {"farming:pot", "farming:pot"}, + {"farming:pot", "farming:pot"} } }) @@ -607,14 +600,14 @@ minetest.register_craftitem("farming:onigiri", { description = S("Onirigi"), inventory_image = "farming_onigiri.png", on_use = minetest.item_eat(2), - groups = {flammable = 2}, + groups = {flammable = 2} }) minetest.register_craft({ - type = "shapeless", output = "farming:onigiri", recipe = { - "group:food_rice", "group:food_rice", "group:food_seaweed", "group:food_salt" + {"group:food_rice", "group:food_salt", "group:food_rice"}, + {"", "group:food_seaweed", ""} } }) @@ -624,16 +617,16 @@ minetest.register_craftitem("farming:gyoza", { description = S("Gyoza"), inventory_image = "farming_gyoza.png", on_use = minetest.item_eat(4), - groups = {flammable = 2}, + groups = {flammable = 2} }) minetest.register_craft({ - type = "shapeless", output = "farming:gyoza 4", recipe = { - "group:food_cabbage", "group:food_garlic_clove", "group:food_onion", - "group:food_meat_raw", "group:food_salt", "group:food_skillet", - "group:food_flour" + {"group:food_cabbage", "group:food_garlic_clove", "group:food_onion"}, + {"group:food_meat_raw", "group:food_salt", "group:food_flour"}, + {"", "group:food_skillet", ""} + }, replacements = { {"group:food_skillet", "farming:skillet"} @@ -646,15 +639,15 @@ minetest.register_craftitem("farming:mochi", { description = S("Mochi"), inventory_image = "farming_mochi.png", on_use = minetest.item_eat(3), - groups = {flammable = 2}, + groups = {flammable = 2} }) minetest.register_craft({ - type = "shapeless", output = "farming:mochi", recipe = { - "group:food_mortar_pestle", "group:food_rice", "group:food_rice", - "group:food_sugar", "bucket:bucket_river_water" + {"group:food_rice", "group:food_sugar", "group:food_rice"}, + {"", "group:food_mortar_pestle", ""}, + {"", "bucket:bucket_river_water", ""} }, replacements = { {"group:food_mortar_pestle", "farming:mortar_pestle"}, diff --git a/mods/farming/license.txt b/mods/farming/license.txt index 7ef6164b..c929fcc6 100644 --- a/mods/farming/license.txt +++ b/mods/farming/license.txt @@ -63,6 +63,11 @@ Created by VanessaE (License: CC BY 3.0): farming_cotton_7.png farming_cotton_8.png +Created by 7eventy7 (https://www.planetminecraft.com/member/7eventy7/) + farming_melon_top.png + farming_melon_side.png + farming_melon_bottom.png + Created by Doc (License: CC BY 3.0): farming_cucumber.png farming_cucumber_1.png @@ -164,3 +169,7 @@ Created by Felfa (CC0) Created by gorlock (CC0) farming_salt_crystal.png + +Created by sirrobzeroone (CC0) + farming_gyoza.png + farming_pineapple_ring.png diff --git a/mods/farming/textures/farming_gyoza.png b/mods/farming/textures/farming_gyoza.png index 2005e7991cde4c5898613b7db93ab00c1981a26c..c8f036f08864c67603f5100ad22c6c1ea095829a 100644 GIT binary patch delta 228 zcmcc3(#2%f8Q|y6%O%Cdz`(%k>ERLtqy<2jg&9b`z556xz*rpQ?!>U}oXkrg#~{Eb z#C4*MLH&HcM`uBjB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLNg- zFY)wsWq-=b&Y+>P&*ZK$P{_^G#W95AdUC=6b_)q9g%bbcoCe*G-}G;`Kfv_8Q9$EJ z;j?o$<)1h9yt7SzKaX*v#ep@u9YR$TuHBX9Nw_wXuY*xmwj!5>VP=Q&mg!}hM}S5$ Nc)I$ztaD0e0svy}L`?ty delta 568 zcmV-80>}M|0^0;EiBL{Q4GJ0x0000DNk~Le0000v0000v2m=5B0K3L>w*UYDGf+%a zML+-mkv1@YF{Hoa00001bW%=J06^y0W&i*I)=5M`R7l6|mP>ZSAPhwV2#Np+_P^Q+ zjBRjm+DzNL2~M1gK8SbnczpEHpODh3KN(}*BEdsjHTZzjwJGhvgRD%iverlx5x;B$ z$Xnh>S6ULN?@>oA6$a#738rn0Ep+Cf)ormZHG&(lYyTvL16sB0jzw4UtYH@dC5N>* zT!X<|?P&jDsTwyS>!b|}5~6g+V-LXtzV9F_*O=FYrJ;P3$X!GH+`A+(^mTB`Sly(3 zgL=q+4~sBg4sFjGpU{o2q11u}HjigIce}yDE z>S+(9tk617txM;qVNcr#QQd*c>j(eU@0q^}mDLQdtIOUpSj|>m!r-^gFOcDA{ UmDelJ0Igy0boFyt=akR{0H%mLG5`Po literal 0 HcmV?d00001 diff --git a/mods/farming/textures/farming_melon_side.png b/mods/farming/textures/farming_melon_side.png index 88e40c6a08421585274e41b58ecd19c88cc0a567..07afb25d3d6fec12ab2e0e806c120ae153372003 100644 GIT binary patch delta 151 zcmV;I0BHY?0pu}1%Wy38 zZ)yGs*I0&$A^*3;pAgMsC{en5Q2v<7Ifg=pJq!JhD%@pgRBKwZK;xRid7#v~Ph3w8 z`WZ@;&wb#3>;Pi?f5dkc#4!GUNbZ@!K86y-_lu=o02xzM?k&qc?skr0i|hYmo;$*3 sF>H%?_bhvR+dhWrv;S_(KHYs50Lv3cFfLaFE&u=k07*qoM6N<$g21e8J^0B!3T3OjJcIT^TWR98!TCZ<8Z^oh6xxX?_3z0BuP`K~xCW4UNGO z0x=8&H8&IhxfFmM7XY>zz)Jr$k&k8{yCcxV$stq+BZCkREH!2&?^y;@$>ak&?_Rk! zYMWhy1uxCdO2_beyeT`mo>y^$dex~4vg+grjL0AF-3Y}ud>);zW~z@vSL)0kP%jqd TNi3`M00000NkvXXu0mjf2%0~> delta 244 zcmVbyH)^H%S5jT8hP9RRJ(+41`^He0BuwpeRME7yX*kD5k!(n z-7*{i?#d9WV-XZ40Pc7dz@QxcHUPOHUhwf3&TIg=1Yhy<0=}#O>Dumo?wDxo0NL&7 ue!H48oB+Q6`?>%8ddUFHySrM;yU*+?GEAu4rZoWo0000gU3;&MBb@0G>H5bpQYW delta 96 zcmbQuSTsQ*iiw$lfgx$G_$MI68Q>G*3ZyM>`#b)M>iqbA4UofF666=m;PC858jvII v>Eal|aXmR<0fz>|MhE5z3Ctg7NJubnmND#X_^(_8RKnot>gTe~DWM4fL|Pok diff --git a/mods/farming/textures/farming_mint_2.png b/mods/farming/textures/farming_mint_2.png index b0d4324733bd96a63f87d78bf2a2ee27a9b779a5..cdcde54b5ada04179af48bea4553b00ca468303f 100644 GIT binary patch delta 155 zcmb;C>T!{vnj=2UxOj+!r46Lg;ZdUk4+W}2v@O1TaS?83{ F1OS4iF@XR8 delta 104 zcmZ3(ST#W+iHVtkfgx$G_$MI68Q>G*3ZyM>`#b)M>iqbA4UofF666=m;PC858jvIJ z>Eal|aXmRfLAJnzfs>z6L6IRz(}IE1Zvu-jGc$v#7~`D}{ZIb@l`?p``njxgN@xNA D*asY? diff --git a/mods/farming/textures/farming_mint_3.png b/mods/farming/textures/farming_mint_3.png index 3ae3d61bc9e070cfc760a6a4f48c03850836f9b8..4bfc43f255160098b56a580eda438756b225b383 100644 GIT binary patch delta 175 zcmZo++|M{cqMn7Bfq~)e-A6${N;JSH#5KPtH=^1xzQrxI&$oD`ckN#9_KUtA>!*kV z6)=_r`2{mLJiCzwFMGa!f`!0K|#pCvWU^sm646j@0y>&Y2gz|B00>RstlZA6QtbO*chyGnfkUp5u6Cr O#Ng@b=d#Wzp$Pz3Kp>w0 diff --git a/mods/farming/textures/farming_mint_4.png b/mods/farming/textures/farming_mint_4.png index 83c0e90161dc7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j3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8W<`RdP`(kYX@0Ff`XSG|)9P4l%T_GBLL@HrF;Vv@$T*WTH3$MMG|WN@iLm WZViVsXX*eoFnGH9xvX 1 then + drop = "default:coal_lump" + end + + local obj = minetest.add_item(pos, {name = drop}) + local dir = clicker:get_look_dir() + + obj:set_velocity({x = -dir.x, y = 1.5, z = -dir.z}) + + --minetest.chat_send_player(name, S("NPC dropped you an item for gold!")) return end - -- if owner switch between follow and stand + -- by right-clicking owner can switch npc between follow, wander and stand if self.owner and self.owner == name then if self.order == "follow" then - self.attack = nil + self.order = "wander" + + minetest.chat_send_player(name, S("NPC will wander.")) + + elseif self.order == "wander" then + self.order = "stand" self.state = "stand" + self.attack = nil + self:set_animation("stand") self:set_velocity(0) minetest.chat_send_player(name, S("NPC stands still.")) - else + + elseif self.order == "stand" then + self.order = "follow" + minetest.chat_send_player(name, S("NPC will follow you.")) end end - end, + end }) --- register spawn egg + mobs:register_egg("mobs_npc:igor", S("Igor"), "mobs_meat_raw.png", 1) -- compatibility diff --git a/mods/mobs_npc/lucky_block.lua b/mods/mobs_npc/lucky_block.lua index 98735619..93db875e 100644 --- a/mods/mobs_npc/lucky_block.lua +++ b/mods/mobs_npc/lucky_block.lua @@ -5,7 +5,6 @@ if minetest.get_modpath("lucky_block") then {"spw", "mobs:npc", 1, true, true}, {"spw", "mobs:igor", 1, true, true, 5, "Igor"}, {"spw", "mobs:trader", 1, false, false}, - {"lig", "fire:permanent_flame"}, + {"lig", "fire:permanent_flame"} }) - end diff --git a/mods/mobs_npc/npc.lua b/mods/mobs_npc/npc.lua index c2c8d011..891d5e75 100644 --- a/mods/mobs_npc/npc.lua +++ b/mods/mobs_npc/npc.lua @@ -4,8 +4,12 @@ local S = mobs.intllib -- Npc by TenPlus1 mobs.npc_drops = { - "default:pick_steel", "mobs:meat", "default:sword_steel", - "default:shovel_steel", "farming:bread", "bucket:bucket_water" + {"default:pick_steel", 2}, "mobs:meat", {"default:sword_steel", 2}, + {"default:shovel_steel", 2}, "farming:bread", "bucket:bucket_water", + "default:sapling", "default:tree", "mobs:leather", "default:coral_orange", + {"default:mese_crystal_fragment", 3}, "default:clay", {"default:sign_wall", 2}, + "default:ladder", "default:copper_lump", "default:blueberries", + "default:aspen_sapling", "default:permafrost_with_moss" } mobs:register_mob("mobs_npc:npc", { @@ -27,9 +31,11 @@ mobs:register_mob("mobs_npc:npc", { textures = { {"mobs_npc.png"}, {"mobs_npc2.png"}, -- female by nuttmeg20 + {"mobs_npc3.png"}, -- male by swagman181818 + {"mobs_npc4.png"} -- female by Sapphire16 }, child_texture = { - {"mobs_npc_baby.png"}, -- derpy baby by AmirDerAssassine + {"mobs_npc_baby.png"} -- derpy baby by AmirDerAssassine }, makes_footstep_sound = true, sounds = {}, @@ -39,7 +45,7 @@ mobs:register_mob("mobs_npc:npc", { drops = { {name = "default:wood", chance = 1, min = 1, max = 3}, {name = "default:apple", chance = 2, min = 1, max = 2}, - {name = "default:axe_stone", chance = 5, min = 1, max = 1}, + {name = "default:axe_stone", chance = 5, min = 1, max = 1} }, water_damage = 0, lava_damage = 2, @@ -59,7 +65,7 @@ mobs:register_mob("mobs_npc:npc", { run_start = 168, run_end = 187, punch_start = 200, - punch_end = 219, + punch_end = 219 }, on_rightclick = function(self, clicker) @@ -85,39 +91,58 @@ mobs:register_mob("mobs_npc:npc", { end local pos = self.object:get_pos() - - pos.y = pos.y + 0.5 - local drops = self.npc_drops or mobs.npc_drops + local drop = drops[math.random(#drops)] + local chance = 1 - minetest.add_item(pos, { - name = drops[math.random(1, #drops)] - }) + if type(drop) == "table" then + chance = drop[2] + drop = drop[1] + end - minetest.chat_send_player(name, S("NPC dropped you an item for gold!")) + if not minetest.registered_items[drop] + or math.random(chance) > 1 then + drop = "default:clay_lump" + end + + local obj = minetest.add_item(pos, {name = drop}) + local dir = clicker:get_look_dir() + + obj:set_velocity({x = -dir.x, y = 1.5, z = -dir.z}) + + --minetest.chat_send_player(name, S("NPC dropped you an item for gold!")) return end - -- by right-clicking owner can switch npc between follow and stand + -- by right-clicking owner can switch npc between follow, wander and stand if self.owner and self.owner == name then if self.order == "follow" then - self.attack = nil + self.order = "wander" + + minetest.chat_send_player(name, S("NPC will wander.")) + + elseif self.order == "wander" then + self.order = "stand" self.state = "stand" + self.attack = nil + self:set_animation("stand") self:set_velocity(0) minetest.chat_send_player(name, S("NPC stands still.")) - else + + elseif self.order == "stand" then + self.order = "follow" minetest.chat_send_player(name, S("NPC will follow you.")) end end - end, + end }) if not mobs.custom_spawn_npc then @@ -129,7 +154,7 @@ mobs:spawn({ chance = 10000, active_object_count = 1, min_height = 0, - day_toggle = true, + day_toggle = true }) end diff --git a/mods/mobs_npc/textures/mobs_npc3.png b/mods/mobs_npc/textures/mobs_npc3.png new file mode 100644 index 0000000000000000000000000000000000000000..cfe6c02e57fb17fe552b9c830799c790cd839e34 GIT binary patch literal 870 zcmV-s1DX7ZP)zZb{PCvCq!CN(Iozn`0_2&SMQUZe0;Xc0tu-m*NyaZ51z&E8= z07QV=CBWA7S`0wqbq10GB{8V}^AD)+)*L~ghSY5>)A!U#(Jp_N(Cqo7=7#t!0PTm1 z`orfo;RpKFJSRaOhH&IiHiYA;GI@pp1c0wniGQc`n-}az-MOe|B%JZwSuI5XO4`I< zHP6RjSI{i$l4|}isTx8>735ohMG9w58+zb;mM)T3ly(5pyrt!-S}>i}ec$%?{RP%u zD2B+4;kb`oUSMAUv@u=Z5ACtHm$r46)^g;WF&y_fMqZcYYnfYZEd2EYz_}FwA;eN* z2*>@*%>QN3S)*InU4oN1IOBbYF?fI6FFEHg49FO(nT)lz(-vHaj3;SnD*M`(5-5lo z0T5A))kD7}%LYL(+G=Yo0LfEKDN~kppd36COFTsa6h*ln888;^WVFnrjTCbH;F8Km zk#z{f`S6eMjgpy1U{4yPg{tn1(FCgugznD3^GA@cIOS3@|I5J2;doL+SS=B;CQ}iB zB5U?Ip16p54ADb|gyNHg8anw{>n5^YXWZr|JD|ngB4mVHDj(B!EF(BLnhX=Xu@G zE4y7E?@Tw16HXo{hhZ38%>s!^s#!n)z#%i7w?*n}p8x*m8bEw{dmn~rsD=)vh|I+d z2H1!{3MpT=Yf30%cyHUfdva(TOm_h3flGhU wJ-PuM-9|yU8T=z4kb9;IkoK33yetm?KVmpbwAA`F0RR9107*qoM6N<$f;Gj7vj6}9 literal 0 HcmV?d00001 diff --git a/mods/mobs_npc/textures/mobs_npc4.png b/mods/mobs_npc/textures/mobs_npc4.png new file mode 100644 index 0000000000000000000000000000000000000000..e0e89a5c0f9dab4218f789295758f4ce954fb40e GIT binary patch literal 686 zcmV;f0#W^mP)eO zXjGj7PK6{AA(8YZ^WUELpyj^-)_$wkxqch+dM*S2=M^CGOP>Y6Yc%CU*o3SF6E=~> zumRAC(vJd)>!KVZZwRIcL=-@@>`DHj0HSZ>Vgp0)YoMd6LsmImi7=t-E|;!@0qM%( ziFmfStSz|s5Pil3V(JXgk@bBYZ}tQO=VXE75uiZG9WwCoGLA1F$OQQyeH2>D1g$Fw z-!Y`)L5g*v99xv<2pP|({0FoI&LrZs%5;CGRZOzr|X{sCeuxY2Bm}mm2oTx zn6@og#Z=8paT_XhH^99VOv14)<5Y0?1W?miK0luZguvnpGaCR03V?ZrS+#@V0 z5Hf_TEr5DgY7i@6{t@7PKjb|0mW6!~&j4);3Lwe@lv^4@Skw4BAc=-oXwYV|U#j$U z77QR;sDNI6FZwi#R=~Uf2KBbD#@S}&-1j-BZF_fOaZG*ysG;5g8?*Z`9@OT40ff6Y UWD9OK!2kdN07*qoM6N<$g7WDxTmS$7 literal 0 HcmV?d00001 diff --git a/mods/mobs_redo/api.lua b/mods/mobs_redo/api.lua index 9398cda6..c9da05ca 100644 --- a/mods/mobs_redo/api.lua +++ b/mods/mobs_redo/api.lua @@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20210407", + version = "20210515", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -224,10 +224,10 @@ function mob_class:collision() for _,object in ipairs(minetest.get_objects_inside_radius(pos, width)) do - if object:is_player() - or (object:get_luaentity() - and object:get_luaentity()._cmi_is_mob == true - and object ~= self.object) then + if object:is_player() then +-- or (object:get_luaentity() +-- and object:get_luaentity()._cmi_is_mob == true +-- and object ~= self.object) then local pos2 = object:get_pos() local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z} @@ -1070,7 +1070,11 @@ function mob_class:do_env_damage() end -- particle appears at random mob height - pos.y = pos.y + random(self.collisionbox[2], self.collisionbox[5]) + local py = { + x = pos.x, + y = pos.y + random(self.collisionbox[2], self.collisionbox[5]), + z = pos.z + } local nodef = minetest.registered_nodes[self.standing_in] @@ -1080,7 +1084,7 @@ function mob_class:do_env_damage() self.health = self.health - self.water_damage - effect(pos, 5, "bubble.png", nil, nil, 1, nil) + effect(py, 5, "bubble.png", nil, nil, 1, nil) if self:check_for_death({type = "environment", pos = pos, node = self.standing_in}) then @@ -1093,7 +1097,7 @@ function mob_class:do_env_damage() self.health = self.health - self.lava_damage - effect(pos, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true) + effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true) if self:check_for_death({type = "environment", pos = pos, node = self.standing_in, hot = true}) then @@ -1106,7 +1110,7 @@ function mob_class:do_env_damage() self.health = self.health - self.fire_damage - effect(pos, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true) + effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true) if self:check_for_death({type = "environment", pos = pos, node = self.standing_in, hot = true}) then @@ -1115,11 +1119,11 @@ function mob_class:do_env_damage() -- damage_per_second node check (not fire and lava) elseif nodef.damage_per_second ~= 0 - and nodef.groups.lava == 0 and nodef.groups.fire == 0 then + and nodef.groups.lava == nil and nodef.groups.fire == nil then self.health = self.health - nodef.damage_per_second - effect(pos, 5, "tnt_smoke.png") + effect(py, 5, "tnt_smoke.png") if self:check_for_death({type = "environment", pos = pos, node = self.standing_in}) then @@ -1132,7 +1136,7 @@ function mob_class:do_env_damage() self.health = self.health - self.air_damage - effect(pos, 3, "bubble.png", 1, 1, 1, 0.2) + effect(py, 3, "bubble.png", 1, 1, 1, 0.2) if self:check_for_death({type = "environment", pos = pos, node = self.standing_in}) then @@ -1150,7 +1154,7 @@ function mob_class:do_env_damage() self.health = self.health - self.light_damage - effect(pos, 5, "tnt_smoke.png") + effect(py, 5, "tnt_smoke.png") if self:check_for_death({type = "light"}) then return true @@ -2648,9 +2652,11 @@ function mob_class:do_states(dtime) self.attack = attached end + local dgroup = self.damage_group or "fleshy" + self.attack:punch(self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = self.damage} + damage_groups = {[dgroup] = self.damage} }, nil) end end @@ -2911,22 +2917,17 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) -- only play hit sound and show blood effects if damage is 1 or over if damage >= 1 then + local snd + -- weapon sounds if weapon_def.sounds then - - local s = random(0, #weapon_def.sounds) - - minetest.sound_play(weapon_def.sounds[s], { - object = self.object, - max_hear_distance = 8 - }, true) + snd = weapon_def.sounds[random(#weapon_def.sounds)] else - minetest.sound_play("default_punch", { - object = self.object, - max_hear_distance = 5 - }, true) + snd = "default_punch" end + minetest.sound_play(snd, {object = self.object, max_hear_distance = 8}, true) + -- blood_particles if not disable_blood and self.blood_amount > 0 then @@ -2934,8 +2935,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) local blood = self.blood_texture local amount = self.blood_amount - pos.y = pos.y + (-self.collisionbox[2] - + self.collisionbox[5]) * .5 + pos.y = pos.y + (-self.collisionbox[2] + self.collisionbox[5]) * .5 -- lots of damage = more blood :) if damage > 10 then @@ -2948,7 +2948,6 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) end effect(pos, amount, blood, 1, 2, 1.75, nil, nil, true) - end -- do damage @@ -2958,8 +2957,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) local hot = tool_capabilities and tool_capabilities.damage_groups and tool_capabilities.damage_groups.fire - if self:check_for_death({type = "punch", - puncher = hitter, hot = hot}) then + if self:check_for_death({type = "punch", puncher = hitter, hot = hot}) then return true end @@ -2979,8 +2977,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) end -- END if damage -- knock back effect (only on full punch) - if self.knock_back - and tflp >= punch_interval then + if self.knock_back and tflp >= punch_interval then local v = self.object:get_velocity() @@ -3590,6 +3587,8 @@ minetest.register_entity(name, setmetatable({ walk_velocity = def.walk_velocity, run_velocity = def.run_velocity, damage = max(0, (def.damage or 0) * difficulty), + damage_group = def.damage_group, + damage_texture_modifier = def.damage_texture_modifier, light_damage = def.light_damage, light_damage_min = def.light_damage_min, light_damage_max = def.light_damage_max, @@ -4123,7 +4122,10 @@ function mobs:register_arrow(name, def) minetest.register_entity(name, { - physical = false, + physical = def.physical or false, + collide_with_objects = def.collide_with_objects or false, + static_save = false, + visual = def.visual, visual_size = def.visual_size, textures = def.textures, @@ -4282,7 +4284,7 @@ function mobs:boom(self, pos, radius) radius = radius, damage_radius = radius, sound = self.sounds and self.sounds.explode, - explode_center = true, + explode_center = true }) else mobs:safe_boom(self, pos, radius) @@ -4614,7 +4616,8 @@ function mobs:protect(self, clicker) return true end - if self.protected then + if (self.protected and tool_name == "mobs:protector") + or (self.protected == 2 and tool_name == "mobs:protector2") then minetest.chat_send_player(name, S("Already protected!")) return true end @@ -4820,14 +4823,13 @@ function mobs:alias_mob(old_name, new_name) -- entity minetest.register_entity(":" .. old_name, { - physical = false, + physical = false, static_save = false, on_activate = function(self, staticdata) if minetest.registered_entities[new_name] then - minetest.add_entity(self.object:get_pos(), - new_name, staticdata) + minetest.add_entity(self.object:get_pos(), new_name, staticdata) end remove_mob(self) diff --git a/mods/mobs_redo/api.txt b/mods/mobs_redo/api.txt index 72473a8d..5d4e81f5 100644 --- a/mods/mobs_redo/api.txt +++ b/mods/mobs_redo/api.txt @@ -56,6 +56,8 @@ functions needed for the mob to work properly which contains the following: 'view_range' how many nodes in distance the mob can see a player. 'damage' how many health points the mob does to a player or another mob when melee attacking. + 'damage_group' group in which damage is dealt, dedaults to "fleshy". + 'damage_texture_modifier' applies texture modifier on hit e.g "^[brighten" 'knock_back' when true has mobs falling backwards when hit, the greater the damage the more they move back. 'fear_height' is how high a cliff or edge has to be before the mob stops @@ -465,6 +467,8 @@ This function registers a arrow for mobs with the attack type shoot. 'visual' same is in minetest.register_entity() 'visual_size' same is in minetest.register_entity() 'textures' same is in minetest.register_entity() + 'physical' same is in minetest.register_entity() [default: false] + 'collide_with_objects' same as above 'velocity' the velocity of the arrow 'drop' if set to true any arrows hitting a node will drop as item 'hit_player' a function that is called when the arrow hits a player; diff --git a/mods/mobs_redo/crafts.lua b/mods/mobs_redo/crafts.lua index 3fed1587..de452102 100644 --- a/mods/mobs_redo/crafts.lua +++ b/mods/mobs_redo/crafts.lua @@ -10,9 +10,9 @@ minetest.register_craftitem("mobs:nametag", { if minetest.get_modpath("dye") and minetest.get_modpath("farming") then minetest.register_craft({ - type = "shapeless", +-- type = "shapeless", output = "mobs:nametag", - recipe = {"default:paper", "dye:black", "farming:string"} + recipe = {{"default:paper", "dye:black", "farming:string"}} }) end @@ -299,12 +299,18 @@ minetest.register_tool(":mobs:mob_reset_stick", { tex_obj = obj + -- get base texture + local bt = tex_obj:get_luaentity().base_texture[1] + + if type(bt) ~= "string" then + bt = "" + end + local name = user:get_player_name() - local tex = "" minetest.show_formspec(name, "mobs_texture", "size[8,4]" .. "field[0.5,1;7.5,0;name;" - .. minetest.formspec_escape(S("Enter texture:")) .. ";" .. tex .. "]" + .. minetest.formspec_escape(S("Enter texture:")) .. ";" .. bt .. "]" .. "button_exit[2.5,3.5;3,1;mob_texture_change;" .. minetest.formspec_escape(S("Change")) .. "]") end @@ -362,10 +368,10 @@ minetest.register_node("mobs:meatblock", { minetest.register_craft({ output = "mobs:meatblock", - type = "shapeless", +-- type = "shapeless", recipe = { - "group:food_meat", "group:food_meat", "group:food_meat", - "group:food_meat", "group:food_meat", "group:food_meat", - "group:food_meat", "group:food_meat", "group:food_meat" + {"group:food_meat", "group:food_meat", "group:food_meat"}, + {"group:food_meat", "group:food_meat", "group:food_meat"}, + {"group:food_meat", "group:food_meat", "group:food_meat"} } }) diff --git a/mods/mywoodslopes/ethereal.lua b/mods/mywoodslopes/ethereal.lua index eb8cd9c5..28fac918 100644 --- a/mods/mywoodslopes/ethereal.lua +++ b/mods/mywoodslopes/ethereal.lua @@ -31,12 +31,12 @@ local ocorner_cbox = { } } local moretrees_slopes = { --Material , Description , Item, Image - {"willow" , "Willow Wood" , "ethereal:willow_wood", "willow"}, - {"redwood", "RedWood Wood", "ethereal:redwood_wood", "redwood"}, - {"frost", "Frost Wood", "ethereal:frost_wood", "frost"}, - {"yellow", "Healing Tree Wood", "ethereal:yellow_wood", "yellow"}, + {"willow" , "Willow Wood" , "ethereal:willow_wood", "ethereal_willow"}, + {"redwood", "RedWood Wood", "ethereal:redwood_wood", "ethereal_redwood"}, + {"frost", "Frost Wood", "ethereal:frost_wood", "ethereal_frost"}, + {"yellow", "Healing Tree Wood", "ethereal:yellow_wood", "ethereal_yellow"}, {"palm", "Palm Wood", "ethereal:palm_wood", "moretrees_palm"}, - {"banana", "Banana Wood", "ethereal:banana_wood", "banana"}, + {"banana", "Banana Wood", "ethereal:banana_wood", "ethereal_banana"}, {"birch", "Birch Wood", "ethereal:birch_wood", "moretrees_birch"}, } diff --git a/mods/pie/init.lua b/mods/pie/init.lua index 53661898..139f38e1 100644 --- a/mods/pie/init.lua +++ b/mods/pie/init.lua @@ -97,6 +97,7 @@ local register_pie = function(pie, desc) minetest.register_node("pie:" .. pie .. "_0", { description = desc, paramtype = "light", + use_texture_alpha = "clip", sunlight_propagates = false, tiles = { pie .. "_top.png", pie .. "_bottom.png", pie .. "_side.png", @@ -107,18 +108,19 @@ local register_pie = function(pie, desc) drawtype = "nodebox", node_box = { type = "fixed", - fixed = {{-0.45, -0.5, -0.45, 0.45, 0, 0.45}}, + fixed = {{-0.45, -0.5, -0.45, 0.45, 0, 0.45}} }, on_punch = function(pos, node, puncher, pointed_thing) replace_pie(node, puncher, pos) - end, + end }) -- 3/4 pie minetest.register_node("pie:" .. pie .. "_1", { description = "3/4" .. desc, paramtype = "light", + use_texture_alpha = "clip", sunlight_propagates = true, tiles = { pie .. "_top.png", pie .. "_bottom.png", pie .. "_side.png", @@ -129,18 +131,19 @@ local register_pie = function(pie, desc) drawtype = "nodebox", node_box = { type = "fixed", - fixed = {{-0.45, -0.5, -0.25, 0.45, 0, 0.45}}, + fixed = {{-0.45, -0.5, -0.25, 0.45, 0, 0.45}} }, on_punch = function(pos, node, puncher, pointed_thing) replace_pie(node, puncher, pos) - end, + end }) -- 1/2 pie minetest.register_node("pie:" .. pie .. "_2", { description = "Half " .. desc, paramtype = "light", + use_texture_alpha = "clip", sunlight_propagates = true, tiles = { pie .. "_top.png", pie .. "_bottom.png", pie .. "_side.png", @@ -151,18 +154,19 @@ local register_pie = function(pie, desc) drawtype = "nodebox", node_box = { type = "fixed", - fixed = {{-0.45, -0.5, 0.0, 0.45, 0, 0.45}}, + fixed = {{-0.45, -0.5, 0.0, 0.45, 0, 0.45}} }, on_punch = function(pos, node, puncher, pointed_thing) replace_pie(node, puncher, pos) - end, + end }) -- 1/4 pie minetest.register_node("pie:" .. pie .. "_3", { description = "Piece of " .. desc, paramtype = "light", + use_texture_alpha = "clip", sunlight_propagates = true, tiles = { pie .. "_top.png", pie .. "_bottom.png", pie .. "_side.png", @@ -173,14 +177,13 @@ local register_pie = function(pie, desc) drawtype = "nodebox", node_box = { type = "fixed", - fixed = {{-0.45, -0.5, 0.25, 0.45, 0, 0.45}}, + fixed = {{-0.45, -0.5, 0.25, 0.45, 0, 0.45}} }, on_punch = function(pos, node, puncher, pointed_thing) replace_pie(node, puncher, pos) - end, + end }) - end @@ -192,7 +195,7 @@ minetest.register_craft({ recipe = { {"group:food_sugar", "group:food_milk", "group:food_sugar"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -206,7 +209,7 @@ minetest.register_craft({ recipe = { {"group:food_cocoa", "group:food_milk", "group:food_cocoa"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -220,7 +223,7 @@ minetest.register_craft({ recipe = { {"group:food_strawberry", "group:food_milk", "group:food_strawberry"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -234,7 +237,7 @@ minetest.register_craft({ recipe = { {"group:food_coffee", "group:food_milk", "group:food_coffee"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -248,7 +251,7 @@ minetest.register_craft({ recipe = { {"group:food_cocoa", "group:food_milk", "dye:red"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_flour", "group:food_cheese", "group:food_flour"}, + {"group:food_flour", "group:food_cheese", "group:food_flour"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -261,8 +264,8 @@ minetest.register_craft({ output = "pie:meat_0", recipe = { {"group:food_meat_raw", "group:food_egg", "group:food_meat_raw"}, - {"group:food_wheat", "group:food_wheat", "group:food_wheat"}, - }, + {"group:food_wheat", "group:food_wheat", "group:food_wheat"} + } }) @@ -274,7 +277,7 @@ minetest.register_craft({ recipe = { {"group:food_banana", "group:food_milk", "group:food_banana"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -288,7 +291,7 @@ minetest.register_craft({ recipe = { {"group:food_bread", "group:food_milk", "group:food_bread"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -302,7 +305,7 @@ minetest.register_craft({ recipe = { {"group:food_orange", "group:food_milk", "group:food_orange"}, {"group:food_sugar", "group:food_egg", "group:food_sugar"}, - {"group:food_wheat", "group:food_flour", "group:food_wheat"}, + {"group:food_wheat", "group:food_flour", "group:food_wheat"} }, replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} }) @@ -322,7 +325,7 @@ lucky_block:add_blocks({ {"tro", "pie:orange_0", "default_place_node_hard", true}, {"nod", "pie:brpd_0", 0}, {"nod", "pie:meat_0", 0}, - {"lig"}, + {"lig"} }) end diff --git a/mods/playerplus/README.md b/mods/playerplus/README.md index 3bf47f12..4bfdcbf5 100644 --- a/mods/playerplus/README.md +++ b/mods/playerplus/README.md @@ -28,7 +28,7 @@ Every second the mod checks which node the player is standing on, which node is at foot and head level and stores inside a global table to be used by mods: - playerplus[name].nod_stand -- playerplus[name].nod_foot +- playerplus[name].nod_feet - playerplus[name].nod_head diff --git a/mods/playerplus/init.lua b/mods/playerplus/init.lua index 0160f9dd..779b1121 100644 --- a/mods/playerplus/init.lua +++ b/mods/playerplus/init.lua @@ -166,7 +166,7 @@ if name and playerplus[name] then -- set player physics if not monoids and not pova_mod then - --player:set_physics_override(def.speed, def.jump, def.gravity) + player:set_physics_override({ speed = def.speed, jump = def.jump, diff --git a/mods/skinsdb/meta/character_2024.txt b/mods/skinsdb/meta/character_2024.txt new file mode 100644 index 00000000..6862044e --- /dev/null +++ b/mods/skinsdb/meta/character_2024.txt @@ -0,0 +1,3 @@ +The Gabinours +Gab888 +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2025.txt b/mods/skinsdb/meta/character_2025.txt new file mode 100644 index 00000000..a5d36829 --- /dev/null +++ b/mods/skinsdb/meta/character_2025.txt @@ -0,0 +1,3 @@ +UnlikelySleep's Skin +UnlikelySleep +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2026.txt b/mods/skinsdb/meta/character_2026.txt new file mode 100644 index 00000000..a5d36829 --- /dev/null +++ b/mods/skinsdb/meta/character_2026.txt @@ -0,0 +1,3 @@ +UnlikelySleep's Skin +UnlikelySleep +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2027.txt b/mods/skinsdb/meta/character_2027.txt new file mode 100644 index 00000000..3beba888 --- /dev/null +++ b/mods/skinsdb/meta/character_2027.txt @@ -0,0 +1,3 @@ +Survivour +SomebodyIUsedToKnow +CC 0 (1.0) diff --git a/mods/skinsdb/meta/character_2028.txt b/mods/skinsdb/meta/character_2028.txt new file mode 100644 index 00000000..8d5c2ea8 --- /dev/null +++ b/mods/skinsdb/meta/character_2028.txt @@ -0,0 +1,3 @@ +Skin Making Helper +Unknown +CC 0 (1.0) diff --git a/mods/skinsdb/meta/character_2029.txt b/mods/skinsdb/meta/character_2029.txt new file mode 100644 index 00000000..90ed3110 --- /dev/null +++ b/mods/skinsdb/meta/character_2029.txt @@ -0,0 +1,3 @@ +template +AntumDeluge +CC 0 (1.0) diff --git a/mods/skinsdb/meta/character_2030.txt b/mods/skinsdb/meta/character_2030.txt new file mode 100644 index 00000000..d00425bb --- /dev/null +++ b/mods/skinsdb/meta/character_2030.txt @@ -0,0 +1,3 @@ +character_RamonNudles2 +Sam_0 +CC BY-SA 4.0 diff --git a/mods/skinsdb/textures/character_2024.png b/mods/skinsdb/textures/character_2024.png new file mode 100644 index 0000000000000000000000000000000000000000..e31abd3956d9609c1cd350ea7e8c53caf0462098 GIT binary patch literal 1138 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3-p)I`?e@QY`6?zK#qG8~eHcB(j1elRbib z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP@*EhC&X238IZ*wI-5ak z6$77Szp(HIzLYj<$PKtAHH#5>H=O_NOd7f;>Xy zkI%gV$>$gOg)p99R1Q+CTH+c}l9E`GYL#4+3Zxi}42%qQ4NPBKQGF!_19IEHu}pBmCxHrqhpi0-AP16NmVd7$ifX^H2*|NOhvpQ+ZFdWhYa zA$j(UUdYtmUF(?jSYq=Z_;R^08SHyo?U=8~5g5#n_`>?2nY7M~rd_K17s~g(yg#AQh()31dimWf z?hp&TeGMyFYA*GEagi-6XIt+7t@-S%YKM=Gk?(|Da&6upsIYzgRFrGS&mYcjXE)V# zUps$g>UYkZ|FzeHYXoZ2AIB_h$h#B#u>Q@;mV^gCOYE8Nt$6R@z&>FC>t}^+FE$)< z>S?)GuF~|Ov$$h(qbS#^SGUVIJoKGv{PO1W${SB(kM%4u3Z2hBC5YivQ-f@+;tG!W zFB4m(Sy=P~(wJ2I|AsS#IWXP2%~GIx;7nVdc7}blz~`sxZ_mrH9G)|mLGmrT`jCC)oE`1j zjqloDF^G4(5uY;QqO$MSfFn*DUj&FOaDTDwV(AH1iDQMc5>}MtKThDDbzLXb@nN3H zk%@5;mn}lJZPh<37kGN2xX81^uN^r}E}M9+Ut5>t4BNqI+psuSVDARZR^3R7gl@&Iz za{T`4*>h6Wvsdk@esuMd*B#d@?g4Z8mp`}HUw{1Z>(lp_pMLn~o8ITghxdJW!u;a2 z(#IshRS6CCnhWfw96YgK9hm;2QX@Rme0>?TfNTy1Rz@KPP~K+*LIy@D22h3vvKYJ= qrQz%#Mh&PMCSb}GMyLm>0|5^p2I&FQ@K literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2025.png b/mods/skinsdb/textures/character_2025.png new file mode 100644 index 0000000000000000000000000000000000000000..b2f78226fda91afc494017c125ba0b511152e0fd GIT binary patch literal 8325 zcmd@aO-PhMbUtatgk96bv;_CEWJ!=1ZBPe|jocI~E2N+h3KD`cy5vPjg6h&iDD2?H zgbqqyH% zZ{g-bLWnoq7;2@ko__oV`SkBVfA@6?)^|3Zyh4a?3_ix48s8SGK*FJh;~gHu@1L15 zsFHG=-s_KB3V=B*#^*e?n95Bt(uqVOh_X~y4U(r7i7b_PqDBVDWjb0D5EZxMq{@fKH-K-gu>#m@4YF&FpPg{NOoWrJ<`{J=Zm>Amv3^Fm$1IMZvX~K>E z3KM?+u|!II1?1bzCr+O4Zy1Ul?PmQzd;iVm>)USyZxiN4;+wKFOy@fM_g zHpX3CV~P&QXuR6aSpVVc)ae8ggjL3a*Bq*WS9TdGzL! PC6I>?w1gh-Z}0gF>Zwfa literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2026.png b/mods/skinsdb/textures/character_2026.png new file mode 100644 index 0000000000000000000000000000000000000000..5f75049f9b2f5dd68bc79acbeb2b96d95972dbac GIT binary patch literal 8325 zcmds7U1(HC6rO97wg$2x7=lqD`_Rx7Q!q%4prpp6G-)s`P5WSJMX;a`QWYOmgn&U( z`XVYQh~^~?lv3J4$qI!&g_NYFA%%ikw!sKOBu&jvLlF{K=gi$R_srb6=WZaI&33}w zIlnXKJ9F;LT=9$dy524?+g2uoDDP-*dtdek-*Z`Zn@_hNJ}X3G1Rn3k z&ct?UAUfJwJ~&b8C6f;ydeVq(pX^I!ID@g7QmxKNOEn-FHJwfqPMdBRV$+&L0?1|a z0P2Q@tHLyXa!UYP13vO>4vfKzfhox;NM=bDSb?{icQg z_!W+u**^X#8ag)8pjWgcP!=~wKJ~G$08AdWN>DxO^20=kAS=pB6=3M$frdTfo_Ccq z0kgBSYT_Zk6P1;f`YM!>OYUV+58YcZ1FWtvdBR~LuqUd5lA%)oK=t+Ysi&%{O3cm8 z>8b{LetzEI!3OO^38Bz*3aPO0bjkfC`8Bm91a5c$NN-fx_-GP9Wb+84zP?_P(~2Ea zA4%4Sl1?3Z6u$TB>gx2`;I$TI$kQ;DW-{ zmtgY~(K?SBD$4RR-|C8hSl<2ndyz_|R9KyzonmlsFyupHh6=g<(H>zRk6?4^t6#;+ z(K}8Zjvhqv`n#X(Y3n%Hb;j zr_fO^vu8M%bF0Sbz!!jrz=J~14~*ZUKt{>Y&+c=p0OE!38W9zgw3E7q3GnOAlU>GI z0ldt3*wqlI7Olw0HiUhWXkb!i`pNRO+eJdR1Sb}lg6IvIhrPe zv!nM3YKP#X^wc(r_VD|j8Ziuj0oc#ePUvQn3!ZDkuZ|dzjP@ukR>qw zT5Z7Z@X2x6Wp-pl&Cms*>`AHo_A0RtJT+A+KGifO0BBTGN$5GWuumH7g#Qa*B`M19 X&odXlZaJSg3Hpw=y4t=wc(nI93nr4) literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2027.png b/mods/skinsdb/textures/character_2027.png new file mode 100644 index 0000000000000000000000000000000000000000..ee089f1422649a4a0b36bfb00225f98960f2331a GIT binary patch literal 8238 zcmV+}Akp86P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3*tlHE9xg#Y6da|B`sj)T=~ZZOB6&x4dyQg@YE zkB!ol`I3(h48-E@5lDCb=fAJ}FaG5mnoGI1(o1>xmwM`9@S;8MzxStql6|*->3fUc zf4lC&k2eCBB0uB%YdPQjgX{U%2kN(ypTA#sb$#o!Zz2D4Vfz>LWWE0GYu`dKyx0Br zyX)WQM*7QkzW-r;%YKXh`FpB3V`tWj!G#ljeE8nTg;xQJTha`#XSUZ@*cFu1n4!q&J9iNRe?OmQ^RIompJDy=Pl1g@ zFq@kj8ywGkmzdfA%B^T|j@*}@ zn8G9i9u(Q$U1AesAvi7Q*?gvYyEo+UUItnSM2;m^Let|QSSe-lr=~^@4eBPjoO8)F zx7_n6v80kqDYXcrMvXPqTuZIB)m}%7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TN>2mi=^NPml@?V?-cO`cxx-OeB0zrU4#rw+p5vk+Wm$$WZQqG};hdu^ zixBD(!Z^=!X0sWi(TF_HJA;ielx4|mHe09RId~=l;PFZb?{*tU{RR&nXF&BD_6&q> zF#d$+hICH@=&KDIf}@Jr#u?;Sd1d?6fYV9DH)AMIOhVf;wj6D*=$Bp z6wK#yj4@0mYd$h>ICBRlt(T&;S2zzJ(^qB z6AfOb7v|=KonaIt=A)`o6h+uhQbl|3iM5EeVAd?Yv$NCXw8meXOmFwKITo1eHGPOK5XMFj11WJa9Cdfhso7$c$h- zMc#M>~prdMiCS8G}K1*S`j`Fy?(>nuYU$3+Ei zN-+|L5sOoRV-^+w{O@!>*G&vSPAX7h63%pu6wo8VXVc+e&H;|a99>@ zgX3La`Nitg=K$wix96uoj-{LzJ*_?`w>x1kVLV0;_i-pz48_qA&U=n#2i^1Y`JCO| z-OU0V(_%WEZtzeWbS@I_?l|Ab^L-cEaU-GffSf@J3r)Xk+vxmGXkz48U!ZpVJCJjp z@z{`$uXG@lu`)m1YN4$F;>ug%9RV~a|tLYa~HL!BXu gsZ~Ztp4PtqAHHAQ1pmSS3;+NC07*qoM6N<$f@_c0uK)l5 literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2028.png b/mods/skinsdb/textures/character_2028.png new file mode 100644 index 0000000000000000000000000000000000000000..9343d60df595757d45be8dd04179c75d373a5961 GIT binary patch literal 7125 zcmV;`8!F_9P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3&clH@p&ME`M$IRf_OI9NsI27UZ_3eqDYv$A@+ zL^?gg7dlA*W@@TxaI^pQzsLL!|6+h38P}Pd7W+IwjL|OBRj;`UvLCC|sEb}P*CEl0&XgsRzc9QZ% z-Ug59n)77k7#H1g-5s~@>vWSTM!$XG)%!`JbgYKro1bKfEb8HoFQJ7+)_jdf4S=m!~aDfz`DeGCCUD!zJ+%{9f{bA9sJ>oD9zB2vhqkee1d$%-+7 zpAst=>M5j{Qp%~MYEn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mzf)Zh-r864>5tUlKcpzChn?a!<#|m#I_?lmaUrpgjRY^Yt!kcboYUJQC z^ugK4OUg)kdA2iu#jw~(Sy~?x`0=e#`T)+XZrjTTrPlA@H^T!GLLGX=? zZ6UoEcAiUK5KPGo8YB9rWMWX+`LyaS&wWkOo=o1H3ws_SMYMc&%~W_t+{?X*$TlOV zspQlK=@+jZBjX5m+9Hb!GP6kkb>AB3Kv&IXbc^fiIa!y>lt7 z*%H4nJ#*+qsNoxtxDEbB(tb`23x|sWH$IFT^SJ%_NUUiPdCO5DB^CRj$9JaRJ=wvy z?N`6@3EgOGFT^XcuAnRD@Y1ZNX*O{A={;+1ub*N?_(ugH8Vu^;Fq$g zaEOc?1Uo6He+izKsTF#iz57<){!p5F8&>e_fT=UrOQ&0}_K8o7#L=F}t~@eJ%y1Gf zwYNvEFHK0*wRMgi6YaqhGI_Z47VtDE+$+3Agn6#^E=N--TWT8%T?qIcdYw zJ(em0iQ}U#JadipvR}BJSG^z+leKOy`KI2QB|kAbwy*Jtg3Xq%>)2z8R<6kOIr@l literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2030.png b/mods/skinsdb/textures/character_2030.png new file mode 100644 index 0000000000000000000000000000000000000000..351078c2cd8e8d10cf6e19f7e54d1c00752e8dff GIT binary patch literal 1932 zcmV;72Xpv|P)0}G#u z2I!?I(B{7=5}@cYK+!{iUYv6eb?*gw&!Gl-=_PFe!*IR8u6;-h$2PJn7PeGN?T za(d9tn9}Ok%5fX?3kal0&Tzi(z4^|2L!p#XX_`_f6aeUSIsho8C>D$S@T$Ws{M9-_ z9bQD#jwc=u4-R;zRwHV+@v2pX5MpMB|0VqF3aVg%rO6Kl1EMIRTrQJk87nI*q-i?0 zqgmud?U;9JH2}P7l_!rMzh+vC;aAsC@c?e#N7&i`wr#VrvI0P*QUSoStht@dBCifF z0*aH96S6dAb88Ewl=@#sK|#PDzeE67g+hTONdU;QjKN@F9+Xnf?QC8IMC~?}N(HZ4 z1t4m-QA(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