From 4f66b7fd4bc2cb364d8d8b4d1b90209203180b5c Mon Sep 17 00:00:00 2001 From: root Date: Sun, 16 Jan 2022 20:12:39 +0100 Subject: [PATCH] update --- mods/bonemeal/README.md | 1 + mods/bonemeal/depends.txt | 2 + mods/bonemeal/init.lua | 2 +- mods/bonemeal/lucky_block.lua | 5 +- mods/bonemeal/mod.conf | 2 +- mods/bonemeal/mods.lua | 28 ++++++- mods/doors/init.lua | 4 +- mods/mobs_redo/api.lua | 14 ++-- mods/mobs_redo/api.txt | 6 ++ mods/plantlife_modpack/dryplants/reedmace.lua | 3 +- .../plantlife_modpack/ferns/gianttreefern.lua | 10 ++- mods/plantlife_modpack/ferns/treefern.lua | 2 +- mods/skinsdb/meta/character_2151.txt | 3 + mods/skinsdb/meta/character_2152.txt | 3 + mods/skinsdb/meta/character_2153.txt | 3 + mods/skinsdb/textures/character_2151.png | Bin 0 -> 13506 bytes mods/skinsdb/textures/character_2152.png | Bin 0 -> 1403 bytes mods/skinsdb/textures/character_2153.png | Bin 0 -> 12905 bytes mods/tubelib2/README.md | 3 +- mods/tubelib2/internal1.lua | 20 ++--- mods/tubelib2/internal2.lua | 40 +++++----- mods/tubelib2/storage.lua | 10 +-- mods/tubelib2/tube_api.lua | 70 ++++++++++-------- mods/tubelib2/tube_test.lua | 52 ++++++------- 24 files changed, 171 insertions(+), 112 deletions(-) create mode 100644 mods/skinsdb/meta/character_2151.txt create mode 100644 mods/skinsdb/meta/character_2152.txt create mode 100644 mods/skinsdb/meta/character_2153.txt create mode 100644 mods/skinsdb/textures/character_2151.png create mode 100644 mods/skinsdb/textures/character_2152.png create mode 100644 mods/skinsdb/textures/character_2153.png diff --git a/mods/bonemeal/README.md b/mods/bonemeal/README.md index 79b66e4f..e5d85cf4 100644 --- a/mods/bonemeal/README.md +++ b/mods/bonemeal/README.md @@ -33,5 +33,6 @@ Changelog: - 1.1 - Added {can_bonemeal=1} group for special nodes - 1.2 - Added support for minetest 5.0 cactus seedling, blueberry bush sapling and emergent jungle tree saplings, additional flowers and pine bush sapling. - 1.3 - Ability to craft dye from mulch, bonemeal and fertiliser (thanks orbea) +- 1.4 - Add support for fern saplings from plantlife mod (thanks nixnoxus) Lucky Blocks: 6 diff --git a/mods/bonemeal/depends.txt b/mods/bonemeal/depends.txt index 5ca8b846..2ef3ad66 100644 --- a/mods/bonemeal/depends.txt +++ b/mods/bonemeal/depends.txt @@ -7,3 +7,5 @@ technic_worldgen? lucky_block? flowers? dye? +ferns? +dryplants? diff --git a/mods/bonemeal/init.lua b/mods/bonemeal/init.lua index ef32e610..6066d754 100644 --- a/mods/bonemeal/init.lua +++ b/mods/bonemeal/init.lua @@ -689,4 +689,4 @@ minetest.override_item("default:dirt", { dofile(path .. "/mods.lua") dofile(path .. "/lucky_block.lua") -print (S("[MOD] bonemeal loaded")) +print ("[MOD] bonemeal loaded") diff --git a/mods/bonemeal/lucky_block.lua b/mods/bonemeal/lucky_block.lua index d335d35f..52f272f6 100644 --- a/mods/bonemeal/lucky_block.lua +++ b/mods/bonemeal/lucky_block.lua @@ -22,8 +22,7 @@ if minetest.get_modpath("lucky_block") then {"nod", "default:chest", 0, { {name = "bonemeal:mulch", max = 20}, {name = "bonemeal:bonemeal", max = 15}, - {name = "bonemeal:fertiliser", max = 10}, - }}, + {name = "bonemeal:fertiliser", max = 10} + }} }) - end diff --git a/mods/bonemeal/mod.conf b/mods/bonemeal/mod.conf index 6ebcc43c..650af824 100644 --- a/mods/bonemeal/mod.conf +++ b/mods/bonemeal/mod.conf @@ -1,4 +1,4 @@ name = bonemeal depends = default -optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye +optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants description = Adds bone and bonemeal giving the ability to quickly grow plants and saplings. diff --git a/mods/bonemeal/mods.lua b/mods/bonemeal/mods.lua index f97a1c3a..be9c0ad3 100644 --- a/mods/bonemeal/mods.lua +++ b/mods/bonemeal/mods.lua @@ -3,9 +3,8 @@ if minetest.get_modpath("animalmaterials") then minetest.register_craft({ - type = "shapeless", output = "bonemeal:bonemeal 2", - recipe = {"animalmaterials:bone"} + recipe = {{"animalmaterials:bone"}} }) end @@ -115,13 +114,11 @@ if minetest.get_modpath("moretrees") then {"moretrees:apple_tree_sapling", moretrees.spawn_apple_tree_object, "soil"}, {"moretrees:oak_sapling", moretrees.spawn_oak_object, "soil"}, {"moretrees:sequoia_sapling", moretrees.spawn_sequoia_object, "soil"}, - --{"moretrees:birch_sapling", moretrees.spawn_birch_object, "soil"}, {"moretrees:birch_sapling", moretrees.grow_birch, "soil"}, {"moretrees:palm_sapling", moretrees.spawn_palm_object, "soil"}, {"moretrees:palm_sapling", moretrees.spawn_palm_object, "sand"}, {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "soil"}, {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "sand"}, - --{"moretrees:spruce_sapling", moretrees.spawn_spruce_object, "soil"}, {"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"}, {"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"}, {"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"}, @@ -155,6 +152,29 @@ if minetest.get_modpath("caverealms") then end +local function y_func(grow_func) + return function(pos) + grow_func({x = pos.x, y = pos.y - 1, z = pos.z}) + end +end + +if minetest.get_modpath("ferns") then + + bonemeal:add_sapling({ + {"ferns:sapling_giant_tree_fern", y_func(abstract_ferns.grow_giant_tree_fern), "soil"}, + {"ferns:sapling_giant_tree_fern", y_func(abstract_ferns.grow_giant_tree_fern), "sand"}, + {"ferns:sapling_tree_fern", y_func(abstract_ferns.grow_tree_fern), "soil"} + }) +end + +if minetest.get_modpath("dryplants") then + + bonemeal:add_sapling({ + {"dryplants:reedmace_sapling", y_func(abstract_dryplants.grow_reedmace), "soil"} + }) +end + + if minetest.get_modpath("dye") then local bonemeal_dyes = { diff --git a/mods/doors/init.lua b/mods/doors/init.lua index aeba3bc3..d4870c62 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -508,7 +508,7 @@ function doors.register(name, def) def.paramtype = "light" def.paramtype2 = "facedir" def.sunlight_propagates = true - def.use_texture_alpha = "clip" + def.use_texture_alpha = def.use_texture_alpha or "clip" def.walkable = true def.is_ground_content = false def.buildable_to = false @@ -719,7 +719,7 @@ function doors.register_trapdoor(name, def) def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" - def.use_texture_alpha = "clip" + def.use_texture_alpha = def.use_texture_alpha or "clip" def.is_ground_content = false if def.protected then diff --git a/mods/mobs_redo/api.lua b/mods/mobs_redo/api.lua index 6ca5feda..66c7f420 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 = "20211212", + version = "20220116", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -1002,19 +1002,19 @@ end -- Returns true is node can deal damage to self -local is_node_dangerous = function(self, nodename) +function mobs:is_node_dangerous(mob_object, nodename) - if self.water_damage > 0 + if mob_object.water_damage > 0 and minetest.get_item_group(nodename, "water") ~= 0 then return true end - if self.lava_damage > 0 + if mob_object.lava_damage > 0 and minetest.get_item_group(nodename, "lava") ~= 0 then return true end - if self.fire_damage > 0 + if mob_object.fire_damage > 0 and minetest.get_item_group(nodename, "fire") ~= 0 then return true end @@ -1026,6 +1026,10 @@ local is_node_dangerous = function(self, nodename) return false end +local function is_node_dangerous(mob_object, nodename) + return mobs:is_node_dangerous(mob_object, nodename) +end + -- is mob facing a cliff function mob_class:is_at_cliff() diff --git a/mods/mobs_redo/api.txt b/mods/mobs_redo/api.txt index 772f76a6..7cba54b1 100644 --- a/mods/mobs_redo/api.txt +++ b/mods/mobs_redo/api.txt @@ -691,6 +691,12 @@ space to spawn mob [name], if so then a new position is returned for use, otherwise nil is returned. +mobs:is_node_dangerous(self, nodename) + +This function returns true if the node name given is harmful to the mob (self), it is +mainly used when a mob is near a node it has to avoid. + + External Settings for "minetest.conf" ------------------------------------ diff --git a/mods/plantlife_modpack/dryplants/reedmace.lua b/mods/plantlife_modpack/dryplants/reedmace.lua index 0ab5a905..3c97f560 100644 --- a/mods/plantlife_modpack/dryplants/reedmace.lua +++ b/mods/plantlife_modpack/dryplants/reedmace.lua @@ -264,7 +264,8 @@ minetest.register_node("dryplants:reedmace_sapling", { groups = { snappy=3, flammable=2, - attached_node=1 + attached_node=1, + sapling=1, }, sounds = default.node_sound_leaves_defaults(), selection_box = { diff --git a/mods/plantlife_modpack/ferns/gianttreefern.lua b/mods/plantlife_modpack/ferns/gianttreefern.lua index ec155df2..b0a4baa8 100644 --- a/mods/plantlife_modpack/ferns/gianttreefern.lua +++ b/mods/plantlife_modpack/ferns/gianttreefern.lua @@ -162,6 +162,14 @@ minetest.register_node("ferns:tree_fern_leave_big", { }, drop = "", sounds = default.node_sound_leaves_defaults(), + after_destruct = function(pos,oldnode) + for _, d in pairs({{x=-1,z=0},{x=1,z=0},{x=0,z=-1},{x=0,z=1}}) do + local node = minetest.get_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z}) + if node.name == "ferns:tree_fern_leave_big" then + minetest.dig_node({x=pos.x+d.x,y=pos.y+1,z=pos.z+d.z}) + end + end + end, }) ----------------------------------------------------------------------------------------------- @@ -271,7 +279,7 @@ minetest.register_node("ferns:sapling_giant_tree_fern", { tiles = {"ferns_sapling_tree_fern_giant.png"}, inventory_image = "ferns_sapling_tree_fern_giant.png", walkable = false, - groups = {snappy=3,flammable=2,flora=1,attached_node=1}, + groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1}, sounds = default.node_sound_leaves_defaults(), selection_box = { type = "fixed", diff --git a/mods/plantlife_modpack/ferns/treefern.lua b/mods/plantlife_modpack/ferns/treefern.lua index 361417c1..96947a99 100644 --- a/mods/plantlife_modpack/ferns/treefern.lua +++ b/mods/plantlife_modpack/ferns/treefern.lua @@ -158,7 +158,7 @@ minetest.register_node("ferns:sapling_tree_fern", { tiles = {"ferns_sapling_tree_fern.png"}, inventory_image = "ferns_sapling_tree_fern.png", walkable = false, - groups = {snappy=3,flammable=2,flora=1,attached_node=1}, + groups = {snappy=3,flammable=2,flora=1,attached_node=1,sapling=1}, sounds = default.node_sound_leaves_defaults(), selection_box = { type = "fixed", diff --git a/mods/skinsdb/meta/character_2151.txt b/mods/skinsdb/meta/character_2151.txt new file mode 100644 index 00000000..363368b5 --- /dev/null +++ b/mods/skinsdb/meta/character_2151.txt @@ -0,0 +1,3 @@ +SatchelmanSam +Philipbenr +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2152.txt b/mods/skinsdb/meta/character_2152.txt new file mode 100644 index 00000000..92ef9576 --- /dev/null +++ b/mods/skinsdb/meta/character_2152.txt @@ -0,0 +1,3 @@ +olli +olli +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_2153.txt b/mods/skinsdb/meta/character_2153.txt new file mode 100644 index 00000000..46b53120 --- /dev/null +++ b/mods/skinsdb/meta/character_2153.txt @@ -0,0 +1,3 @@ +bab-cora +cora +CC 0 (1.0) diff --git a/mods/skinsdb/textures/character_2151.png b/mods/skinsdb/textures/character_2151.png new file mode 100644 index 0000000000000000000000000000000000000000..65ef7e39cd35229625b471f11c4973fe6d307163 GIT binary patch literal 13506 zcmeHrWmucd)^4!kTA)RXy96h}-JRkN0fGex?pi10jh;)Mc5N`d0;T3k-r z_uYHH`+WO+-`Ur7&cB^p$&;D6*S*%8o5s~0W(#$K(0KT|LTDg9P+I`NXQny>>P|0`7;(Qs92n7! zM~PlJ{lg+|As2Z$noSH)=n?RQ%@d-@8bl{E&#%Kbn<A_n{TDM``f&#}# zf~P_^*3sIdZ|AtKw@bOZoe0co%L1M1?dJVTD4KysjX$pVDEFpsHZ4m)aTt^0U(Dk2+ymSX&wJ{WngmFM{U zTgI0Y0RWfPel*XwhoQ`dPn_RqcySrOc!GTd#nH{euX%_}QJ8746?Xo7k+`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AWu#X=-kXUis{$-b9KGW1;i+Q}+sWbLls<;u>nD zIRGrB^FK$WM#5+1Y$lli6UHKMh8(36#$uwe0ro0O5dI%xTWZ?LF8!Joei#38nZWZM z?h0WxZu_>${u_6Ef literal 0 HcmV?d00001 diff --git a/mods/skinsdb/textures/character_2153.png b/mods/skinsdb/textures/character_2153.png new file mode 100644 index 0000000000000000000000000000000000000000..057464da8a329c7312bbe6882712f23883260ffb GIT binary patch literal 12905 zcmeHtby(Eh);36r(jYA`bhk7}cQ*nu%nUFzGedVuNF$&$NT-z2AtefkbazQgOZkpI z&v}mLd(U^??_AgS{&(iOhMB$hz3#R4z1Low--bwSO(k3$N*ojv6kHW$d0ph^W8|9- z8x#36FVjC11%?Q!3EZhH*NBTL5SU=7#N zT#pvLboQ<$543DnZ@hl=3_rQPnRQ!jclPAQ@PBr0GnjqVJ~=;p=fG&w;1ZH6Chh!u zanUxr!tVx@JFF=4;6v1@NwMDpoZHrAse30Loas-v+8+XU&wc!~bQj-_#C>ahB_;gh zn+K<-Gt=4Kg@dKw^&7a!8Q1Joy5U{3bMvf*(X^-N{z+`l+`aZ6!@f7G zvYXgPLmytAe#dEUp^l}9%J7Ggp}KBH=ObvYZ!V9sS12Pao17}Ct7pHZkbm&2W}*(G z+UkgjT;!QFGs(tqA@pH+?iz$WwJQsoo?h{D#gjH%88s=sB)FkN=VofJ{?bRl-&tbe zbNq5;zg6nH2gMM8fNf11TjO4)u|fpyb+U1%wibO)vaTl6_?Yf6eP0G_h$;Ho`z}+8 zK8&p(#n2m9XhI*(RsU+n&bbYvpRaySwXC9kVY;pswmF(f5uc`M(45Xm}DnTX`R*l0^d}ZyrkD@gnYC#ggj9wfoD-KE4US%NyK_SJ<>8{jC-Nd zX`)HU5bP?R9eWiy|1{x>%Za%+fWzsQN;LoT4GX}Aq$wa`uDy59Ij=$Au@HAdQ5niw zH1qh<^?l|1B)6$=yVld@G2U}ZtiE@x$}h*yUfJ01W#xa{v9zY;P6ioGhcR$A;}>le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=%B*|2ARkhrgAs0`4OoA zVT-<3s?!8@M;SW$qV_Rfu)Jed=r!{RRGI0G7%f? zusqiOFQGOt?t`NqmTfdi10q5@C43_b@4A>KayGdBi!63G!cXtda|3D5SUF-2P3eZL zh?LB*(bz8ffSvYzcGr5%Sh)l6r=HbF$#GG2WI_PSVQ9T{`osKWqmy^+aaHMJ8T2{2 z7yvmL5-%$&87mu3ymS)f3B7dUnZF5ufwvw}DjOQRwP#FbLIjrCp(=L}dHYkO-^o2)SAS$xczws;(bVfmIFA1$)JrNIys z&^~+vAOY+WF6RlZ$NFb`n;fO-i&6%1mH{gYIMrl})`&w;7pqe|Do)?2zX(AExK(K-8I15kkBYeq2PL4k4bnk|4Ei@lnpX8IWtwG{&OnJ#zxiRA8i{ ztcCYi5N?Z+lyUY32n+wX7ye}Ts>}m!V&`>ZaIoo|Wwz1ufv<3-ZsnvfXO?#5_%WB; z^SE*H`*2m-{wv8|MFFdvET;SEsREp8);2cN_4Z`vyNg=2(_k1Z(YsZ1janf=zzlkP zIFiqpuza04D+*id{~E4O{y7_MUt)V)Y$-otNm8L0PnN2Pz(pt2RC9gBJvI4LkUDOqpR7i0NLowSUJkO(e= 1 then local npos, d1, d2, num = self:add_tube_dir(pos, dir1) if npos and self.valid_dirs[d1] and self.valid_dirs[d2] and num < 2 then self.clbk_after_place_tube(self:get_tube_data(npos, d1, d2, num+1)) end end - + if num_tubes >= 2 then local npos, d1, d2, num = self:add_tube_dir(pos, dir2) if npos and self.valid_dirs[d1] and self.valid_dirs[d2] and num < 2 then @@ -198,25 +198,25 @@ function Tube:update_after_place_tube(pos, placer, pointed_thing) end end return true, dir1, dir2, num_tubes -end - +end + function Tube:update_after_dig_tube(pos, param2) local dir1, dir2 = self:decode_param2(pos, param2) - + local npos, d1, d2, num = self:del_tube_dir(pos, dir1) if npos and self.valid_dirs[d1] and self.valid_dirs[d2] and tValidNum[num] then self.clbk_after_place_tube(self:get_tube_data(npos, d1, d2, num)) else dir1 = nil end - + npos, d1, d2, num = self:del_tube_dir(pos, dir2) if npos and self.valid_dirs[d1] and self.valid_dirs[d2] and tValidNum[num] then self.clbk_after_place_tube(self:get_tube_data(npos, d1, d2, num)) else dir2 = nil end - + return dir1, dir2 end @@ -229,7 +229,7 @@ function Tube:replace_nodes(pos1, pos2, dir1, dir2) pos = get_pos(pos, dir1) end self.clbk_after_place_tube(self:get_tube_data(pos2, dir1, dir2, 1)) -end +end function Tube:switch_nodes(pos, dir, state) pos = get_pos(pos, dir) diff --git a/mods/tubelib2/internal2.lua b/mods/tubelib2/internal2.lua index 3367a216..6c9d0dd6 100644 --- a/mods/tubelib2/internal2.lua +++ b/mods/tubelib2/internal2.lua @@ -93,7 +93,7 @@ function Tube:get_node_lvm(pos) end -- Read param2 from a primary node at the given position. --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns param2, new_pos or nil function Tube:get_primary_node_param2(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -104,7 +104,7 @@ function Tube:get_primary_node_param2(pos, dir) end -- Check if node at given position is a tube node --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns true/false function Tube:is_primary_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -113,7 +113,7 @@ function Tube:is_primary_node(pos, dir) end -- Get secondary node at given position --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns node and new_pos or nil function Tube:get_secondary_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -124,7 +124,7 @@ function Tube:get_secondary_node(pos, dir) end -- Get special registered nodes at given position --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns node and new_pos or nil function Tube:get_special_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -135,7 +135,7 @@ function Tube:get_special_node(pos, dir) end -- Check if node at given position is a secondary node --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns true/false function Tube:is_secondary_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -144,7 +144,7 @@ function Tube:is_secondary_node(pos, dir) end -- Check if node at given position is a special node --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns true/false function Tube:is_special_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -216,7 +216,7 @@ end function Tube:get_tube_data(pos, dir1, dir2, num_tubes, state) local param2, tube_type = self:encode_param2(dir1, dir2, num_tubes) return pos, param2, tube_type, num_tubes, state -end +end -- Return pos for a primary_node and true if num_conn < 2, else false function Tube:friendly_primary_node(pos, dir) @@ -238,12 +238,12 @@ function Tube:vector_to_dir(v) end end --- Check all 6 possible positions for known nodes considering preferred_pos +-- Check all 6 possible positions for known nodes considering preferred_pos -- and the players fdir and return dir1, dir2 and the number of tubes to connect to (0..2). function Tube:determine_tube_dirs(pos, preferred_pos, fdir) local tbl = {} local allowed = table.copy(self.valid_dirs) - + -- If the node at players "prefered position" is a tube, -- then the other side of the new tube shall point to the player. if preferred_pos then @@ -282,7 +282,7 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir) elseif #tbl >= 2 then return tbl[1], tbl[2], 2 end - + -- Check for secondary nodes (chests and so on) for dir = 1,6 do if allowed[dir] then @@ -301,8 +301,8 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir) end end end - - -- player pointed to an unknown node to force the tube orientation? + + -- player pointed to an unknown node to force the tube orientation? if preferred_pos and fdir then if tbl[1] == Turn180Deg[fdir] and allowed[fdir] then tbl[2] = fdir @@ -310,7 +310,7 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir) tbl[2] = Turn180Deg[fdir] end end - + -- dir1, dir2 still unknown? if fdir then if #tbl == 0 and allowed[Turn180Deg[fdir]] then @@ -324,14 +324,14 @@ function Tube:determine_tube_dirs(pos, preferred_pos, fdir) end if #tbl >= 2 and tbl[1] ~= tbl[2] then - local num_tubes = (self:connected(pos, tbl[1]) and 1 or 0) + + local num_tubes = (self:connected(pos, tbl[1]) and 1 or 0) + (self:connected(pos, tbl[2]) and 1 or 0) return tbl[1], tbl[2], math.min(2, num_tubes) end end -- Determine a tube side without connection, increment the number of connections --- and return the new data to be able to update the node: +-- and return the new data to be able to update the node: -- new_pos, dir1, dir2, num_connections (1, 2) function Tube:add_tube_dir(pos, dir) local param2, npos = self:get_primary_node_param2(pos, dir) @@ -359,7 +359,7 @@ function Tube:add_tube_dir(pos, dir) end -- Decrement the number of tube connections --- and return the new data to be able to update the node: +-- and return the new data to be able to update the node: -- new_pos, dir1, dir2, num_connections (0, 1) function Tube:del_tube_dir(pos, dir) local param2, npos = self:get_primary_node_param2(pos, dir) @@ -372,9 +372,9 @@ function Tube:del_tube_dir(pos, dir) end end end - + -- Pairing helper function -function Tube:store_teleport_data(pos, peer_pos) +function Tube:store_teleport_data(pos, peer_pos) local meta = M(pos) meta:set_string("tele_pos", S(peer_pos)) meta:set_string("channel", nil) @@ -409,7 +409,7 @@ function Tube:dbg_out() end end end - + -- Walk to the end of the tube line and return pos and outdir of both head tube nodes. -- If no tube is available, return nil function Tube:walk_tube_line(pos, dir) @@ -429,4 +429,4 @@ function Tube:walk_tube_line(pos, dir) end end return table.copy(pos), dir, 0 -end +end diff --git a/mods/tubelib2/storage.lua b/mods/tubelib2/storage.lua index 883840c7..b41657c2 100644 --- a/mods/tubelib2/storage.lua +++ b/mods/tubelib2/storage.lua @@ -29,7 +29,7 @@ local function update_mod_storage() storage:set_string(k, minetest.serialize(v)) MemStore[k] = nil -- remove from memory end - end + end -- run every 10 minutes minetest.after(600, update_mod_storage) end @@ -37,7 +37,7 @@ end minetest.register_on_shutdown(function() for k,v in pairs(MemStore) do storage:set_string(k, minetest.serialize(v)) - end + end end) minetest.after(600, update_mod_storage) @@ -52,14 +52,14 @@ local function empty_block(block) end return empty end - + minetest.after(1, function() local tbl = storage:to_table() for k,v in pairs(tbl.fields) do if empty_block(v) then storage:set_string(k, "") end - end + end end) -- @@ -81,7 +81,7 @@ local function new_node(block, node_key) end local function unlock(pos) - local block_key = math.floor((pos.z+32768)/16)*4096*4096 + + local block_key = math.floor((pos.z+32768)/16)*4096*4096 + math.floor((pos.y+32768)/16)*4096 + math.floor((pos.x+32768)/16) local node_key = (pos.z%16)*16*16 + (pos.y%16)*16 + (pos.x%16) local block = MemStore[block_key] or new_block(block_key) diff --git a/mods/tubelib2/tube_api.lua b/mods/tubelib2/tube_api.lua index b7789b42..48293cd4 100644 --- a/mods/tubelib2/tube_api.lua +++ b/mods/tubelib2/tube_api.lua @@ -13,7 +13,7 @@ ]]-- -- Version for compatibility checks, see readme.md/history -tubelib2.version = 2.1 +tubelib2.version = 2.2 -- for lazy programmers local S = function(pos) if pos then return minetest.pos_to_string(pos) end end @@ -31,23 +31,31 @@ function tubelib2.dir_to_string(dir) end -- Relative directions, dependant on orientation (param2) -local DirToSide = {"B", "R", "F", "L", "D", "U"} +local DirToSide = { + -- param2 (0 to 23) + {[0]="B","L","F","R", "U","U","U","U", "D","D","D","D", "B","L","F","R", "B","L","F","R", "B","L","F","R",}, -- dir = 1 + {[0]="R","B","L","F", "R","B","L","F", "R","B","L","F", "U","U","U","U", "D","D","D","D", "L","F","R","B",}, -- dir = 2 + {[0]="F","R","B","L", "D","D","D","D", "U","U","U","U", "F","R","B","L", "F","R","B","L", "F","R","B","L",}, -- dir = 3 + {[0]="L","F","R","B", "L","F","R","B", "L","F","R","B", "D","D","D","D", "U","U","U","U", "R","B","L","F",}, -- dir = 4 + {[0]="D","D","D","D", "B","L","F","R", "F","R","B","L", "R","B","L","F", "L","F","R","B", "U","U","U","U",}, -- dir = 5 + {[0]="U","U","U","U", "F","R","B","L", "B","L","F","R", "L","F","R","B", "R","B","L","F", "D","D","D","D",}, -- dir = 6 +} -function tubelib2.dir_to_side(dir, param2) - if dir < 5 then - dir = (((dir - 1) - (param2 % 4)) % 4) + 1 +local SideToDir = {B={}, R={}, F={}, L={}, D={}, U={}} + +for param2 = 0,23 do + for dir = 1,6 do + local side = DirToSide[dir][param2] + SideToDir[side][param2] = dir end - return DirToSide[dir] end -local SideToDir = {B=1, R=2, F=3, L=4, D=5, U=6} +function tubelib2.dir_to_side(dir, param2) + return DirToSide[dir][param2] +end function tubelib2.side_to_dir(side, param2) - local dir = SideToDir[side] - if dir < 5 then - dir = (((dir - 1) + (param2 % 4)) % 4) + 1 - end - return dir + return SideToDir[side][param2] end @@ -92,7 +100,7 @@ local function update1(self, pos, dir) local fpos,fdir = self:walk_tube_line(pos, dir) self:infotext(get_pos(pos, dir), fpos) self:infotext(fpos, get_pos(pos, dir)) - -- Translate pos/dir pointing to the secondary node into + -- Translate pos/dir pointing to the secondary node into -- spos/sdir of the secondary node pointing to the tube. if fpos and fdir then local spos, sdir = get_pos(fpos,fdir), Turn180Deg[fdir] @@ -113,11 +121,11 @@ local function update2(self, pos1, dir1, pos2, dir2) self:update_after_dig_tube(pos1, param2) M(get_pos(pos1, dir1)):set_string("infotext", I("Maximum length reached!")) M(get_pos(pos1, dir2)):set_string("infotext", I("Maximum length reached!")) - return false + return false end self:infotext(fpos1, fpos2) self:infotext(fpos2, fpos1) - -- Translate fpos/fdir pointing to the secondary node into + -- Translate fpos/fdir pointing to the secondary node into -- spos/sdir of the secondary node pointing to the tube. local spos1, sdir1 = get_pos(fpos1,fdir1), Turn180Deg[fdir1] local spos2, sdir2 = get_pos(fpos2,fdir2), Turn180Deg[fdir2] @@ -136,7 +144,7 @@ local function update3(self, pos, dir1, dir2) local fpos2,fdir2,cnt2 = self:walk_tube_line(pos, dir2) self:infotext(fpos1, fpos2) self:infotext(fpos2, fpos1) - -- Translate fpos/fdir pointing to the secondary node into + -- Translate fpos/fdir pointing to the secondary node into -- spos/sdir of the secondary node pointing to the tube. if fpos1 and fpos2 and fdir1 and fdir2 then local spos1, sdir1 = get_pos(fpos1,fdir1), Turn180Deg[fdir1] @@ -161,7 +169,7 @@ local function update_secondary_nodes_after_node_placed(self, pos, dirs) if self.force_to_use_tubes then tmp, npos = self:get_special_node(pos, dir) else - tmp, npos = self:get_secondary_node(pos, dir) + tmp, npos = self:get_secondary_node(pos, dir) end if npos then self:update_secondary_node(npos, Turn180Deg[dir], pos, dir) @@ -178,7 +186,7 @@ local function update_secondary_nodes_after_node_dug(self, pos, dirs) if self.force_to_use_tubes then tmp, npos = self:get_special_node(pos, dir) else - tmp, npos = self:get_secondary_node(pos, dir) + tmp, npos = self:get_secondary_node(pos, dir) end if npos then self:del_from_cache(npos, Turn180Deg[dir]) @@ -196,18 +204,18 @@ end function Tube:new(attr) local o = { dirs_to_check = attr.dirs_to_check or {1,2,3,4,5,6}, - max_tube_length = attr.max_tube_length or 1000, - primary_node_names = Tbl(attr.primary_node_names or {}), + max_tube_length = attr.max_tube_length or 1000, + primary_node_names = Tbl(attr.primary_node_names or {}), secondary_node_names = Tbl(attr.secondary_node_names or {}), valid_node_contact_sides = {}, show_infotext = attr.show_infotext or false, - force_to_use_tubes = attr.force_to_use_tubes or false, + force_to_use_tubes = attr.force_to_use_tubes or false, clbk_after_place_tube = attr.after_place_tube, tube_type = attr.tube_type or "unknown", pairingList = {}, -- teleporting nodes connCache = {}, -- connection cache {pos1 = {dir1 = {pos2 = pos2, dir2 = dir2},...} special_node_names = {}, -- use add_special_node_names() to register nodes - debug_info = attr.debug_info, -- debug_info(pos, text) + debug_info = attr.debug_info, -- debug_info(pos, text) } o.valid_dirs = Tbl(o.dirs_to_check) setmetatable(o, self) @@ -234,7 +242,7 @@ local function invert_booleans(tab) end return inversion end -local valid_sides_default_true = Tbl(DirToSide) +local valid_sides_default_true = Tbl({"B", "R", "F", "L", "D", "U"}) local valid_sides_default_false = invert_booleans(valid_sides_default_true) local function complete_valid_sides(valid_sides, existing_defaults) local valid_sides_complete = {} @@ -368,13 +376,13 @@ end function Tube:after_dig_tube(pos, oldnode) -- [s1][f1]----[n1] x [n2]-----[f2][s2] -- s..secondary, f..far, n..near, x..node to be removed - + -- update tubes if oldnode and oldnode.param2 then local dir1, dir2 = self:update_after_dig_tube(pos, oldnode.param2) if dir1 then update1(self, pos, dir1) end if dir2 then update1(self, pos, dir2) end - + -- Update secondary nodes, if right beside dir1, dir2 = self:decode_param2(pos, oldnode.param2) local npos1,ndir1 = get_pos(pos, dir1),Turn180Deg[dir1] @@ -395,7 +403,7 @@ function Tube:get_connected_node_pos(pos, dir) if self.connCache[key] and self.connCache[key][dir] then local item = self.connCache[key][dir] return item.pos2, Turn180Deg[item.dir2] - end + end local fpos,fdir = self:walk_tube_line(pos, dir) local spos = get_pos(fpos,fdir) self:add_to_cache(pos, dir, spos, Turn180Deg[fdir]) @@ -405,7 +413,7 @@ end -- Check if node at given position is a tubelib2 compatible node, -- able to receive and/or deliver items. --- If dir == nil then node_pos = pos +-- If dir == nil then node_pos = pos -- Function returns the result (true/false), new pos, and the node function Tube:compatible_node(pos, dir) local npos = vector.add(pos, Dir6dToVector[dir or 0]) @@ -497,14 +505,14 @@ end -- Used by chat commands, when tubes are placed e.g. via WorldEdit function Tube:replace_tube_line(pos1, pos2) if pos1 and pos2 and not vector.equals(pos1, pos2) then - local check = (((pos1.x == pos2.x) and 1) or 0) + - (((pos1.y == pos2.y) and 1) or 0) + + local check = (((pos1.x == pos2.x) and 1) or 0) + + (((pos1.y == pos2.y) and 1) or 0) + (((pos1.z == pos2.z) and 1) or 0) if check == 2 then local v = vector.direction(pos1, pos2) local dir1 = self:vector_to_dir(v) local dir2 = Turn180Deg[dir1] - + self:replace_nodes(pos1, pos2, dir1, dir2) update3(self, pos1, dir1, dir2) end @@ -532,4 +540,4 @@ function Tube:get_tube_line(pos, dir) end end, self, 0 end -end +end diff --git a/mods/tubelib2/tube_test.lua b/mods/tubelib2/tube_test.lua index 0b401400..b925ae78 100644 --- a/mods/tubelib2/tube_test.lua +++ b/mods/tubelib2/tube_test.lua @@ -9,7 +9,7 @@ See LICENSE.txt for more information tube_test.lua - + THIS FILE IS ONLY FOR TESTING PURPOSES ]]-- @@ -62,10 +62,10 @@ local Tube = tubelib2.Tube:new({ -- dirs_to_check = {1,2,3,4}, -- horizontal only -- dirs_to_check = {5,6}, -- vertical only dirs_to_check = {1,2,3,4,5,6}, - max_tube_length = 10, + max_tube_length = 10, show_infotext = true, - primary_node_names = {"tubelib2:tubeS", "tubelib2:tubeA"}, - secondary_node_names = {"default:chest", "default:chest_open", + primary_node_names = {"tubelib2:tubeS", "tubelib2:tubeA"}, + secondary_node_names = {"default:chest", "default:chest_open", "tubelib2:source", "tubelib2:junction", "tubelib2:teleporter"}, after_place_tube = function(pos, param2, tube_type, num_tubes, tbl) minetest.swap_node(pos, {name = "tubelib2:tube"..tube_type, param2 = param2}) @@ -102,7 +102,7 @@ minetest.register_node("tubelib2:tubeS", { "tubelib2_hole.png", "tubelib2_hole.png", }, - + after_place_node = function(pos, placer, itemstack, pointed_thing) --local t = minetest.get_us_time() if not Tube:after_place_tube(pos, placer, pointed_thing) then @@ -112,11 +112,11 @@ minetest.register_node("tubelib2:tubeS", { --print("place time", minetest.get_us_time() - t) return false end, - + after_dig_node = function(pos, oldnode, oldmetadata, digger) Tube:after_dig_tube(pos, oldnode, oldmetadata) end, - + paramtype2 = "facedir", -- important! drawtype = "nodebox", node_box = { @@ -143,11 +143,11 @@ minetest.register_node("tubelib2:tubeA", { "tubelib2_tube.png", "tubelib2_hole.png", }, - + after_dig_node = function(pos, oldnode, oldmetadata, digger) Tube:after_dig_tube(pos, oldnode, oldmetadata) end, - + paramtype2 = "facedir", -- important! drawtype = "nodebox", node_box = { @@ -174,7 +174,7 @@ local function push_item(pos) --print("on_timer: dest_pos="..S(dest_pos).." dest_dir="..dest_dir) local inv = minetest.get_inventory({type="node", pos=dest_pos}) local stack = ItemStack("default:dirt") - + if on_push_item then return on_push_item(dest_pos, dest_dir, stack) elseif inv then @@ -204,7 +204,7 @@ minetest.register_node("tubelib2:source", { after_place_node = function(pos, placer) local tube_dir = ((minetest.dir_to_facedir(placer:get_look_dir()) + 2) % 4) + 1 M(pos):set_int("tube_dir", tube_dir) - Tube:after_place_node(pos, {tube_dir}) + Tube:after_place_node(pos, {tube_dir}) minetest.get_node_timer(pos):start(2) end, @@ -212,14 +212,14 @@ minetest.register_node("tubelib2:source", { local tube_dir = tonumber(oldmetadata.fields.tube_dir or 0) Tube:after_dig_node(pos, {tube_dir}) end, - + on_timer = function(pos, elapsed) if not push_item(pos) then print("push_item error") end return true end, - + paramtype2 = "facedir", -- important! on_rotate = screwdriver.disallow, -- important! paramtype = "light", @@ -245,7 +245,7 @@ minetest.register_node("tubelib2:junction", { after_dig_node = function(pos, oldnode, oldmetadata, digger) Tube:after_dig_node(pos) end, - + paramtype2 = "facedir", -- important! on_rotate = screwdriver.disallow, -- important! paramtype = "light", @@ -264,7 +264,7 @@ local sFormspec = "size[7.5,3]".. "field[0.5,1;7,1;channel;Enter channel string;]" .. "button_exit[2,2;3,1;exit;Save]" -local function store_connection(pos, peer_pos) +local function store_connection(pos, peer_pos) local meta = M(pos) meta:set_string("peer_pos", P2S(peer_pos)) meta:set_string("channel", "") @@ -332,7 +332,7 @@ minetest.register_node("tubelib2:teleporter", { pairing(pos, fields.channel) end end, - + on_push_item = function(pos, dir, item) local tube_dir = M(pos):get_int("tube_dir") if dir == tubelib2.Turn180Deg[tube_dir] then @@ -343,13 +343,13 @@ minetest.register_node("tubelib2:teleporter", { end end end, - + after_dig_node = function(pos, oldnode, oldmetadata, digger) stop_pairing(pos, oldmetadata) local tube_dir = tonumber(oldmetadata.fields.tube_dir or 0) Tube:after_dig_node(pos, {tube_dir}) end, - + paramtype2 = "facedir", -- important! on_rotate = screwdriver.disallow, -- important! paramtype = "light", @@ -363,7 +363,7 @@ minetest.register_node("tubelib2:teleporter", { -- Tool ------------------------------------------------------------------------------- local function read_param2(pos, player) - local node = minetest.get_node(pos) + local node = minetest.get_node(pos) local dir1, dir2, num_tubes = Tube:decode_param2(pos, node.param2) minetest.chat_send_player(player:get_player_name(), "[Tubelib2] pos="..P2S(pos)..", dir1="..dir1..", dir2="..dir2..", num_tubes="..num_tubes) end @@ -378,7 +378,7 @@ local function remove_tube(itemstack, placer, pointed_thing) end else local dir = (minetest.dir_to_facedir(placer:get_look_dir()) % 4) + 1 - minetest.chat_send_player(placer:get_player_name(), + minetest.chat_send_player(placer:get_player_name(), "[Tool Help] dir="..dir.."\n".. " left: remove node\n".. " right: repair tube line\n") @@ -399,7 +399,7 @@ end -- end -- else -- local dir = (minetest.dir_to_facedir(placer:get_look_dir()) % 4) + 1 --- minetest.chat_send_player(placer:get_player_name(), +-- minetest.chat_send_player(placer:get_player_name(), -- "[Tool Help] dir="..dir.."\n".. -- " left: remove node\n".. -- " right: repair tube line\n") @@ -411,22 +411,22 @@ local function repair_tube(itemstack, placer, pointed_thing) local pos = pointed_thing.under local _, _, fpos1, fpos2, _, _, cnt1, cnt2 = Tube:tool_repair_tube(pos) local length = cnt1 + cnt2 - + local s = "Tube from " .. P2S(fpos1) .. " to " .. P2S(fpos2) .. ". Lenght = " .. length minetest.chat_send_player(placer:get_player_name(), s) - + if length > Tube.max_tube_length then local s = string.char(0x1b) .. "(c@#ff0000)" .. "Tube length error!" minetest.chat_send_player(placer:get_player_name(), s) end - + minetest.sound_play("carts_cart_new", { - pos = pos, + pos = pos, gain = 1, max_hear_distance = 5}) else local dir = (minetest.dir_to_facedir(placer:get_look_dir()) % 4) + 1 - minetest.chat_send_player(placer:get_player_name(), + minetest.chat_send_player(placer:get_player_name(), "[Tool Help] dir="..dir.."\n".. " left: remove node\n".. " right: repair tube line\n")