From 689911298e829aa63e0c3c3cacb0a6666ee437b1 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 27 Jun 2015 18:17:59 +0200 Subject: [PATCH 1/4] Updated pipeworks --- mods/pipeworks/luaentity.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/pipeworks/luaentity.lua b/mods/pipeworks/luaentity.lua index 4b3d808e..3fe891f3 100755 --- a/mods/pipeworks/luaentity.lua +++ b/mods/pipeworks/luaentity.lua @@ -11,7 +11,7 @@ local function read_file() local t = f:read("*all") f:close() if t == "" or t == nil then return {} end - return minetest.deserialize(t) + return minetest.deserialize(t) or {} end local function write_file(tbl) @@ -251,6 +251,10 @@ end -- end function luaentity.add_entity(pos, name) + if not luaentity.entities then + minetest.after(0, luaentity.add_entity, vector.new(pos), name) + return + end local index = luaentity.entities_index while luaentity.entities[index] do index = index + 1 From b7f4a01d4dd5817eeb6aeb39230a46b098b8c953 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 27 Jun 2015 18:25:46 +0200 Subject: [PATCH 2/4] Updated mesecons - New textures for lever and hydroturbine - Little update of news.txt --- mods/mesecons/mesecons_hydroturbine/init.lua | 16 +++++++++++++--- .../textures/jeija_hydro_turbine_off.png | Bin 3016 -> 0 bytes .../textures/jeija_hydro_turbine_on.png | Bin 2981 -> 0 bytes .../textures/jeija_hydro_turbine_sides_off.png | Bin 0 -> 782 bytes .../textures/jeija_hydro_turbine_sides_on.png | Bin 0 -> 758 bytes .../textures/jeija_hydro_turbine_top_bottom.png | Bin 0 -> 564 bytes .../jeija_hydro_turbine_turbine_misc.png | Bin 0 -> 820 bytes .../jeija_hydro_turbine_turbine_top_bottom.png | Bin 0 -> 496 bytes mods/mesecons/mesecons_walllever/init.lua | 14 ++++++++++++-- .../textures/jeija_wall_lever_back_edges.png | Bin 0 -> 457 bytes .../textures/jeija_wall_lever_front.png | Bin 0 -> 360 bytes .../textures/jeija_wall_lever_front_bump.png | Bin 0 -> 252 bytes .../jeija_wall_lever_lever_light_off.png | Bin 0 -> 347 bytes .../jeija_wall_lever_lever_light_on.png | Bin 0 -> 308 bytes .../textures/jeija_wall_lever_off.png | Bin 1516 -> 0 bytes .../textures/jeija_wall_lever_on.png | Bin 1528 -> 0 bytes worlds/minetestforfun/news.txt | 2 ++ 17 files changed, 27 insertions(+), 5 deletions(-) delete mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png delete mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_on.png create mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_off.png create mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png create mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png create mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc.png create mode 100755 mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom.png create mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_back_edges.png create mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png create mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_front_bump.png create mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_off.png create mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_on.png delete mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_off.png delete mode 100755 mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_on.png diff --git a/mods/mesecons/mesecons_hydroturbine/init.lua b/mods/mesecons/mesecons_hydroturbine/init.lua index 2eb1a642..d1c08f79 100755 --- a/mods/mesecons/mesecons_hydroturbine/init.lua +++ b/mods/mesecons/mesecons_hydroturbine/init.lua @@ -6,11 +6,16 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", { drawtype = "mesh", mesh = "jeija_hydro_turbine.obj", - tiles = {"jeija_hydro_turbine_off.png"}, + tiles = { + "jeija_hydro_turbine_sides_off.png", + "jeija_hydro_turbine_top_bottom.png", + "jeija_hydro_turbine_turbine_top_bottom.png", + "jeija_hydro_turbine_turbine_misc.png" + }, inventory_image = "jeija_hydro_turbine_inv.png", wield_scale = {x=0.75, y=0.75, z=0.75}, groups = {dig_immediate=2}, - description="Water Turbine", + description="Water Turbine", paramtype = "light", selection_box = { type = "fixed", @@ -26,7 +31,12 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", { drawtype = "mesh", mesh = "jeija_hydro_turbine.obj", wield_scale = {x=0.75, y=0.75, z=0.75}, - tiles = {"jeija_hydro_turbine_on.png"}, + tiles = { + "jeija_hydro_turbine_sides_on.png", + "jeija_hydro_turbine_top_bottom.png", + "jeija_hydro_turbine_turbine_top_bottom.png", + "jeija_hydro_turbine_turbine_misc.png" + }, inventory_image = "jeija_hydro_turbine_inv.png", drop = "mesecons_hydroturbine:hydro_turbine_off 1", groups = {dig_immediate=2,not_in_creative_inventory=1}, diff --git a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png b/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png deleted file mode 100755 index 52863ab42176e70a68f1719e75615c4d85cab265..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3016 zcmV;(3pezMP)&N=5O z0BqmB{pPMNL8(&(B0A>)Ac}YxhMaQ(km{OW>V_L`c<#C9{JJwk0e~^a7(*Fx&ZV^) z<&3frt>@!-xm;eqem$ks8OLSd*F{9F38mCI=Ntw!aL(mv%>k}ivu4SXCDz&*p!)jy zycfNnilRUQfDDbHydGk{dGlst4CfpuOipAhVv-U<86qMg01yOgaw@{y6xIS~bkn9y zgpe7aJRz<1R8n(6i1VrJlbUyTcV}59r9{La=2lxL7)A7N4Ajyf%!(XH!71mAP(qe3 zU#_*D0m}QpKbX>~q^`e%Cv^Mmw@WFVa}I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4TWY;*H2-8T+QTkB)rOo;SSrF>@zL3SzCQO|ycwVZ(--O=!cq`>w>0F~%6@Txsn8 zPE7=lR_2aB$@tY5a~6?=&8|vh5q~AGc_053@TP3$zVAbX5Lel^lZ#(b-us!XaaHDy zMM(b6JMY|V4;?&su=N~6m~&pQRGZu6JYy`;i4Z~v!RP*;^8em8Zrs>m zOD0kYG0-6xh(W=!bJ$dg?Luun?!))K9r}z9+}PNllyJc_kE0UHk+;0YH)RR_4w1L>oDYuU42P@hLq>M9;Wopb-gMPo<(b_g}yM`|aByA=kAU7ot!oz_qoty}i93mzTSZMtXW$ zDRq8)Y)nojNpjI_S`!lhfI+hfQ>iqil}ZJfrkS$sgXhmP`TQRX3-8M1OtHB6@Zq0J zOU}&9`^S$r9zC*d-)_BlVc9n498FD4rPFCFrQlqoQi)-3LZD>@LU2lvX==leLSQK& z0HsoiG@H#J2qeagF%3YXwP_fG;V@E4a^8s|001Q<)|ydTtya;<$cW?IKnMvTLZxD* z80Q>93Zak^X)O>k41-{7TGsgZII=8@QbI5`qzsdUAta@Yl|ldrArOQF0Lqw2sZuKA zx}?|Z4TrknqV-90T5CqQDj-xNvj2Y-{0BU`C)14OQUhK zSX5e{R;zBIkSNtTIJj9V0RX;y{77v38`Iq0-bUSS_bLc}fAVA`pZ|%{pBc;Ez5Av8V$U%vT}BI_FbXCT$eC5bN{}b&l^(ST3BGy)0Sn8 z&d;ZEIZDXH+}!Sm53tkev|BB2ZY~Z(NC+h)3Ic#JA>?W>AdDe|F8h5ZMCa>Q-}mAA z`nqYF^?Kd&yn4N^l=3`pYilc;%?croj*ez$XZQE_A%vdiZEkM<2V=iB;klt87ytkO M07*qoM6N<$f*FH?761SM literal 0 HcmV?d00001 diff --git a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png b/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png new file mode 100755 index 0000000000000000000000000000000000000000..759388af0c397b59cd93acef8149efd3d96e4d2c GIT binary patch literal 758 zcmVq=`*5 zAvL97rCcdWxl>wdd)K~u&%tl};P&=5rPTNRiHV8R(^F$iHk;kw-%qF0#+d)_c^<|% zlgU&n6}Yjn@%`|yA4Qz8UKA0Gp)u`lR|uh^XsGoS%en{xOzG5(8_i}D4Tr;UFv#A! zzVdLTyV(AH$6tQ1Y#yr1!o}m2$I(*n&tmZO$+PMEImdN7oes+9^P}mpA}#WmzXR{q zz?uZ|ZSw8<$U2YtCfM9Wn{-G^c8LoyJ3C8StyceU_ht5FqunS^mW?s>Zv89#8k5*l z-sh{I0RWAt@mxO-Txl1#oido!Jwp8qv}yM6oS$jycR!rj5$DLGXb6bgP} zf@jy%noK4+=O~xUB@zkS*o;w{q!d!jF{hj;LOJD>BZipZ$v6oCa9tPG>-8`UsiBlI z7(){q%d%8Y#ZgQ-9R@=%0EA$zG^2EHZx4-+kEc?j2q4ax9_ZM_j4{9fq);%fk%k-! zAqXP2l#`Q_NJ>d5K?HG2D5VfVLI|z2!G?1IAp`_a${1r>>#=m21VNyb>JGXXVsHUs z5i`O}-+&&tA}rH4aTE(CA{a?28z(2w^Sn~2wESSX5j66tyfLN{RPr*fwXU|Sw^FwN z00+Mh5-33uq*yE>-}ifA_~O%x+-MHJ$K(TX)2{W+vTL@Ra^)8(KgyZ0nb$vFBSMaj zj)>M8BlIZu$nW~A*H-}n&31EjWYrk+^YZ7b)GNi*S^I41+L9#%#u%QTpEplVocZ}- z6hT5LA%idk7!yKzmzRVwgwWqkhY4}sYI&Xqx3;!y+pg7Wj^os7HLbPdIJ>*MnM_6q oQLR?z=H|-fGKA1^oSmJWf9(uUqtP9|`v3p{07*qoM6N<$f(+SiGynhq literal 0 HcmV?d00001 diff --git a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png b/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png new file mode 100755 index 0000000000000000000000000000000000000000..37d634fa4d06049ac6c8e86ca27d2fb730267998 GI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s;ZnE032YfBS@*Yz20gk9)o*}F%?SrE@)ea zgIWX9e5EcDMfl{$qS+iY04GJ^_v2!*I1E@9S!LYYS(M_1xARZu-b~+nySuwff1J%` zqax5Y1Y4xd6Tj--x)9vPtZp(!0n#Ls(ebVb32|kZm_~xqc8lt37-qLUWoz2qgyCWF0i{5+sPk=EO&JkJzvMk#IG^;pYdHDf=G55j8 y01nsSc)%a8!N~jIctCn^u0kj}-Ul4+Xu$v29mi0>?S;Pp0000d2L;yTIJUl)=E}7ia02HJqcR!AUq-riD+$JuM0{C^g7}O;osHyyNIZ2DW$a&7-Mt|Qu1zQt+f?{ zmaRarZHeUUZ3Q3#k~tSpyU#Jk`YU&joB%L~?|VAtJZlB8Vrc#IF5MsXBgMELzgc>H zeO=6voC>R_nSIvd=lzeIv&P^y=bQkZpP#?sdwF@eK{m!PGc!vm#rTZ^fTyRY|FkYo m2x09?viH6S2OuI#4d4se^;t`66;K-h0000fU54jF)WE_ttBF=s;chp?m6e{x*{GCF*6Zi zM0fX;lDmrtGe^-mr-+>Ad0kg)Ev2;gMl)mPy|#JkKB&Vd60W1k+mU7^AhOs=aprFtb|g-@VK^%?u+6 zBL03qX70TQ^_+9C|Dz%zM1+xbt<_qKGLah*@B4OlM0EE#XQ0E7hEuFBt~C}v#!%Jp zN+}^CnpyN#)j;uhJfgsH9Idrd%J27!Eiv;yo*h?2*^```00000NkvXXu0mjfUn0#o literal 0 HcmV?d00001 diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png new file mode 100755 index 0000000000000000000000000000000000000000..1bd747a8ed1064a663896f58b5ba62db8c5b9e91 GIT binary patch literal 360 zcmV-u0hj)XP)j zNshum3@k6*A^aD?4?w(u<&y}B#LFC<320^x<5P9I?bKqr-EIH?h{!z8s_O3U9udPZ zF!MA`<2Xh{J=5NMp=p{j6F@|$DiK8l5dknWe3#DiT*%CN@9xgbnOP&hXVkucV^aFtL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usp#u(HPB}Ftmt?g~u{66`ld@h?~j3_B%ETyEB zl2U?!&N-#jl`B`eu4~(tF_v@2DyynmMJkPuhDkcL64AqZw}|MgpPzv*z*s4T`lOVq zstO_WeUB`SF|S^|+Su4wEEYltfGvcOCF&4TfAUhQcTTNk!^3;G{*|&g1B1|5F-FuX zrDTlh`@X6wYi%hwYQWjrthL?A%d=~D@{))K7Y7&1W_0VA4#O}280VbU+IugAP)dQ) ztF;8qGY=u1T|-#G`SmaVxV4pT1LJY8_a2C%=W@<~76q5!4^Fllt*)DP^YltYpa1l1 z70|jvKt)Ia6bs!+M0H)yW;3)ld(%dkaY<_H>^f%Vn6%)%F~(ZkwypQR?|Z;$j46WY zoC_g%?_-Q?e}5l`rIe_Hl(KY2N(lgfex)ga)8XMEq^Iav>2Amv0wSUtH*OFS2d_#o z&ov(a1Q?7()gS z6l<;b9&r@#IOh`eb&FXQlhF@>$)y&Tb$jwb7wl8HcdlBMI%rK5E3ekc~meGLhur1RaH&X z2qCJqmBFF4Zrc{A!0XP=PSrT7!FKp5d0KPi}wk z{_b)~ZyOk#Q`@p9Prvx^qerXmDvEIZ`t>sIRwd?KDK($Z5o}87#fujZx~ETWU;F{` z=O16fpM+qSMnO(F=OWv{;Q07>b8{0dm2-aY-N!^U{dFG|1Hc%eKm=9goPV?ZSaTQzYU-4;Be1!%1sBpU+X5v0<(OzrOEr^=vlt-fwMfL7dieZse>? zMZ8;_b9lXgS}{g24gHRGbk41FBaAdev$?qm%An>5UCK8zD+*?<#q$Uuqr2aDKTEkz z$duN4p;NX~gtpo`dRxx)CsR0Kza5O@jzFf<0#1TX;ki}}mQY2|Df z1~lx^(NWiRU=eCH9!@|Dsh6)8mo;vT0aVN7vV2)8x*&w8>l*Iib=+r{HAX}S2M2hW eTxvM|5Bm>wL0e0g4su=q0000 Date: Sat, 27 Jun 2015 18:37:21 +0200 Subject: [PATCH 3/4] Updated homedecor and plantlife - New coloured signs --- mods/homedecor_modpack/signs_lib/init.lua | 48 +++++++++++++++++++ mods/plantlife_modpack/dryplants/init.lua | 6 ++- .../plantlife_modpack/ferns/gianttreefern.lua | 10 +++- mods/plantlife_modpack/ferns/treefern.lua | 6 ++- worlds/minetestforfun/news.txt | 2 + 5 files changed, 68 insertions(+), 4 deletions(-) diff --git a/mods/homedecor_modpack/signs_lib/init.lua b/mods/homedecor_modpack/signs_lib/init.lua index 2027dc9f..c00947cb 100755 --- a/mods/homedecor_modpack/signs_lib/init.lua +++ b/mods/homedecor_modpack/signs_lib/init.lua @@ -1108,6 +1108,54 @@ minetest.register_craft( { }, }) +minetest.register_craft( { + output = "signs:sign_wall_orange 4", + recipe = { + { "dye:orange", "dye:black", "dye:orange" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_orange 2", + recipe = { + { "dye:orange", "dye:black", "dye:orange" }, + { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_blue 4", + recipe = { + { "dye:blue", "dye:white", "dye:blue" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_blue 2", + recipe = { + { "dye:blue", "dye:white", "dye:blue" }, + { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_brown 4", + recipe = { + { "dye:brown", "dye:white", "dye:brown" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_brown 2", + recipe = { + { "dye:brown", "dye:white", "dye:brown" }, + { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + }, +}) + if minetest.setting_get("log_mods") then minetest.log("action", S("signs loaded")) end diff --git a/mods/plantlife_modpack/dryplants/init.lua b/mods/plantlife_modpack/dryplants/init.lua index 1a1a1705..5dd637c0 100755 --- a/mods/plantlife_modpack/dryplants/init.lua +++ b/mods/plantlife_modpack/dryplants/init.lua @@ -190,7 +190,11 @@ minetest.register_abm({ interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle chance = 100/GRASS_REGROWING_CHANCE, action = function(pos) - minetest.set_node(pos, {name="default:dirt_with_grass"}) + -- Only become dirt with grass if no cut grass or hay lies on top + local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) + if above.name ~= "dryplants:grass" and above.name ~= "dryplants:hay" then + minetest.set_node(pos, {name="default:dirt_with_grass"}) + end end, }) diff --git a/mods/plantlife_modpack/ferns/gianttreefern.lua b/mods/plantlife_modpack/ferns/gianttreefern.lua index 72b144e7..3fbea3a7 100755 --- a/mods/plantlife_modpack/ferns/gianttreefern.lua +++ b/mods/plantlife_modpack/ferns/gianttreefern.lua @@ -110,11 +110,17 @@ minetest.register_node("ferns:tree_fern_leaves_giant", { not_in_creative_inventory=1 }, drop = { - max_items = 1, + max_items = 2, items = { + { + -- occasionally, drop a second sapling instead of leaves + -- (extra saplings can also be obtained by replanting and + -- reharvesting leaves) + items = {"ferns:sapling_giant_tree_fern"}, + rarity = 10, + }, { items = {"ferns:sapling_giant_tree_fern"}, - rarity = 40, }, { items = {"ferns:tree_fern_leaves_giant"}, diff --git a/mods/plantlife_modpack/ferns/treefern.lua b/mods/plantlife_modpack/ferns/treefern.lua index 94a8e03f..a69a188f 100755 --- a/mods/plantlife_modpack/ferns/treefern.lua +++ b/mods/plantlife_modpack/ferns/treefern.lua @@ -18,7 +18,11 @@ abstract_ferns.grow_tree_fern = function(pos) return end - local size = math.random(1, 5) + local size = math.random(1, 4) + math.random(1, 4) + if (size > 5) then + size = 10 - size + end + size = size + 1 local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)] local i = 1 diff --git a/worlds/minetestforfun/news.txt b/worlds/minetestforfun/news.txt index 722dfd06..19642787 100755 --- a/worlds/minetestforfun/news.txt +++ b/worlds/minetestforfun/news.txt @@ -5,6 +5,8 @@ News de FR - MinetestForFun (Survival - PVP - Hardcore) /!\ En effet, nous profitons de cette stabilitée pour préparer une grosse MAJ qui boulversera à jamais le gameplay de Minetest /!\ ---Next merge--- (Remerciements : ???) +MaJ de "homedecor" (nouveaux panneaux colorés) +MaJ de "plantlife" MaJ de "mesecons" MaJ de "pipeworks" Ajout du mod "broomstick" de palige (permet d'utiliser un balai volant contre 210 de mana) From 0816951ffe654127b89c181804e321dd3b247946 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 27 Jun 2015 18:50:21 +0200 Subject: [PATCH 4/4] Updated MinetestForFun Game - Merged listring, not handled by server yet! --- minetestforfun_game/mods/creative/init.lua | 4 + minetestforfun_game/mods/default/furnace.lua | 4 + minetestforfun_game/mods/default/nodes.lua | 1 + .../sounds/default_place_node_hard.1.ogg | Bin 8588 -> 6578 bytes minetestforfun_game/mods/farming/API.txt | 28 ++ minetestforfun_game/mods/farming/api.lua | 303 ++++++++++++++++++ minetestforfun_game/mods/farming/nodes.lua | 156 +++++++++ minetestforfun_game/mods/vessels/init.lua | 2 + 8 files changed, 498 insertions(+) create mode 100755 minetestforfun_game/mods/farming/API.txt create mode 100755 minetestforfun_game/mods/farming/api.lua create mode 100755 minetestforfun_game/mods/farming/nodes.lua diff --git a/minetestforfun_game/mods/creative/init.lua b/minetestforfun_game/mods/creative/init.lua index 014694fa..8747d3dd 100755 --- a/minetestforfun_game/mods/creative/init.lua +++ b/minetestforfun_game/mods/creative/init.lua @@ -87,6 +87,10 @@ creative_inventory.set_creative_formspec = function(player, start_i, pagenum) "label[2.0,6.55;"..tostring(pagenum).."/"..tostring(pagemax).."]".. "button[0.3,6.5;1.6,1;creative_prev;<<]".. "button[2.7,6.5;1.6,1;creative_next;>>]".. + "listring[current_player;main]".. + "listring[current_player;craft]".. + "listring[current_player;main]".. + "listring[detached:creative;main]".. "label[5,1.5;Trash:]".. "list[detached:creative_trash;main;5,2;1,1;]".. default.get_hotbar_bg(5,3.5) diff --git a/minetestforfun_game/mods/default/furnace.lua b/minetestforfun_game/mods/default/furnace.lua index 6a5105e8..0a41b0a7 100755 --- a/minetestforfun_game/mods/default/furnace.lua +++ b/minetestforfun_game/mods/default/furnace.lua @@ -18,6 +18,10 @@ local function active_formspec(fuel_percent, item_percent) "list[current_name;dst;4.75,0.96;2,2;]".. "list[current_player;main;0,4.25;8,1;]".. "list[current_player;main;0,5.5;8,3;8]".. + "listring[current_name;dst]".. + "listring[current_player;main]".. + "listring[current_name;src]".. + "listring[current_player;main]".. default.get_hotbar_bg(0, 4.25) return formspec end diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index e824753a..0cbb5e96 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -1824,6 +1824,7 @@ minetest.register_node("default:chest_locked", { on_blast = function() end, }) + default.bookshelf_formspec = "size[8,7;]" .. default.gui_slots .. diff --git a/minetestforfun_game/mods/default/sounds/default_place_node_hard.1.ogg b/minetestforfun_game/mods/default/sounds/default_place_node_hard.1.ogg index 76eecf97699beb91e01e06c890befce64dd5d81a..9f97facad5abc48e4f2852b952fea91a8931cd32 100755 GIT binary patch delta 5139 zcmZ8j3p|tm_kY~)_e-lL6N`~Dw@}Ho7%F2f!#B+(Y$QX;Wy+M?V}uYgGA4wgzACa@ zr^H5bOHz##BHzOQnZEzm>-YOTuh-7&Jm>xSoO3?sd7raSs%3*-@Tqg>oB&?n-zQq` zk76*h6wb4UC-Qt4E|ADI@mSUTyW}Fzw(^K)d*{DK0O0QABGEJV-brh3{nyjY_s5aa z&GWlNbq?tm>gsa$)py(wAgP)Q?j%bmhhxmmn>20xSzlW4E-w4F5)wy<>J2OI$)9@&L_0SRN;c9&Q&ks?Ku zE@O3S_Mk07I~SsdfLF-+%oN@owCygZK%4L0S(7{cB5D64wrLQs-c+BJh04I(X zMI=(tOvJ}bbPsYCibfe%7CJGFg_X!XNWr26X#^GO#6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ZI zM_7rtU`n3wfLrfZQg>+l95qVI0>AA!X^lYaYXhF$mNx1H#?gN z5Ih47;()0ojjH*%qmc%7^~qx(&Rq}wI)2y!3}+*Z!&W-^{S_CNe$GJNXaN-di@@Th z8(AbxpWI(+WBCsjMsL}>H`|}!rndoz@5l%bN3a{N>$UE%#oO7#SxQ^(@wK(LX2D}qNF)w>W=cNrf8#! z7`Ys2Rt8#|sa>dyJC#|7H7%FDNJ?oU@f9SlD2YfhaKN8S5z}*v!c7)H!Qo{Zw!F2V zP#dODC`lk@eD$fummqR@sDF_W15E~-cAylC87CG-e)^7qGKYp`vudkG6sS#K(HMO_ z{EAS=J$t9-Epuetf8+j+rtwx)W@FR0@Ad5!s-`!+3W?;Gp|t2tlHlpw$#>1`nrkxsCL7 z38i;HZxlDoF&oZ0%4=D|l16}GDc;#}HjU*w{xcI^F*s37`to8XmL++-1P`U7lCqp^ z+uRX?@43WLdR|o@9%vUzXeq437MHq7806rs*1ZV>qnAvb9~f(C0PImuG(t`>&o8 zy|G_Cd=t~rB)c9w`*V)GWTbt<2T=@7>j$UJzSECYPH_c7k(?`l-&5Rnl1P*`-+1I$ zUtfXTc~rhhBqC5KfI^|bFM+ZP{)MF$OQ$wa1XJF=2-V%U32vQn79o<;=lPIqXjJ~2LZRTnz9jAzpqY&X2F*3Pv$H7(q{Gq#ZHfh4 LtT=s+ipGBdL&i=# diff --git a/minetestforfun_game/mods/farming/API.txt b/minetestforfun_game/mods/farming/API.txt new file mode 100755 index 00000000..171c3c38 --- /dev/null +++ b/minetestforfun_game/mods/farming/API.txt @@ -0,0 +1,28 @@ +farming.register_hoe(name, hoe definition) + -> Register a new hoe, see [hoe definition] + +farming.register_plant(name, Plant definition) + -> Register a new growing plant, see [Plant definition] + +Hoe Definition +{ + description = "", -- Description for tooltip + inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image + max_uses = 30, -- Uses until destroyed + material = "", -- Material for recipes + recipe = { -- Craft recipe, if material isn't used + {"air", "air", "air"}, + {"", "group:stick"}, + {"", "group:stick"}, + } +} + +Plant definition +{ + description = "", -- Description of seed item + inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image + steps = 8, -- How many steps the plant has to grow, until it can be harvested + ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber) + minlight = 13, -- Minimum light to grow + maxlight = default.LIGHT_MAX -- Maximum light to grow +} \ No newline at end of file diff --git a/minetestforfun_game/mods/farming/api.lua b/minetestforfun_game/mods/farming/api.lua new file mode 100755 index 00000000..932732db --- /dev/null +++ b/minetestforfun_game/mods/farming/api.lua @@ -0,0 +1,303 @@ +-- Wear out hoes, place soil +-- TODO Ignore group:flower +farming.hoe_on_use = function(itemstack, user, pointed_thing, uses) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- check if (wet) soil defined + local regN = minetest.registered_nodes + if regN[under.name].soil == nil or regN[under.name].soil.wet == nil or regN[under.name].soil.dry == nil then + return + end + + -- turn the node into soil, wear out item and play sound + minetest.set_node(pt.under, {name = regN[under.name].soil.dry}) + minetest.sound_play("default_dig_crumbly", { + pos = pt.under, + gain = 0.5, + }) + + if not minetest.setting_getbool("creative_mode") then + itemstack:add_wear(65535/(uses-1)) + end + return itemstack +end + +-- Register new hoes +farming.register_hoe = function(name, def) + -- Check for : prefix (register new hoes in your mod's namespace) + if name:sub(1,1) ~= ":" then + name = ":" .. name + end + -- Check def table + if def.description == nil then + def.description = "Hoe" + end + if def.inventory_image == nil then + def.inventory_image = "unknown_item.png" + end + if def.recipe == nil then + def.recipe = { + {"air","air",""}, + {"","group:stick",""}, + {"","group:stick",""} + } + end + if def.max_uses == nil then + def.max_uses = 30 + end + -- Register the tool + minetest.register_tool(name, { + description = def.description, + inventory_image = def.inventory_image, + on_use = function(itemstack, user, pointed_thing) + return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses) + end + }) + -- Register its recipe + if def.material == nil then + minetest.register_craft({ + output = name:sub(2), + recipe = def.recipe + }) + else + minetest.register_craft({ + output = name:sub(2), + recipe = { + {def.material, def.material, ""}, + {"", "group:stick", ""}, + {"", "group:stick", ""} + } + }) + -- Reverse Recipe + minetest.register_craft({ + output = name:sub(2), + recipe = { + {"", def.material, def.material}, + {"", "group:stick", ""}, + {"", "group:stick", ""} + } + }) + end +end + +-- Seed placement +farming.place_seed = function(itemstack, placer, pointed_thing, plantname) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local above = minetest.get_node(pt.above) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y+1 then + return + end + + -- check if you can replace the node above the pointed node + if not minetest.registered_nodes[above.name].buildable_to then + return + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") < 2 then + return + end + + -- add the node and remove 1 item from the itemstack + minetest.add_node(pt.above, {name = plantname, param2 = 1}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack +end + +-- Register plants +farming.register_plant = function(name, def) + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def table + if not def.description then + def.description = "Seed" + end + if not def.inventory_image then + def.inventory_image = "unknown_item.png" + end + if not def.steps then + return nil + end + if not def.minlight then + def.minlight = 1 + end + if not def.maxlight then + def.maxlight = 14 + end + if not def.fertility then + def.fertility = {} + end + + -- Register seed + local g = {seed = 1, snappy = 3, attached_node = 1} + for k, v in pairs(def.fertility) do + g[v] = 1 + end + minetest.register_node(":" .. mname .. ":seed_" .. pname, { + description = def.description, + tiles = {def.inventory_image}, + inventory_image = def.inventory_image, + wield_image = def.inventory_image, + drawtype = "signlike", + groups = g, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + fertility = def.fertility, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":seed_" .. pname) + end + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = pname:gsub("^%l", string.upper), + inventory_image = mname .. "_" .. pname .. ".png", + }) + + -- Register growing steps + for i=1,def.steps do + local drop = { + items = { + {items = {mname .. ":" .. pname}, rarity = 9 - i}, + {items = {mname .. ":" .. pname}, rarity= 18 - i * 2}, + {items = {mname .. ":seed_" .. pname}, rarity = 9 - i}, + {items = {mname .. ":seed_" .. pname}, rarity = 18 - i * 2}, + } + } + local nodegroups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + nodegroups[pname] = i + minetest.register_node(mname .. ":" .. pname .. "_" .. i, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + drop = drop, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + groups = nodegroups, + sounds = default.node_sound_leaves_defaults(), + }) + end + + -- Growing ABM + minetest.register_abm({ + nodenames = {"group:" .. pname, "group:seed"}, + neighbors = {"group:soil"}, + interval = 90, + chance = 2, + action = function(pos, node) + local plant_height = minetest.get_item_group(node.name, pname) + + -- return if already full grown + if plant_height == def.steps then + return + end + + local node_def = minetest.registered_items[node.name] or nil + + -- grow seed + if minetest.get_item_group(node.name, "seed") and node_def.fertility then + local can_grow = false + local soil_node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not soil_node then + return + end + for _, v in pairs(node_def.fertility) do + if minetest.get_item_group(soil_node.name, v) ~= 0 then + can_grow = true + end + end + if can_grow then + minetest.set_node(pos, {name = node.name:gsub("seed_", "") .. "_1"}) + end + return + end + + -- check if on wet soil + pos.y = pos.y - 1 + local n = minetest.get_node(pos) + if minetest.get_item_group(n.name, "soil") < 3 then + return + end + pos.y = pos.y + 1 + + -- check light + local ll = minetest.get_node_light(pos) + + if not ll or ll < def.minlight or ll > def.maxlight then + return + end + + -- grow + minetest.set_node(pos, {name = mname .. ":" .. pname .. "_" .. plant_height + 1}) + end + }) + + -- Return + local r = { + seed = mname .. ":seed_" .. pname, + harvest = mname .. ":" .. pname + } + return r +end diff --git a/minetestforfun_game/mods/farming/nodes.lua b/minetestforfun_game/mods/farming/nodes.lua new file mode 100755 index 00000000..f7b7cbf6 --- /dev/null +++ b/minetestforfun_game/mods/farming/nodes.lua @@ -0,0 +1,156 @@ +minetest.override_item("default:dirt", { + groups = {crumbly=3,soil=1}, + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_grass", { + groups = {crumbly=3,soil=1}, + soil = { + base = "default:dirt_with_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:soil", { + description = "Soil", + tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:soil_wet", { + description = "Wet Soil", + tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:desert_sand", { + groups = {crumbly=3, falling_node=1, sand=1, soil = 1}, + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) +minetest.register_node("farming:desert_sand_soil", { + description = "Desert Sand Soil", + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"}, + groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:desert_sand_soil_wet", { + description = "Wet Desert Sand Soil", + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"}, + groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:straw", { + description = "Straw", + tiles = {"farming_straw.png"}, + is_ground_content = false, + groups = {snappy=3, flammable=4}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_abm({ + nodenames = {"group:field"}, + interval = 15, + chance = 4, + action = function(pos, node) + local n_def = minetest.registered_nodes[node.name] or nil + local wet = n_def.soil.wet or nil + local base = n_def.soil.base or nil + local dry = n_def.soil.dry or nil + if not n_def or not n_def.soil or not wet or not base or not dry then + return + end + + pos.y = pos.y + 1 + local nn = minetest.get_node_or_nil(pos) + if not nn or not nn.name then + return + end + local nn_def = minetest.registered_nodes[nn.name] or nil + pos.y = pos.y - 1 + + if nn_def and nn_def.walkable and minetest.get_item_group(nn.name, "plant") == 0 then + minetest.set_node(pos, {name = base}) + return + end + -- check if there is water nearby + local wet_lvl = minetest.get_item_group(node.name, "wet") + if minetest.find_node_near(pos, 3, {"group:water"}) then + -- if it is dry soil and not base node, turn it into wet soil + if wet_lvl == 0 then + minetest.set_node(pos, {name = wet}) + end + else + -- only turn back if there are no unloaded blocks (and therefore + -- possible water sources) nearby + if not minetest.find_node_near(pos, 3, {"ignore"}) then + -- turn it back into base if it is already dry + if wet_lvl == 0 then + -- only turn it back if there is no plant/seed on top of it + if minetest.get_item_group(nn.name, "plant") == 0 and minetest.get_item_group(nn.name, "seed") == 0 then + minetest.set_node(pos, {name = base}) + end + + -- if its wet turn it back into dry soil + elseif wet_lvl == 1 then + minetest.set_node(pos, {name = dry}) + end + end + end + end, +}) + + +for i = 1, 5 do + minetest.override_item("default:grass_"..i, {drop = { + max_items = 1, + items = { + {items = {'farming:seed_wheat'},rarity = 5}, + {items = {'default:grass_1'}}, + } + }}) +end + +minetest.override_item("default:junglegrass", {drop = { + max_items = 1, + items = { + {items = {'farming:seed_cotton'},rarity = 8}, + {items = {'default:junglegrass'}}, + } +}}) diff --git a/minetestforfun_game/mods/vessels/init.lua b/minetestforfun_game/mods/vessels/init.lua index 4b7ccf04..b5dabc1b 100755 --- a/minetestforfun_game/mods/vessels/init.lua +++ b/minetestforfun_game/mods/vessels/init.lua @@ -9,6 +9,8 @@ local vessels_shelf_formspec = "list[context;vessels;0,0.3;8,2;]".. "list[current_player;main;0,2.85;8,1;]".. "list[current_player;main;0,4.08;8,3;8]".. + "listring[context;vessels]".. + "listring[current_player;main]".. default.get_hotbar_bg(0,2.85) minetest.register_node("vessels:shelf", {