From 1f111c55e5e40e663b5062bba92db78980ce8f40 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Fri, 10 Jul 2015 20:33:49 +0200 Subject: [PATCH 01/22] handling exceptions when quarry digs (eg. when player is nil) issues 172, 231, for example with item bones:bones --- technic/machines/HV/quarry.lua | 44 +++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 60805cc..0187a30 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -147,23 +147,35 @@ local function quarry_run(pos, node) can_dig = false end local dignode - if can_dig then - dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) - local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} - if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then - can_dig = false - end - end - - if can_dig then - for ay = startpos.y, digpos.y+1, -1 do - local checkpos = {x=digpos.x, y=ay, z=digpos.z} - local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos) - if checknode.name ~= "air" then - can_dig = false - break + if not pcall( + function () + if can_dig then + dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) + local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} + if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then + can_dig = false + end end - end + + if can_dig then + for ay = startpos.y, digpos.y+1, -1 do + local checkpos = {x=digpos.x, y=ay, z=digpos.z} + local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos) + if checknode.name ~= "air" then + can_dig = false + break + end + end + end + end) + then + -- handle exception caused by nil player - issue 172 & 231 + dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) + message = "ERROR: technic/machines/HV/quarry.lua: unhandled exception digging... skipping block: " + message = message .. "digpos = (" .. digpos.x .. "," .. digpos.y .. "," .. digpos.z .. ")" + message = message .. ", name = " .. dignode.name + print(message) + can_dig = false end nd = nd + 1 if can_dig then From d4863efa6694819c72f9228c840f7492d068afd7 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Tue, 14 Jul 2015 21:52:42 +0200 Subject: [PATCH 02/22] added textures for multi-tier geothermal --- technic/textures/technic_geothermal_side.xcf | Bin 0 -> 2662 bytes technic/textures/technic_geothermal_top.xcf | Bin 0 -> 2648 bytes .../textures/technic_geothermal_top_active.xcf | Bin 0 -> 2652 bytes technic/textures/technic_hv_geothermal_side.png | Bin 0 -> 854 bytes technic/textures/technic_hv_geothermal_top.png | Bin 0 -> 873 bytes .../technic_hv_geothermal_top_active.png | Bin 0 -> 863 bytes technic/textures/technic_lv_geothermal_side.png | Bin 0 -> 809 bytes technic/textures/technic_lv_geothermal_top.png | Bin 0 -> 828 bytes .../technic_lv_geothermal_top_active.png | Bin 0 -> 819 bytes technic/textures/technic_mv_geothermal_side.png | Bin 0 -> 842 bytes technic/textures/technic_mv_geothermal_top.png | Bin 0 -> 858 bytes .../technic_mv_geothermal_top_active.png | Bin 0 -> 851 bytes .../technicx32/technic_hv_geothermal_side.png | Bin 0 -> 854 bytes .../technicx32/technic_hv_geothermal_top.png | Bin 0 -> 873 bytes .../technic_hv_geothermal_top_active.png | Bin 0 -> 863 bytes .../technicx32/technic_lv_geothermal_side.png | Bin 0 -> 809 bytes .../technicx32/technic_lv_geothermal_top.png | Bin 0 -> 828 bytes .../technic_lv_geothermal_top_active.png | Bin 0 -> 819 bytes .../technicx32/technic_mv_geothermal_side.png | Bin 0 -> 842 bytes .../technicx32/technic_mv_geothermal_top.png | Bin 0 -> 858 bytes .../technic_mv_geothermal_top_active.png | Bin 0 -> 851 bytes 21 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 technic/textures/technic_geothermal_side.xcf create mode 100644 technic/textures/technic_geothermal_top.xcf create mode 100644 technic/textures/technic_geothermal_top_active.xcf create mode 100644 technic/textures/technic_hv_geothermal_side.png create mode 100644 technic/textures/technic_hv_geothermal_top.png create mode 100644 technic/textures/technic_hv_geothermal_top_active.png create mode 100644 technic/textures/technic_lv_geothermal_side.png create mode 100644 technic/textures/technic_lv_geothermal_top.png create mode 100644 technic/textures/technic_lv_geothermal_top_active.png create mode 100644 technic/textures/technic_mv_geothermal_side.png create mode 100644 technic/textures/technic_mv_geothermal_top.png create mode 100644 technic/textures/technic_mv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_top_active.png diff --git a/technic/textures/technic_geothermal_side.xcf b/technic/textures/technic_geothermal_side.xcf new file mode 100644 index 0000000000000000000000000000000000000000..05112e5433b8fdc0eedc43cfe7373f185eeaeff6 GIT binary patch literal 2662 zcmd5;X;V{I7!Hh8>q0^nAc{1CfQZ3`MMZESAV_P)g^>N`?zuPjX1z(^8YECrK$akg z;!+W-EP6U>GXqV=6&vSp7XvpC+~SqCcGd=EW97=zSq|cdHO5n<zDfOAs!n)<( z36u`UBP1<^c+0WEXCZOqb7EezCPIQ@5kho;jYEByPOH=FbXuLc#Ar0sm6Vq5 z)a=rHC@TRpRsvQS0rgs}VBKH>Ub!1kYXIC^0a%Z@0cV!u+Gah{H_CL4)`r6s_51f) z>l<3kC-m=*w05+#9&f$cbgt`cx~Z+T4$8Zm0M9u9FLeNR90%;edZ!JzyAkksC!lix za6FfJ40u1TeRcxzjh-W;lj`Kam^`#JKJjYce#^Uq9o_96r#d_>eHVM~Hn+Dm;1XPT z!4Ld8epS~g;1^o}d-?%6oO7xNIO_z=o&!9GbFL7;e`!Ow(N~?Bot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V?d00001 diff --git a/technic/textures/technic_hv_geothermal_side.png b/technic/textures/technic_hv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..629f2b4952d9380fa2c83fe1dab8954c003e9df2 GIT binary patch literal 854 zcmV-c1F8IpP)+;s4y`%-CbcI8JGt5{0NGr63iG#0uE85@o>#kl64DeFh!`fy4^2 zs@Njb9Uzqj;!YZ(R%(*c+8$qL#xv*4VbcXdd{6NIqW8*+0kes;F-@6+kOc1$N|8Lb z$Li=0qW%D+Ab7{-n>Tp$)fcGPLU4%m;7Yjl-a9-zJ*6y45*xF*HDEj*(d+d{;+SkY zrO0!(w|DT~qm(3@jJbXM7%i>khjN|sGg@582zl zfIeHG%ZEqMxx_MG((NX!@;Q@fhLVDORgkpXR8@tI4dd)FYhTmd*kC*wQ)Lr$oqPKI zXIK?ERn-t_%cq}w&SJ3w0>&7OF>DXd^Y+af>JL{>4I zF3IzP<#NftIp@$Clv2crWjS9EYKOL4=NL~iLI|{y4y)ygCIkS45CDV_@ZM9FHIebO ztic#fvim%;d~`-9ZIh-g>UBYp7kKCRFQpWOKr8JqT`Unov-tgIWYix}6a}tIK=8Dl@N_3Kh9r(C@{+$FKS4=JdigbU zJvu`TFS4#G?j0ZFn>8PN_%6-|M39v0f+UHFt);FUi`g70B*qvr|5wQb7CS0ViL6 g#_sjEaNphGA1}*X!c|XGuK)l507*qoM6N<$f(`+R!2kdN literal 0 HcmV?d00001 diff --git a/technic/textures/technic_hv_geothermal_top.png b/technic/textures/technic_hv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..c09c3961171fd7a777955e92f4c847f14274f905 GIT binary patch literal 873 zcmV-v1D5=WP)p|Su8v4Aa)z%%dwNIU{t z#HwP8P&QWmGDPYC(}olX}E@Lh-Pc1u+^Byo(O<@V7Ot#`!f6?bk;k;@!e z&Yoi5dy%Zj+2k4BZU?Q z28*I7XmyPcf~IMiFP5yLh?bVJ+HsX$f&t;UNTX|%5={0cBuUI`ufNH9ouGAt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*t^4fO pF~Wl2g=1#leZ%4XchEmS;$LbfTeq_QedGWD002ovPDHLkV1iNyo#6lg literal 0 HcmV?d00001 diff --git a/technic/textures/technic_lv_geothermal_side.png b/technic/textures/technic_lv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..90fb4305ed6fa1ed7dd363d72d89d544234abfb3 GIT binary patch literal 809 zcmV+^1J?YBP)4%a1{*feJadebnrU_$bgajoe#yZ-j#rJ)7 z$2)vqQx+vkYmM?GWtlTOgBeGhbL2%%mSsd?NM025UB~I^InFtpHQYbE$6ALuH*Xf3w!26nLIT7zH#{&Fl=)S;OHe zr)_&yQHoNEd07AuLLh_yz&Xb-80Oir3N&G;aPxvpvo&cFlO!w5*wc4C&RYJ<^E_A< zR!K@xHwdAarUALQnZEC_GelvCA9(y9r4@LRu4{Sq@+ANgP({_Cw8B{jLNE*l5PU3W z`MBe2O%(d{-N1*3J)V^4AVg`;Lkht-O}x3i#mysMe)R>`Er>-jj6G2l5(WWgveadT z6cVj9&yF(GZhOr85ASfx!t>)3l0?#V2IVQzbd3bG_E?Z;CHUpn-&n;lS+-{C2h{I3 zH=G=AQ8V1#{*7^#zVF$r6Pm6gjzY?+V47y)B%v%ToVA33=J1#!Ltk^qOJ-{rrvWpL zFk9-nMl2wuBn(2N6i6YsxVRwOWSGe?JA)F^BMyE1D5h#Eq!1W0akSas`##E37;9;o nmT9uoP0PviV;=VhtXud8?}KOOJ+E^|00000NkvXXu0mjf%HDNr literal 0 HcmV?d00001 diff --git a/technic/textures/technic_lv_geothermal_top.png b/technic/textures/technic_lv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..601ff15fd8164b8168548e98772bbe80d9c05857 GIT binary patch literal 828 zcmV-C1H=4@P)J(Q8+g?f8*6&ZE(QrbV}A-5MdWN9++lfe`-_lB4>nC_v~9=X@Jy0KOlLEU85svduLt7L=W=Zr`W`7I*&-td z0_v(lDkTxFLs=GBM%ub2j$&RfuY{9;#eBvwKT%ySy!qlS){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w?%^J`5 zSgn`1u8aKm=@aYa0&NUw6r;z1vMiZRr*vJuK7K x(LfwWC?y$2&9$mHpU-Tco=B3IrtQ(Aacq(yNH!S+aUpI*&`oxNkC3(sj2Sj>bjn)<0cCczbE*AvGei7(SZmB{mOxazO`u2FnHG^dsZ-9 zAJSv#9UOgdo8NvsL5CV!^@#Pmk$Z6e0T;6wRap`G0XH@`NRlhY<1t|nkk03nMZxaw zK3&(Llq9`Q_+j=vTKbY#v)3HoJLW1$cs-kurq|f6rKxMGswR$OB(Pj&%oizIDLg;K zwLN-rJj9b8C%^x}bUNksog;QOHlTOdzQYd&EV2~m1fyuc^S@qldV0#?^Z+$i=;Ew} zTaLWQ8I3|#MaK0!MM*)iDhY=}nx?@I3`zQix@#G&t&v!_+0&vXoYgE5-P&IGwg zGU8}R6b)$WlCmi2tmVIyQs5keC}zIQ5kfONyF|uuL|K;D9>O5N^A-O`8x2ZQ6e|vI z-UMKKx`mF`2M8(YYzIP6RV^TRTaSCY;~7I3c$7uO<(t1zQnLTvHag7~sC_}*G(0~) zr|WCJ{OUfoa|kD?>XI-F2z;Nmu`CxEQb>$3oc#PJx>;G8x}kH9t<7zsNKzCnT4~~V zganLHI3z|3etGni!EnfUJi@y)=-ufiei)*AczOPUwzHIF$=WC)FA9cXz#^N|G(E#8 zVzJ2RtR?UbAAR~EN{{(^%Rj)=3Iy1;rSDqWwnYkw?|a}Jt+n``&&I|k!U4|l)2|QF zZPRgea6vjyw0Vo3XfB?-V(0x`mi0B|i-ueGjwrGvPQlhYTRc8_%H2=yP(Et-2aQ@` UMD^O=iU0rr07*qoM6N<$g5%VNbN~PV literal 0 HcmV?d00001 diff --git a/technic/textures/technic_mv_geothermal_top.png b/technic/textures/technic_mv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ba234284210bd29dab2cc292e1eb23836f1d4c GIT binary patch literal 858 zcmV-g1Eu_lP)5Vj z`R)b3JbQucO7yE}L97L`cvT}VEwUnKn`iWT z9>NxEw_Cz60%;hJBBWF-;{@fn^!l()Q_5IlSKEr=V2IJ0gDApaQ4|HOuCZ;KrfHeY z7u+qEw6yHYicPu(1IiLe(}Geqqw$C&S@GnZ_lV;Jts9I1&yl#w#kMSTtI4yRLBCI) zXBcCU{jkqpucr+90e!#EbUNetmtO%;1B(9~e(@QTvs1z_V6m7J9Yx4>ydivRh;kf^ zG1R*LH~c>XC?$!L6|?!Aqw$FAS2xIh->20zH5TD8;4V(_KKYo!xQ znC{6j=jRi4dBMHOA<_>$%35O^i>ht`xHz9+D@7EA)cYN->tJEn79~ZoWBU4U9HlsU zbPqe(tdUaE=$h-r0^j$MN>G+1y>6FydB^hh79k{VN3q)%xNaAr6feH}4O!)yrq*DA z5H>eAH#kb7t37EN({UVxqgXEQSgtc3o*a{9Im2*(bE}Z|Cu3B{MYk=(o{w&7(llid z1e9gPXnerU-7Wi4GYA5vvpJZSj#7N^>HFC6G$u|{jMkJ@NmZ5zVPgxMeOXcKmagj| zguue$?DUKv7}7Ki&%gN|Syv75gBhtOsJAsTl1zV^aWuY9CRXhJta#(eCB-Jg2snIr k$dAAN%;S&VWcNeGKiU*)TplaHGynhq07*qoM6N<$f{)aW;Q#;t literal 0 HcmV?d00001 diff --git a/technic/textures/technic_mv_geothermal_top_active.png b/technic/textures/technic_mv_geothermal_top_active.png new file mode 100644 index 0000000000000000000000000000000000000000..9362bf37722f07009b9860eb73839c5f359a3986 GIT binary patch literal 851 zcmV-Z1FZasP)3Bi&kZR6O9V<)zceYgR59_Q%&&{Bibc4#sS0-DO8TutZ9W%FlFH|Ww}Xe?a5 zeZjBaK1a0`X5ZihkA3^>(`U@C=j@9;u2hW1hpf{zowmoIKVTWH$kLSK2d7wD;{Zt# z^UdrllxPWN*9)$$u889m^TnKepV4V4{H{-y?+6b<+AWtnONo;hB?QWKu~mZ#-|V6t z#fukz;P-txoh}a0Zn^AsJBq3%Uab%`JUX9XOvx(QaB((4t|cmeSs^bS(mZ3ErF6R; zq>ya4TY?}2Wf_k`l+rAt80~s=d$3LtipU_!ZOL#j#2Ujv7-DhA^PI+12qCEJhS_|< z-Ev7o!@ellBx|ss9f`6HXe}6xN5t`pCvUw&6vY@*V=Z)Cg{M7)<6s&?mSzlkJ+dst zT8ruhJ^p?*Wzg%>^LtFEGrsuzOa9B#&z>?lJ0%GEEEaRZqY$-@HUw`B(XNZNmdaH8 zAFUNpyka(=b2J`t{qhFY>-jXMqQW5<_PL7^KKl4WHrp+3tA!MRwJ50|ifEr4bACQy zm*w1>9HRW7Ls1!obttO_fQ$19LTkb>pxW>7JQoMcHZREY9n)9;;A+juqkD*WvqmXJ zZ7Qx83w+;4X-QEOblYvBdJrvQVMQvZg922 zlzWmSqUE|sSF>E+v0SG-JUJ#!Glszc_g16sPsZq$hiMvyT_00dBuT=c-=`=_M&ko+ z?rzx^hC#p2bT$Xu(9)XsK6w`rO(UWt!5TwR7L-MSlma0I`=X>W4Q;Q3loAJrv(q#B z{ULQ-^WE1!psKPadN3pDNUCjx3Ki3zXB>_1lgbslze-+va!I~Pu@Vj+9`e&~zwr2j d*V+A8@-KksX`z@-e0cx>002ovPDHLkV1jmxgj@gs literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_hv_geothermal_side.png b/technic/textures/technicx32/technic_hv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..629f2b4952d9380fa2c83fe1dab8954c003e9df2 GIT binary patch literal 854 zcmV-c1F8IpP)+;s4y`%-CbcI8JGt5{0NGr63iG#0uE85@o>#kl64DeFh!`fy4^2 zs@Njb9Uzqj;!YZ(R%(*c+8$qL#xv*4VbcXdd{6NIqW8*+0kes;F-@6+kOc1$N|8Lb z$Li=0qW%D+Ab7{-n>Tp$)fcGPLU4%m;7Yjl-a9-zJ*6y45*xF*HDEj*(d+d{;+SkY zrO0!(w|DT~qm(3@jJbXM7%i>khjN|sGg@582zl zfIeHG%ZEqMxx_MG((NX!@;Q@fhLVDORgkpXR8@tI4dd)FYhTmd*kC*wQ)Lr$oqPKI zXIK?ERn-t_%cq}w&SJ3w0>&7OF>DXd^Y+af>JL{>4I zF3IzP<#NftIp@$Clv2crWjS9EYKOL4=NL~iLI|{y4y)ygCIkS45CDV_@ZM9FHIebO ztic#fvim%;d~`-9ZIh-g>UBYp7kKCRFQpWOKr8JqT`Unov-tgIWYix}6a}tIK=8Dl@N_3Kh9r(C@{+$FKS4=JdigbU zJvu`TFS4#G?j0ZFn>8PN_%6-|M39v0f+UHFt);FUi`g70B*qvr|5wQb7CS0ViL6 g#_sjEaNphGA1}*X!c|XGuK)l507*qoM6N<$f(`+R!2kdN literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_hv_geothermal_top.png b/technic/textures/technicx32/technic_hv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..c09c3961171fd7a777955e92f4c847f14274f905 GIT binary patch literal 873 zcmV-v1D5=WP)p|Su8v4Aa)z%%dwNIU{t z#HwP8P&QWmGDPYC(}olX}E@Lh-Pc1u+^Byo(O<@V7Ot#`!f6?bk;k;@!e z&Yoi5dy%Zj+2k4BZU?Q z28*I7XmyPcf~IMiFP5yLh?bVJ+HsX$f&t;UNTX|%5={0cBuUI`ufNH9ouGAtG0<@& zp7Icug>E%@mNV$}$ny+SYoxok&!5j`40?TfL66yN&Z95C0-y#I|F!?|M@(-WG8*++ zE*JQRw-M!X!Du+d^*#Jf2d(RW!T&LUQj&EN^ULXPNZTR%^)b>3C$zez#$q(=vs$Ng z-g}p;%?8JHu?1iZ(w4;QHU9Mjj*g~m^Mc^`6{H$ZsA`Qc7Q4Cy;Lgz$p%h^_qAs_1 zo`Z#9Q&beimf5qvaFil==?z33Es#>u=$f%BHF+y1vgkS`l4bVA~SURcy-w z&-1aBBKrOTQs*0*T7w0)EjT|v$59f!D@oHeuH#@kiYQtUU1r?8en6Jx3`YaxEJgN? z@1a}|-L?$70lKM4)09EKPgU)h?2S2JT~JnfCW5y_ye*nBOXsbKzIQHJ^X-5wo*7WmV$XlJVX(F0)HIzDK{;Ctj_| zvyA;4hZxgf0co1>@XvFka9w6+3rNRl=4#hjwd>9~?G2+4~r(I~=q9f~|7NfV?H zNXMbo8ri#hf>IWzr%wobA)QWu1^BMRcDtpj8D90n{!eyGWOV)_GXc+Vd7_Ava5eAE* zC}?$!5Q3&@navk0j24kS(NIc~s zEDPOg@+_y{?ULsirq)Pz?;3wUo6_(0=!RXU(-~iV`8EIL!N(7n+&W}9?6FwP@egk! z%Eg@FV1Vm;_?-?~*Zd!)B&%f2Z>N7CZHMgl$4Dm{)9RWUi{YTha+UJl`|onK+2FV? zwg8Ml+7ebP{DXatjwWpLg7Ekiq#BK>YK<@!ySfG7&d~&+6j3y!F1L7|gN0#JR20RQ z>9c=ulp=iT4MZK!ky6s=nzO}%Fbt8(rm89e-)9vsi7zg&ZHeb9wq=3m`PfPk|L_p0 z^9@a{!2;VBoS&cLD2d*cr0ELRaj+dl950D4Gj1O2lVv%BVIMh7k=^5aDAz-`ErTFL zH#KRR((m=CsvYCK5$DSb%1YDk^_b4)U|L+Ixbf*{*fMax*zfqbwhh8U*E?F%;<^rH zRpUA?0JYXAskr{!b<E`03G)$hM4mJoymeh3LG%4g%s|ex-kK%x=A8_t%W*t^4fO pF~Wl2g=1#leZ%4XchEmS;$LbfTeq_QedGWD002ovPDHLkV1iNyo#6lg literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_lv_geothermal_side.png b/technic/textures/technicx32/technic_lv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..90fb4305ed6fa1ed7dd363d72d89d544234abfb3 GIT binary patch literal 809 zcmV+^1J?YBP)4%a1{*feJadebnrU_$bgajoe#yZ-j#rJ)7 z$2)vqQx+vkYmM?GWtlTOgBeGhbL2%%mSsd?NM025UB~I^InFtpHQYbE$6ALuH*Xf3w!26nLIT7zH#{&Fl=)S;OHe zr)_&yQHoNEd07AuLLh_yz&Xb-80Oir3N&G;aPxvpvo&cFlO!w5*wc4C&RYJ<^E_A< zR!K@xHwdAarUALQnZEC_GelvCA9(y9r4@LRu4{Sq@+ANgP({_Cw8B{jLNE*l5PU3W z`MBe2O%(d{-N1*3J)V^4AVg`;Lkht-O}x3i#mysMe)R>`Er>-jj6G2l5(WWgveadT z6cVj9&yF(GZhOr85ASfx!t>)3l0?#V2IVQzbd3bG_E?Z;CHUpn-&n;lS+-{C2h{I3 zH=G=AQ8V1#{*7^#zVF$r6Pm6gjzY?+V47y)B%v%ToVA33=J1#!Ltk^qOJ-{rrvWpL zFk9-nMl2wuBn(2N6i6YsxVRwOWSGe?JA)F^BMyE1D5h#Eq!1W0akSas`##E37;9;o nmT9uoP0PviV;=VhtXud8?}KOOJ+E^|00000NkvXXu0mjf%HDNr literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_lv_geothermal_top.png b/technic/textures/technicx32/technic_lv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..601ff15fd8164b8168548e98772bbe80d9c05857 GIT binary patch literal 828 zcmV-C1H=4@P)J(Q8+g?f8*6&ZE(QrbV}A-5MdWN9++lfe`-_lB4>nC_v~9=X@Jy0KOlLEU85svduLt7L=W=Zr`W`7I*&-td z0_v(lDkTxFLs=GBM%ub2j$&RfuY{9;#eBvwKT%ySy!qlS){dBQi6-H$49S z8xIc;6vc_%en;I_guWz>Vye0!TVzapkGi^0lm*gtk)B7IrpWzvgHnF$NO3yhV)*j@4y}7m<(YT4cPJ&0XoC$TEAx2<(z04+ zNU1pH1mScq?^ZAthen;K($RtfrZGiGTthEe!_!s;i11KfQixb=3 zj?Y$0nz}$5Z7_OZz+s+FdC5z{Z@=Muz2f;k!Ue2F3dt$YnSB0+`};eZszwQcEYDXQ z2VCpW4+emD_jkBTk!5p+wjl^S94yzmqplk^kALAQg+H0#`cfdJWYhys`#o_SBbA`* zI-<#h{P@E0`57T3fv;%Vnjn}Ul;UQ+#?2OM#z6xhgv;S@VCZ{v-%yr0zULu4kK^%$ zKOQ&S+^q3@kJWmK>$=E~pFXi(F3`r1MlpIED9e)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t&v!_+0&vXoYgE5-P&IGwg zGU8}R6b)$WlCmi2tmVIyQs5keC}zIQ5kfONyF|uuL|K;D9>O5N^A-O`8x2ZQ6e|vI z-UMKKx`mF`2M8(YYzIP6RV^TRTaSCY;~7I3c$7uO<(t1zQnLTvHag7~sC_}*G(0~) zr|WCJ{OUfoa|kD?>XI-F2z;Nmu`CxEQb>$3oc#PJx>;G8x}kH9t<7zsNKzCnT4~~V zganLHI3z|3etGni!EnfUJi@y)=-ufiei)*AczOPUwzHIF$=WC)FA9cXz#^N|G(E#8 zVzJ2RtR?UbAAR~EN{{(^%Rj)=3Iy1;rSDqWwnYkw?|a}Jt+n``&&I|k!U4|l)2|QF zZPRgea6vjyw0Vo3XfB?-V(0x`mi0B|i-ueGjwrGvPQlhYTRc8_%H2=yP(Et-2aQ@` UMD^O=iU0rr07*qoM6N<$g5%VNbN~PV literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_mv_geothermal_top.png b/technic/textures/technicx32/technic_mv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ba234284210bd29dab2cc292e1eb23836f1d4c GIT binary patch literal 858 zcmV-g1Eu_lP)5Vj z`R)b3JbQucO7yE}L97L`cvT}VEwUnKn`iWT z9>NxEw_Cz60%;hJBBWF-;{@fn^!l()Q_5IlSKEr=V2IJ0gDApaQ4|HOuCZ;KrfHeY z7u+qEw6yHYicPu(1IiLe(}Geqqw$C&S@GnZ_lV;Jts9I1&yl#w#kMSTtI4yRLBCI) zXBcCU{jkqpucr+90e!#EbUNetmtO%;1B(9~e(@QTvs1z_V6m7J9Yx4>ydivRh;kf^ zG1R*LH~c>XC?$!L6|?!Aqw$FAS2xIh->20zH5TD8;4V(_KKYo!xQ znC{6j=jRi4dBMHOA<_>$%35O^i>ht`xHz9+D@7EA)cYN->tJEn79~ZoWBU4U9HlsU zbPqe(tdUaE=$h-r0^j$MN>G+1y>6FydB^hh79k{VN3q)%xNaAr6feH}4O!)yrq*DA z5H>eAH#kb7t37EN({UVxqgXEQSgtc3o*a{9Im2*(bE}Z|Cu3B{MYk=(o{w&7(llid z1e9gPXnerU-7Wi4GYA5vvpJZSj#7N^>HFC6G$u|{jMkJ@NmZ5zVPgxMeOXcKmagj| zguue$?DUKv7}7Ki&%gN|Syv75gBhtOsJAsTl1zV^aWuY9CRXhJta#(eCB-Jg2snIr k$dAAN%;S&VWcNeGKiU*)TplaHGynhq07*qoM6N<$f{)aW;Q#;t literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_mv_geothermal_top_active.png b/technic/textures/technicx32/technic_mv_geothermal_top_active.png new file mode 100644 index 0000000000000000000000000000000000000000..9362bf37722f07009b9860eb73839c5f359a3986 GIT binary patch literal 851 zcmV-Z1FZasP)3Bi&kZR6O9V<)zceYgR59_Q%&&{Bibc4#sS0-DO8TutZ9W%FlFH|Ww}Xe?a5 zeZjBaK1a0`X5ZihkA3^>(`U@C=j@9;u2hW1hpf{zowmoIKVTWH$kLSK2d7wD;{Zt# z^UdrllxPWN*9)$$u889m^TnKepV4V4{H{-y?+6b<+AWtnONo;hB?QWKu~mZ#-|V6t z#fukz;P-txoh}a0Zn^AsJBq3%Uab%`JUX9XOvx(QaB((4t|cmeSs^bS(mZ3ErF6R; zq>ya4TY?}2Wf_k`l+rAt80~s=d$3LtipU_!ZOL#j#2Ujv7-DhA^PI+12qCEJhS_|< z-Ev7o!@ellBx|ss9f`6HXe}6xN5t`pCvUw&6vY@*V=Z)Cg{M7)<6s&?mSzlkJ+dst zT8ruhJ^p?*Wzg%>^LtFEGrsuzOa9B#&z>?lJ0%GEEEaRZqY$-@HUw`B(XNZNmdaH8 zAFUNpyka(=b2J`t{qhFY>-jXMqQW5<_PL7^KKl4WHrp+3tA!MRwJ50|ifEr4bACQy zm*w1>9HRW7Ls1!obttO_fQ$19LTkb>pxW>7JQoMcHZREY9n)9;;A+juqkD*WvqmXJ zZ7Qx83w+;4X-QEOblYvBdJrvQVMQvZg922 zlzWmSqUE|sSF>E+v0SG-JUJ#!Glszc_g16sPsZq$hiMvyT_00dBuT=c-=`=_M&ko+ z?rzx^hC#p2bT$Xu(9)XsK6w`rO(UWt!5TwR7L-MSlma0I`=X>W4Q;Q3loAJrv(q#B z{ULQ-^WE1!psKPadN3pDNUCjx3Ki3zXB>_1lgbslze-+va!I~Pu@Vj+9`e&~zwr2j d*V+A8@-KksX`z@-e0cx>002ovPDHLkV1jmxgj@gs literal 0 HcmV?d00001 From f97367b5779eec8288b362a439fe81ced0cf315c Mon Sep 17 00:00:00 2001 From: runningscissors Date: Tue, 14 Jul 2015 17:05:44 -0400 Subject: [PATCH 03/22] added multi-tier geothermal --- technic/machines/HV/geothermal.lua | 18 +++ technic/machines/HV/init.lua | 1 + technic/machines/LV/geothermal.lua | 116 +++---------------- technic/machines/LV/init.lua | 1 + technic/machines/LV/oldgeo.lua | 14 +++ technic/machines/MV/geothermal.lua | 35 ++++++ technic/machines/MV/init.lua | 1 + technic/machines/register/geothermal.lua | 139 +++++++++++++++++++++++ technic/machines/register/init.lua | 1 + 9 files changed, 223 insertions(+), 103 deletions(-) create mode 100644 technic/machines/HV/geothermal.lua create mode 100644 technic/machines/LV/oldgeo.lua create mode 100644 technic/machines/MV/geothermal.lua create mode 100644 technic/machines/register/geothermal.lua diff --git a/technic/machines/HV/geothermal.lua b/technic/machines/HV/geothermal.lua new file mode 100644 index 0000000..ec02b1f --- /dev/null +++ b/technic/machines/HV/geothermal.lua @@ -0,0 +1,18 @@ + +--- An HV geothermal EU generator +--- Using hot lava and water this device can create energy from steam + + + + +minetest.register_craft({ + output = 'technic:geothermal_hv 1', + recipe = { + {'technic:geothermal_mv', 'technic:geothermal_mv', 'technic:geothermal_mv'}, + {'technic:carbon_plate', 'technic:hv_transformer', 'technic:composite_plate'}, + {'', 'technic:hv_cable0', ''}, + } +}) + +technic.register_geothermal({tier="HV", power=100}) + diff --git a/technic/machines/HV/init.lua b/technic/machines/HV/init.lua index d7136b4..6c6637b 100644 --- a/technic/machines/HV/init.lua +++ b/technic/machines/HV/init.lua @@ -11,6 +11,7 @@ dofile(path.."/battery_box.lua") dofile(path.."/solar_array.lua") dofile(path.."/nuclear_reactor.lua") dofile(path.."/generator.lua") +dofile(path.."/geothermal.lua") -- Machines dofile(path.."/quarry.lua") diff --git a/technic/machines/LV/geothermal.lua b/technic/machines/LV/geothermal.lua index e88d3c9..bbb3186 100644 --- a/technic/machines/LV/geothermal.lua +++ b/technic/machines/LV/geothermal.lua @@ -1,111 +1,21 @@ --- A geothermal EU generator --- Using hot lava and water this device can create energy from steam --- The machine is only producing LV EUs and can thus not drive more advanced equipment --- The output is a little more than the coal burning generator (max 300EUs) -minetest.register_alias("geothermal", "technic:geothermal") -local S = technic.getter +--- A geothermal EU generator +--- Using hot lava and water this device can create energy from steam +--- The machine is only producing LV EUs and can thus not drive more advanced equipment +--- The output is a little more than the coal burning generator (max 300EUs) + minetest.register_craft({ - output = 'technic:geothermal', + output = 'technic:geothermal_lv 1', recipe = { - {'technic:granite', 'default:diamond', 'technic:granite'}, - {'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'}, - {'technic:granite', 'technic:lv_cable0', 'technic:granite'}, - } + {'technic:granite', 'default:diamond', 'technic:granite'}, + {'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'}, + {'technic:granite', 'technic:lv_cable0', 'technic:granite'}, + } }) -minetest.register_craftitem("technic:geothermal", { - description = S("Geothermal %s Generator"):format("LV"), -}) - -local check_node_around = function(pos) - local node = minetest.get_node(pos) - if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end - if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end - return 0 -end - -local run = function(pos, node) - local meta = minetest.get_meta(pos) - local water_nodes = 0 - local lava_nodes = 0 - local production_level = 0 - local eu_supply = 0 - - -- Correct positioning is water on one side and lava on the other. - -- The two cannot be adjacent because the lava the turns into obsidian or rock. - -- To get to 100% production stack the water and lava one extra block down as well: - -- WGL (W=Water, L=Lava, G=the generator, |=an LV cable) - -- W|L - - local positions = { - {x=pos.x+1, y=pos.y, z=pos.z}, - {x=pos.x+1, y=pos.y-1, z=pos.z}, - {x=pos.x-1, y=pos.y, z=pos.z}, - {x=pos.x-1, y=pos.y-1, z=pos.z}, - {x=pos.x, y=pos.y, z=pos.z+1}, - {x=pos.x, y=pos.y-1, z=pos.z+1}, - {x=pos.x, y=pos.y, z=pos.z-1}, - {x=pos.x, y=pos.y-1, z=pos.z-1}, - } - for _, p in pairs(positions) do - local check = check_node_around(p) - if check == 1 then water_nodes = water_nodes + 1 end - if check == 2 then lava_nodes = lava_nodes + 1 end - end - - if water_nodes == 1 and lava_nodes == 1 then production_level = 25; eu_supply = 50 end - if water_nodes == 2 and lava_nodes == 1 then production_level = 50; eu_supply = 100 end - if water_nodes == 1 and lava_nodes == 2 then production_level = 75; eu_supply = 200 end - if water_nodes == 2 and lava_nodes == 2 then production_level = 100; eu_supply = 300 end - - if production_level > 0 then - meta:set_int("LV_EU_supply", eu_supply) - end - - meta:set_string("infotext", - S("Geothermal %s Generator"):format("LV").." ("..production_level.."%)") - - if production_level > 0 and minetest.get_node(pos).name == "technic:geothermal" then - technic.swap_node (pos, "technic:geothermal_active") - return - end - if production_level == 0 then - technic.swap_node(pos, "technic:geothermal") - meta:set_int("LV_EU_supply", 0) - end -end - -minetest.register_node("technic:geothermal", { - description = S("Geothermal %s Generator"):format("LV"), - tiles = {"technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png", - "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, - paramtype2 = "facedir", - groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1}, - legacy_facedir_simple = true, - sounds = default.node_sound_wood_defaults(), - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("infotext", S("Geothermal %s Generator"):format("LV")) - meta:set_int("LV_EU_supply", 0) - end, - technic_run = run, -}) - -minetest.register_node("technic:geothermal_active", { - description = S("Geothermal %s Generator"):format("LV"), - tiles = {"technic_geothermal_top_active.png", "technic_machine_bottom.png", "technic_geothermal_side.png", - "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, - paramtype2 = "facedir", - groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, - legacy_facedir_simple = true, - sounds = default.node_sound_wood_defaults(), - drop = "technic:geothermal", - technic_run = run, -}) - -technic.register_machine("LV", "technic:geothermal", technic.producer) -technic.register_machine("LV", "technic:geothermal_active", technic.producer) +technic.register_geothermal({tier="LV", power=10}) +minetest.register_alias("geothermal", "technic:geothermal_lv") +minetest.register_alias("technic:geothermal", "technic:geothermal_lv") diff --git a/technic/machines/LV/init.lua b/technic/machines/LV/init.lua index 30523c9..24d9ffc 100644 --- a/technic/machines/LV/init.lua +++ b/technic/machines/LV/init.lua @@ -13,6 +13,7 @@ dofile(path.."/solar_array.lua") dofile(path.."/geothermal.lua") dofile(path.."/water_mill.lua") dofile(path.."/generator.lua") +dofile(path.."/oldgeo.lua") -- Machines dofile(path.."/alloy_furnace.lua") diff --git a/technic/machines/LV/oldgeo.lua b/technic/machines/LV/oldgeo.lua new file mode 100644 index 0000000..57a5d4f --- /dev/null +++ b/technic/machines/LV/oldgeo.lua @@ -0,0 +1,14 @@ + + +--- old non tiered one +--- A geothermal EU generator +--- Using hot lava and water this device can create energy from steam +--- The machine is only producing LV EUs and can thus not drive more advanced equipment +--- The output is a little more than the coal burning generator (max 300EUs) + + + + + +technic.register_geothermal({tier="LV", power=10, old=true}) + diff --git a/technic/machines/MV/geothermal.lua b/technic/machines/MV/geothermal.lua new file mode 100644 index 0000000..5f2f4dd --- /dev/null +++ b/technic/machines/MV/geothermal.lua @@ -0,0 +1,35 @@ + + +--- An MV geothermal EU generator +--- Using hot lava and water this device can create energy from steam + + + +minetest.register_craft({ + output = 'technic:geothermal_mv 1', + recipe = { + {'technic:geothermal_lv', 'technic:geothermal_lv', 'technic:geothermal_lv'}, + {'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'}, + {'', 'technic:mv_cable0', ''}, + } +}) + + +minetest.register_craft({ + output = 'technic:geothermal_mv 1', + recipe = { + {'technic:geothermal', 'technic:geothermal', 'technic:geothermal'}, + {'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'}, + {'', 'technic:mv_cable0', ''}, + } +}) + + + + + + +technic.register_geothermal({tier="MV", power=30}) + +-- compatibility alias for upgrading from old versions of technic +--minetest.register_alias("technic:geothermal_mv", "technic:geothermal_mv") diff --git a/technic/machines/MV/init.lua b/technic/machines/MV/init.lua index 72a98b6..84ea5e2 100644 --- a/technic/machines/MV/init.lua +++ b/technic/machines/MV/init.lua @@ -13,6 +13,7 @@ if technic.config:get_bool("enable_wind_mill") then end dofile(path.."/generator.lua") dofile(path.."/solar_array.lua") +dofile(path.."/geothermal.lua") -- Machines dofile(path.."/alloy_furnace.lua") diff --git a/technic/machines/register/geothermal.lua b/technic/machines/register/geothermal.lua new file mode 100644 index 0000000..0cb4544 --- /dev/null +++ b/technic/machines/register/geothermal.lua @@ -0,0 +1,139 @@ +local S = technic.getter + +function technic.register_geothermal(data) + local tier = data.tier + local ltier = string.lower(tier) + + local off_name = "technic:geothermal_"..ltier + local on_name = "technic:geothermal_active_"..ltier + + local texture_name = "technic_"..ltier .. "_geothermal" + + local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1} + local description = S("Geothermal %s Generator"):format(tier) + + if data.old then + + off_name = "technic:geothermal" + on_name = "technic:geothermal_active" + groups.not_in_creative_inventory=1 + description = "Old "..description + texture_name = "technic_geothermal" + end + + + local check_node_around = function(pos) + local node = minetest.get_node(pos) + if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end + if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end + return 0 + end + + + local run = function(pos, node) + local meta = minetest.get_meta(pos) + local water_nodes = 0 + local lava_nodes = 0 + local production_level = 0 + local eu_supply = 0 + + + + + + -- Correct positioning is water on one side and lava on the other. + -- The two cannot be adjacent because the lava the turns into obsidian or rock. + -- To get to 100% production stack the water and lava one extra block down as well: + -- WGL (W=Water, L=Lava, G=the generator, |=an LV cable) + -- W|L + + local positions = { + {x=pos.x+1, y=pos.y, z=pos.z}, + {x=pos.x+1, y=pos.y-1, z=pos.z}, + {x=pos.x-1, y=pos.y, z=pos.z}, + {x=pos.x-1, y=pos.y-1, z=pos.z}, + {x=pos.x, y=pos.y, z=pos.z+1}, + {x=pos.x, y=pos.y-1, z=pos.z+1}, + {x=pos.x, y=pos.y, z=pos.z-1}, + {x=pos.x, y=pos.y-1, z=pos.z-1}, + } + for _, p in pairs(positions) do + local check = check_node_around(p) + if check == 1 then water_nodes = water_nodes + 1 end + if check == 2 then lava_nodes = lava_nodes + 1 end + end + + if water_nodes == 1 and lava_nodes == 1 then production_level = 25; eu_supply = 5 * data.power end + if water_nodes == 2 and lava_nodes == 1 then production_level = 50; eu_supply = 10 * data.power end + if water_nodes == 1 and lava_nodes == 2 then production_level = 75; eu_supply = 20 * data.power end + if water_nodes == 2 and lava_nodes == 2 then production_level = 100; eu_supply = 30 * data.power end + + if production_level > 0 then + meta:set_int(tier.."_EU_supply", eu_supply) + end + + + + meta:set_string("infotext", description.." ("..production_level.."%) "..technic.prettynum(eu_supply) .." EU") + + + + + + + + + if production_level > 0 and minetest.get_node(pos).name == off_name then + technic.swap_node (pos, on_name) + return + end + if production_level == 0 then + technic.swap_node(pos, off_name) + meta:set_int(tier.."_EU_supply", 0) + end + end + + + if data.old then + + + else + + + + end + + minetest.register_node(off_name, { + description = description, + tiles = {texture_name.."_top.png", "technic_machine_bottom.png", texture_name.."_side.png", + texture_name.."_side.png", texture_name.."_side.png", texture_name.."_side.png"}, + paramtype2 = "facedir", + groups = groups, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Geothermal %s Generator"):format(tier)) + meta:set_int(tier.."_EU_supply", 0) + end, + technic_run = run, + }) + + minetest.register_node(on_name, { + description = description, + tiles = {texture_name.."_top_active.png", "technic_machine_bottom.png", texture_name.."_side.png", + texture_name.."_side.png", texture_name.."_side.png", texture_name.."_side.png"}, + paramtype2 = "facedir", + groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + drop = off_name, + technic_run = run, + }) + + + technic.register_machine(tier, off_name, technic.producer) + technic.register_machine(tier, on_name, technic.producer) + + +end diff --git a/technic/machines/register/init.lua b/technic/machines/register/init.lua index 1667d75..c3e51ea 100644 --- a/technic/machines/register/init.lua +++ b/technic/machines/register/init.lua @@ -9,6 +9,7 @@ dofile(path.."/battery_box.lua") -- Generators dofile(path.."/solar_array.lua") dofile(path.."/generator.lua") +dofile(path.."/geothermal.lua") -- API for machines dofile(path.."/recipes.lua") From 1f3ecf6d097aca473802035a925beb6164b3aed1 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 11:53:27 +0200 Subject: [PATCH 04/22] added comments to some functions --- technic/machines/other/anchor.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index 1c15bd2..df8d576 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -2,6 +2,9 @@ local S = technic.getter local desc = S("Administrative World Anchor") +-- pos - position of the anchor node +-- meta - contains "radius" +-- return table of positions, one position per block local function compute_forceload_positions(pos, meta) local radius = meta:get_int("radius") local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) @@ -23,11 +26,15 @@ local function compute_forceload_positions(pos, meta) return flposes end +-- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded +-- return table of positions that are currently forceloaded local function currently_forceloaded_positions(meta) local ser = meta:get_string("forceloaded") return ser == "" and {} or minetest.deserialize(ser) end +-- turns off forceloading for all positions in the table +-- meta - contains "forceloaded" (used by currently_forceloaded_positions) local function forceload_off(meta) local flposes = currently_forceloaded_positions(meta) meta:set_string("forceloaded", "") @@ -36,6 +43,9 @@ local function forceload_off(meta) end end +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forcedloaded" +-- pos - position of the anchor node +-- meta - contains "radius" (to be read) and "forceloaded" (to be written) local function forceload_on(pos, meta) local want_flposes = compute_forceload_positions(pos, meta) local have_flposes = {} From 4ac4460a016731f643e9ef49b16f4c6bb76e3452 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 19:57:11 +0200 Subject: [PATCH 05/22] added automatic forceloading --- technic/machines/HV/quarry.lua | 78 +++++++++++++++++++++++++++---- technic/machines/other/anchor.lua | 20 +++++++- 2 files changed, 89 insertions(+), 9 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 0187a30..ee4f05a 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -13,6 +13,41 @@ local quarry_dig_above_nodes = 3 -- How far above the quarry we will dig nodes local quarry_max_depth = 100 local quarry_demand = 10000 +-- keeps the quarry and the full dig zone loaded +-- pos - the position of the quarry +-- pos1,pos2 - two opposite corner positions that mark the zone to force load +local function forceload_dig(pos, pos1, pos2) + if not technic.auto_forceloading_enabled then + return + end + local meta = minetest.get_meta(pos) + + minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) + maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) + + flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) + technic.forceload_on_flposes(flpos, meta) + print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +end + +-- keeps only the quarry loaded +local function forceload_purge(pos) + if not technic.auto_forceloading_enabled then + return + end + local meta = minetest.get_meta(pos) + flpos = technic.compute_forceload_positions_between_points(pos, pos) + technic.forceload_on_flposes(flpos, meta) + print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +end + +local function forceload_off(meta) + if not technic.auto_forceloading_enabled then + return + end + technic.forceload_off(meta) +end + local function set_quarry_formspec(meta) local radius = meta:get_int("size") local formspec = "size[6,4.3]".. @@ -78,6 +113,7 @@ local function quarry_handle_purge(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local i = 0 + forceload_purge(pos) for _,stack in ipairs(inv:get_list("cache")) do i = i + 1 if stack then @@ -107,21 +143,43 @@ local function quarry_run(pos, node) end if meta:get_int("enabled") and meta:get_int("HV_EU_input") >= quarry_demand and meta:get_int("purge_on") == 0 then + -- the direction the quarry faces local pdir = minetest.facedir_to_dir(node.param2) + -- the direction to the right of where the quarry faces local qdir = pdir.x == 1 and vector.new(0,0,-1) or (pdir.z == -1 and vector.new(-1,0,0) or (pdir.x == -1 and vector.new(0,0,1) or vector.new(1,0,0))) local radius = meta:get_int("size") local diameter = radius*2 + 1 - local startpos = vector.add(vector.add(vector.add(pos, - vector.new(0, quarry_dig_above_nodes, 0)), - pdir), - vector.multiply(qdir, -radius)) - local endpos = vector.add(vector.add(vector.add(startpos, - vector.new(0, -quarry_dig_above_nodes-quarry_max_depth, 0)), - vector.multiply(pdir, diameter-1)), - vector.multiply(qdir, diameter-1)) + -- the back left top corner of the digging zone + local startpos = vector.add( + vector.add( + vector.add( + pos, + vector.new(0, quarry_dig_above_nodes, 0) + ), + pdir + ), + vector.multiply(qdir, -radius) + ) + -- the forward right bottom corner of the digging zone + local endpos = vector.add( + vector.add( + vector.add( + startpos, + vector.new(0, -quarry_dig_above_nodes-quarry_max_depth, 0) + ), + vector.multiply(pdir, diameter-1) + ), + vector.multiply(qdir, diameter-1) + ) + + --TEST +-- print("DEBUG: startpos = (" .. startpos.x .. "," .. startpos.y .. "," .. startpos.z .. ")") +-- print("DEBUG: endpos = (" .. endpos.x .. "," .. endpos.y .. "," .. endpos.z .. ")") + forceload_dig(pos, startpos, endpos) + local vm = VoxelManip() local minpos, maxpos = vm:read_from_map(startpos, endpos) local area = VoxelArea:new({MinEdge=minpos, MaxEdge=maxpos}) @@ -236,6 +294,10 @@ minetest.register_node("technic:quarry", { set_quarry_formspec(meta) set_quarry_demand(meta) end, + on_destruct = function (pos) + local meta = minetest.get_meta(pos) + forceload_off(meta) + end, after_place_node = function(pos, placer, itemstack) local meta = minetest.get_meta(pos) meta:set_string("owner", placer:get_player_name()) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index df8d576..cdc906c 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -2,6 +2,9 @@ local S = technic.getter local desc = S("Administrative World Anchor") +-- set to false to disable autoforceloading in other files, such as the quarry force loading itself and dig area +technic.auto_forceloading_enabled = true + -- pos - position of the anchor node -- meta - contains "radius" -- return table of positions, one position per block @@ -9,6 +12,12 @@ local function compute_forceload_positions(pos, meta) local radius = meta:get_int("radius") local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) local maxpos = vector.add(pos, vector.new(radius, radius, radius)) + return compute_forceload_positions_between_points(minpos, maxpos) +end + +-- minpos,maxpos - two opposite corner positions that mark the zone to force load; all coordinates in minpos have to be lower than the ones in maxpos +-- return table of positions, one position per block +local function compute_forceload_positions_between_points(minpos, maxpos) local minbpos = {} local maxbpos = {} for _, coord in ipairs({"x","y","z"}) do @@ -25,6 +34,7 @@ local function compute_forceload_positions(pos, meta) end return flposes end +technic.compute_forceload_positions_between_points = compute_forceload_positions_between_points -- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded -- return table of positions that are currently forceloaded @@ -32,6 +42,7 @@ local function currently_forceloaded_positions(meta) local ser = meta:get_string("forceloaded") return ser == "" and {} or minetest.deserialize(ser) end +technic.currently_forceloaded_positions = currently_forceloaded_positions -- turns off forceloading for all positions in the table -- meta - contains "forceloaded" (used by currently_forceloaded_positions) @@ -42,12 +53,18 @@ local function forceload_off(meta) minetest.forceload_free_block(p) end end +technic.forceload_off = forceload_off --- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forcedloaded" +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" -- pos - position of the anchor node -- meta - contains "radius" (to be read) and "forceloaded" (to be written) local function forceload_on(pos, meta) local want_flposes = compute_forceload_positions(pos, meta) + forceload_on_flposes(want_flposes, meta) + return +end + +local function forceload_on_flposes(want_flposes, meta) local have_flposes = {} for _, p in ipairs(want_flposes) do if minetest.forceload_block(p) then @@ -56,6 +73,7 @@ local function forceload_on(pos, meta) end meta:set_string("forceloaded", #have_flposes == 0 and "" or minetest.serialize(have_flposes)) end +technic.forceload_on_flposes = forceload_on_flposes local function set_display(pos, meta) meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc)) From b474ca8643a95520cf389c2f4c770bc706053f8a Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:15:43 +0200 Subject: [PATCH 06/22] disabled some debug output --- technic/machines/HV/quarry.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index ee4f05a..d9c707a 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -27,7 +27,7 @@ local function forceload_dig(pos, pos1, pos2) flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) technic.forceload_on_flposes(flpos, meta) - print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +-- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end -- keeps only the quarry loaded @@ -38,7 +38,7 @@ local function forceload_purge(pos) local meta = minetest.get_meta(pos) flpos = technic.compute_forceload_positions_between_points(pos, pos) technic.forceload_on_flposes(flpos, meta) - print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +-- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end local function forceload_off(meta) From 4940c8566990a2edec3b386dee65c75167a2be4a Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:33:56 +0200 Subject: [PATCH 07/22] made lasers 10x more precise --- technic/tools/mining_lasers.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 4c83ae9..476d774 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -132,7 +132,11 @@ local function laser_shoot(player, range, particle_texture, sound) texture = particle_texture .. "^[transform" .. math.random(0, 7), }) minetest.sound_play(sound, {pos = player_pos, max_hear_distance = range}) - for pos in rayIter(start_pos, dir, range) do + --rayIter is integer math... so make it more precise by multiplying pos and range here + start_pos_10x = vector.multiply(start_pos, 10) + for pos in rayIter(start_pos_10x, dir, range*10) do + --reverse the above multiplying here + pos = vector.multiply(pos, 0.1) if minetest.is_protected(pos, player_name) then minetest.record_protection_violation(pos, player_name) break From d059bca61a22322b0615965cdc39f6abbcc673c4 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:50:56 +0200 Subject: [PATCH 08/22] fixed some undeclared variable warnings --- technic/machines/HV/quarry.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index d9c707a..bd914a4 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -22,10 +22,10 @@ local function forceload_dig(pos, pos1, pos2) end local meta = minetest.get_meta(pos) - minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) - maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) + local minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) + local maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) - flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) + local flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) technic.forceload_on_flposes(flpos, meta) -- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end @@ -36,7 +36,7 @@ local function forceload_purge(pos) return end local meta = minetest.get_meta(pos) - flpos = technic.compute_forceload_positions_between_points(pos, pos) + local flpos = technic.compute_forceload_positions_between_points(pos, pos) technic.forceload_on_flposes(flpos, meta) -- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end From 821e36718ec8dc940807d19db6858f13df97ecbc Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Sun, 19 Jul 2015 23:22:19 +0200 Subject: [PATCH 09/22] moved compute_forceload_positions_between_points above compute_forceload_positions since apparently sometimes you need forward declaration --- technic/machines/other/anchor.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index cdc906c..b5f3f39 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -5,16 +5,6 @@ local desc = S("Administrative World Anchor") -- set to false to disable autoforceloading in other files, such as the quarry force loading itself and dig area technic.auto_forceloading_enabled = true --- pos - position of the anchor node --- meta - contains "radius" --- return table of positions, one position per block -local function compute_forceload_positions(pos, meta) - local radius = meta:get_int("radius") - local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) - local maxpos = vector.add(pos, vector.new(radius, radius, radius)) - return compute_forceload_positions_between_points(minpos, maxpos) -end - -- minpos,maxpos - two opposite corner positions that mark the zone to force load; all coordinates in minpos have to be lower than the ones in maxpos -- return table of positions, one position per block local function compute_forceload_positions_between_points(minpos, maxpos) @@ -36,6 +26,16 @@ local function compute_forceload_positions_between_points(minpos, maxpos) end technic.compute_forceload_positions_between_points = compute_forceload_positions_between_points +-- pos - position of the anchor node +-- meta - contains "radius" +-- return table of positions, one position per block +local function compute_forceload_positions(pos, meta) + local radius = meta:get_int("radius") + local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) + local maxpos = vector.add(pos, vector.new(radius, radius, radius)) + return compute_forceload_positions_between_points(minpos, maxpos) +end + -- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded -- return table of positions that are currently forceloaded local function currently_forceloaded_positions(meta) From 05b098141abf401fe74586e1b2fd8a143d045ca5 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Mon, 20 Jul 2015 00:00:38 +0200 Subject: [PATCH 10/22] fixed another forward declaration issue --- technic/machines/other/anchor.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index b5f3f39..0b2b100 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -55,15 +55,6 @@ local function forceload_off(meta) end technic.forceload_off = forceload_off --- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" --- pos - position of the anchor node --- meta - contains "radius" (to be read) and "forceloaded" (to be written) -local function forceload_on(pos, meta) - local want_flposes = compute_forceload_positions(pos, meta) - forceload_on_flposes(want_flposes, meta) - return -end - local function forceload_on_flposes(want_flposes, meta) local have_flposes = {} for _, p in ipairs(want_flposes) do @@ -75,6 +66,15 @@ local function forceload_on_flposes(want_flposes, meta) end technic.forceload_on_flposes = forceload_on_flposes +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" +-- pos - position of the anchor node +-- meta - contains "radius" (to be read) and "forceloaded" (to be written) +local function forceload_on(pos, meta) + local want_flposes = compute_forceload_positions(pos, meta) + forceload_on_flposes(want_flposes, meta) + return +end + local function set_display(pos, meta) meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc)) meta:set_string("formspec", From 4f0af9c7441bb777cbb6e39f68fcec30cc032e39 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Sat, 5 Sep 2015 07:53:57 +0200 Subject: [PATCH 11/22] just indentation to make some vector.xxx easier to read --- technic/machines/HV/quarry.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index bd914a4..f4a89b7 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -196,10 +196,16 @@ local function quarry_run(pos, node) local rq = math.floor(ndl / diameter) local rp = ndl % diameter if rq % 2 == 1 then rp = diameter - 1 - rp end - local digpos = vector.add(vector.add(vector.add(startpos, - vector.new(0, -ry, 0)), - vector.multiply(pdir, rp)), - vector.multiply(qdir, rq)) + local digpos = vector.add( + vector.add( + vector.add( + startpos, + vector.new(0, -ry, 0) + ), + vector.multiply(pdir, rp) + ), + vector.multiply(qdir, rq) + ) local can_dig = true if can_dig and minetest.is_protected and minetest.is_protected(digpos, owner) then can_dig = false From f71abf7a30de85eadfaf5595c8021bb5d7b2396b Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Fri, 10 Jul 2015 20:33:49 +0200 Subject: [PATCH 12/22] handling exceptions when quarry digs (eg. when player is nil) issues 172, 231, for example with item bones:bones --- technic/machines/HV/quarry.lua | 44 +++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 60805cc..0187a30 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -147,23 +147,35 @@ local function quarry_run(pos, node) can_dig = false end local dignode - if can_dig then - dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) - local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} - if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then - can_dig = false - end - end - - if can_dig then - for ay = startpos.y, digpos.y+1, -1 do - local checkpos = {x=digpos.x, y=ay, z=digpos.z} - local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos) - if checknode.name ~= "air" then - can_dig = false - break + if not pcall( + function () + if can_dig then + dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) + local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} + if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, nil)) then + can_dig = false + end end - end + + if can_dig then + for ay = startpos.y, digpos.y+1, -1 do + local checkpos = {x=digpos.x, y=ay, z=digpos.z} + local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos) + if checknode.name ~= "air" then + can_dig = false + break + end + end + end + end) + then + -- handle exception caused by nil player - issue 172 & 231 + dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) + message = "ERROR: technic/machines/HV/quarry.lua: unhandled exception digging... skipping block: " + message = message .. "digpos = (" .. digpos.x .. "," .. digpos.y .. "," .. digpos.z .. ")" + message = message .. ", name = " .. dignode.name + print(message) + can_dig = false end nd = nd + 1 if can_dig then From 385bd946a95c8eb0dd98f46cb2866368e4adfc4a Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Tue, 14 Jul 2015 21:52:42 +0200 Subject: [PATCH 13/22] added textures for multi-tier geothermal --- technic/textures/technic_geothermal_side.xcf | Bin 0 -> 2662 bytes technic/textures/technic_geothermal_top.xcf | Bin 0 -> 2648 bytes .../textures/technic_geothermal_top_active.xcf | Bin 0 -> 2652 bytes technic/textures/technic_hv_geothermal_side.png | Bin 0 -> 854 bytes technic/textures/technic_hv_geothermal_top.png | Bin 0 -> 873 bytes .../technic_hv_geothermal_top_active.png | Bin 0 -> 863 bytes technic/textures/technic_lv_geothermal_side.png | Bin 0 -> 809 bytes technic/textures/technic_lv_geothermal_top.png | Bin 0 -> 828 bytes .../technic_lv_geothermal_top_active.png | Bin 0 -> 819 bytes technic/textures/technic_mv_geothermal_side.png | Bin 0 -> 842 bytes technic/textures/technic_mv_geothermal_top.png | Bin 0 -> 858 bytes .../technic_mv_geothermal_top_active.png | Bin 0 -> 851 bytes .../technicx32/technic_hv_geothermal_side.png | Bin 0 -> 854 bytes .../technicx32/technic_hv_geothermal_top.png | Bin 0 -> 873 bytes .../technic_hv_geothermal_top_active.png | Bin 0 -> 863 bytes .../technicx32/technic_lv_geothermal_side.png | Bin 0 -> 809 bytes .../technicx32/technic_lv_geothermal_top.png | Bin 0 -> 828 bytes .../technic_lv_geothermal_top_active.png | Bin 0 -> 819 bytes .../technicx32/technic_mv_geothermal_side.png | Bin 0 -> 842 bytes .../technicx32/technic_mv_geothermal_top.png | Bin 0 -> 858 bytes .../technic_mv_geothermal_top_active.png | Bin 0 -> 851 bytes 21 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 technic/textures/technic_geothermal_side.xcf create mode 100644 technic/textures/technic_geothermal_top.xcf create mode 100644 technic/textures/technic_geothermal_top_active.xcf create mode 100644 technic/textures/technic_hv_geothermal_side.png create mode 100644 technic/textures/technic_hv_geothermal_top.png create mode 100644 technic/textures/technic_hv_geothermal_top_active.png create mode 100644 technic/textures/technic_lv_geothermal_side.png create mode 100644 technic/textures/technic_lv_geothermal_top.png create mode 100644 technic/textures/technic_lv_geothermal_top_active.png create mode 100644 technic/textures/technic_mv_geothermal_side.png create mode 100644 technic/textures/technic_mv_geothermal_top.png create mode 100644 technic/textures/technic_mv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_hv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_lv_geothermal_top_active.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_side.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_top.png create mode 100644 technic/textures/technicx32/technic_mv_geothermal_top_active.png diff --git a/technic/textures/technic_geothermal_side.xcf b/technic/textures/technic_geothermal_side.xcf new file mode 100644 index 0000000000000000000000000000000000000000..05112e5433b8fdc0eedc43cfe7373f185eeaeff6 GIT binary patch literal 2662 zcmd5;X;V{I7!Hh8>q0^nAc{1CfQZ3`MMZESAV_P)g^>N`?zuPjX1z(^8YECrK$akg z;!+W-EP6U>GXqV=6&vSp7XvpC+~SqCcGd=EW97=zSq|cdHO5n<zDfOAs!n)<( z36u`UBP1<^c+0WEXCZOqb7EezCPIQ@5kho;jYEByPOH=FbXuLc#Ar0sm6Vq5 z)a=rHC@TRpRsvQS0rgs}VBKH>Ub!1kYXIC^0a%Z@0cV!u+Gah{H_CL4)`r6s_51f) z>l<3kC-m=*w05+#9&f$cbgt`cx~Z+T4$8Zm0M9u9FLeNR90%;edZ!JzyAkksC!lix za6FfJ40u1TeRcxzjh-W;lj`Kam^`#JKJjYce#^Uq9o_96r#d_>eHVM~Hn+Dm;1XPT z!4Ld8epS~g;1^o}d-?%6oO7xNIO_z=o&!9GbFL7;e`!Ow(N~?BotSejsKig%>~Hqv zdfms}nxg*@Ixte<@HX4-61Lr!V7G$(&_=iX3RXg+uw%5g<&T_H(6;;u^P-CP=JIlr zxyEFvs_ZgW7)zmfRoFQDYJpq!0-CYKs<8F;?FZ!uSm}f58^FWZ1-*NK@5MR$t-xKN zY*^9*GT2siTj+pF3Hke{az1OAKc1 zp0cvjT0`kBD9K+eGw^b}a|6CoIo*W6dp*8bI-FBi1DTyT)2IV(#$6h~7pp?sakl+T zO~;`F{hgiHYQEL~Z+5FxSUM0AXo6?MN`Q^Yq(sC8hHZ+3csR!|!GML|UbLNUt*|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+g}#B) zCx!+FNBggIKDs!T938tnc6WGYc6xPqd~5*H=Z67jGJv;}fXT~%vs9m&1D-z*czFsi zy9l_s@4N*37R~+o3gNp8Z#C}M?k}zz>CZQ}zFqus^wD5)ej<4_Ss1gCCi3t)bK1n>q1 zOkD?@8v~rD`rJJ5JiYlV*MMj50M@AUI^6b?MOtoOK-KKt8n1488+Sq{{c)}F)dvsX zj&?qdcXqbN`#WCl>6z?^KlQNsA-$KbJWij~{)6kLdmo?=D@HwUo&o0+b#}#o_tR5a zqz|jFBRM^B?M(9A>$j$+md?D_`Ja{BYc3WPQx#YlTdsl~1L>@5*(?%V)yKoODZ_34 zAIh-x3rv=CcoG&x+JQ1Wd}m*3X@^-b zmL#R-HP##@kC3K{tY1R+d3CeK3S!WZM4rWrr|L%5SHs$hCc8GLn+>U`OVH{i zqsWQ2C=?90p=TIW#rX%=HPU?9)MXR1g4b|VudtjkS=krUp5q{HgV_!_L8ushNl9l} zOGJXDY2}if&(`_n`Wnw?Qk=k+?QqQ~@mkh*mKBuERZLXU#3fDOT_yENJ%G(uIIhTW z8A&L^=0DJDC~qjHp_AUPcXLbfq9&+S`TAHgIXOL@^|U3H6+Kx{LfiLDoGui2fn_QZ z+RAfbCC?!zV598M1ukPDNlcd|&s~;rSuaScTg>51N<+CcD&e9cI0_?GB_+!sgJaW* Q>5F$WjKgQvqmjKo0io7)d;kCd literal 0 HcmV?d00001 diff --git a/technic/textures/technic_hv_geothermal_side.png b/technic/textures/technic_hv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..629f2b4952d9380fa2c83fe1dab8954c003e9df2 GIT binary patch literal 854 zcmV-c1F8IpP)+;s4y`%-CbcI8JGt5{0NGr63iG#0uE85@o>#kl64DeFh!`fy4^2 zs@Njb9Uzqj;!YZ(R%(*c+8$qL#xv*4VbcXdd{6NIqW8*+0kes;F-@6+kOc1$N|8Lb z$Li=0qW%D+Ab7{-n>Tp$)fcGPLU4%m;7Yjl-a9-zJ*6y45*xF*HDEj*(d+d{;+SkY zrO0!(w|DT~qm(3@jJbXM7%i>khjN|sGg@582zl zfIeHG%ZEqMxx_MG((NX!@;Q@fhLVDORgkpXR8@tI4dd)FYhTmd*kC*wQ)Lr$oqPKI zXIK?ERn-t_%cq}w&SJ3w0>&7OF>DXd^Y+af>JL{>4I zF3IzP<#NftIp@$Clv2crWjS9EYKOL4=NL~iLI|{y4y)ygCIkS45CDV_@ZM9FHIebO ztic#fvim%;d~`-9ZIh-g>UBYp7kKCRFQpWOKr8JqT`Unov-tgIWYix}6a}tIK=8Dl@N_3Kh9r(C@{+$FKS4=JdigbU zJvu`TFS4#G?j0ZFn>8PN_%6-|M39v0f+UHFt);FUi`g70B*qvr|5wQb7CS0ViL6 g#_sjEaNphGA1}*X!c|XGuK)l507*qoM6N<$f(`+R!2kdN literal 0 HcmV?d00001 diff --git a/technic/textures/technic_hv_geothermal_top.png b/technic/textures/technic_hv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..c09c3961171fd7a777955e92f4c847f14274f905 GIT binary patch literal 873 zcmV-v1D5=WP)p|Su8v4Aa)z%%dwNIU{t z#HwP8P&QWmGDPYC(}olX}E@Lh-Pc1u+^Byo(O<@V7Ot#`!f6?bk;k;@!e z&Yoi5dy%Zj+2k4BZU?Q z28*I7XmyPcf~IMiFP5yLh?bVJ+HsX$f&t;UNTX|%5={0cBuUI`ufNH9ouGAtG0<@& zp7Icug>E%@mNV$}$ny+SYoxok&!5j`40?TfL66yN&Z95C0-y#I|F!?|M@(-WG8*++ zE*JQRw-M!X!Du+d^*#Jf2d(RW!T&LUQj&EN^ULXPNZTR%^)b>3C$zez#$q(=vs$Ng z-g}p;%?8JHu?1iZ(w4;QHU9Mjj*g~m^Mc^`6{H$ZsA`Qc7Q4Cy;Lgz$p%h^_qAs_1 zo`Z#9Q&beimf5qvaFil==?z33Es#>u=$f%BHF+y1vgkS`l4bVA~SURcy-w z&-1aBBKrOTQs*0*T7w0)EjT|v$59f!D@oHeuH#@kiYQtUU1r?8en6Jx3`YaxEJgN? z@1a}|-L?$70lKM4)09EKPgU)h?2S2JT~JnfCW5y_ye*nBOXsbKzIQHJ^X-5wo*7WmV$XlJVX(F0)HIzDK{;Ctj_| zvyA;4hZxgf0co1>@XvFka9w6+3rNRl=4#hjwd>9~?G2+4~r(I~=q9f~|7NfV?H zNXMbo8ri#hf>IWzr%wobA)QWu1^BMRcDtpj8D90n{!eyGWOV)_GXc+Vd7_Ava5eAE* zC}?$!5Q3&@navk0j24kS(NIc~s zEDPOg@+_y{?ULsirq)Pz?;3wUo6_(0=!RXU(-~iV`8EIL!N(7n+&W}9?6FwP@egk! z%Eg@FV1Vm;_?-?~*Zd!)B&%f2Z>N7CZHMgl$4Dm{)9RWUi{YTha+UJl`|onK+2FV? zwg8Ml+7ebP{DXatjwWpLg7Ekiq#BK>YK<@!ySfG7&d~&+6j3y!F1L7|gN0#JR20RQ z>9c=ulp=iT4MZK!ky6s=nzO}%Fbt8(rm89e-)9vsi7zg&ZHeb9wq=3m`PfPk|L_p0 z^9@a{!2;VBoS&cLD2d*cr0ELRaj+dl950D4Gj1O2lVv%BVIMh7k=^5aDAz-`ErTFL zH#KRR((m=CsvYCK5$DSb%1YDk^_b4)U|L+Ixbf*{*fMax*zfqbwhh8U*E?F%;<^rH zRpUA?0JYXAskr{!b<E`03G)$hM4mJoymeh3LG%4g%s|ex-kK%x=A8_t%W*t^4fO pF~Wl2g=1#leZ%4XchEmS;$LbfTeq_QedGWD002ovPDHLkV1iNyo#6lg literal 0 HcmV?d00001 diff --git a/technic/textures/technic_lv_geothermal_side.png b/technic/textures/technic_lv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..90fb4305ed6fa1ed7dd363d72d89d544234abfb3 GIT binary patch literal 809 zcmV+^1J?YBP)4%a1{*feJadebnrU_$bgajoe#yZ-j#rJ)7 z$2)vqQx+vkYmM?GWtlTOgBeGhbL2%%mSsd?NM025UB~I^InFtpHQYbE$6ALuH*Xf3w!26nLIT7zH#{&Fl=)S;OHe zr)_&yQHoNEd07AuLLh_yz&Xb-80Oir3N&G;aPxvpvo&cFlO!w5*wc4C&RYJ<^E_A< zR!K@xHwdAarUALQnZEC_GelvCA9(y9r4@LRu4{Sq@+ANgP({_Cw8B{jLNE*l5PU3W z`MBe2O%(d{-N1*3J)V^4AVg`;Lkht-O}x3i#mysMe)R>`Er>-jj6G2l5(WWgveadT z6cVj9&yF(GZhOr85ASfx!t>)3l0?#V2IVQzbd3bG_E?Z;CHUpn-&n;lS+-{C2h{I3 zH=G=AQ8V1#{*7^#zVF$r6Pm6gjzY?+V47y)B%v%ToVA33=J1#!Ltk^qOJ-{rrvWpL zFk9-nMl2wuBn(2N6i6YsxVRwOWSGe?JA)F^BMyE1D5h#Eq!1W0akSas`##E37;9;o nmT9uoP0PviV;=VhtXud8?}KOOJ+E^|00000NkvXXu0mjf%HDNr literal 0 HcmV?d00001 diff --git a/technic/textures/technic_lv_geothermal_top.png b/technic/textures/technic_lv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..601ff15fd8164b8168548e98772bbe80d9c05857 GIT binary patch literal 828 zcmV-C1H=4@P)J(Q8+g?f8*6&ZE(QrbV}A-5MdWN9++lfe`-_lB4>nC_v~9=X@Jy0KOlLEU85svduLt7L=W=Zr`W`7I*&-td z0_v(lDkTxFLs=GBM%ub2j$&RfuY{9;#eBvwKT%ySy!qlS){dBQi6-H$49S z8xIc;6vc_%en;I_guWz>Vye0!TVzapkGi^0lm*gtk)B7IrpWzvgHnF$NO3yhV)*j@4y}7m<(YT4cPJ&0XoC$TEAx2<(z04+ zNU1pH1mScq?^ZAthen;K($RtfrZGiGTthEe!_!s;i11KfQixb=3 zj?Y$0nz}$5Z7_OZz+s+FdC5z{Z@=Muz2f;k!Ue2F3dt$YnSB0+`};eZszwQcEYDXQ z2VCpW4+emD_jkBTk!5p+wjl^S94yzmqplk^kALAQg+H0#`cfdJWYhys`#o_SBbA`* zI-<#h{P@E0`57T3fv;%Vnj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og;QOHlTOdzQYd&EV2~m1fyuc^S@qldV0#?^Z+$i=;Ew} zTaLWQ8I3|#MaK0!MM*)iDhY=}nx?@I3`zQix@#G&t&v!_+0&vXoYgE5-P&IGwg zGU8}R6b)$WlCmi2tmVIyQs5keC}zIQ5kfONyF|uuL|K;D9>O5N^A-O`8x2ZQ6e|vI z-UMKKx`mF`2M8(YYzIP6RV^TRTaSCY;~7I3c$7uO<(t1zQnLTvHag7~sC_}*G(0~) zr|WCJ{OUfoa|kD?>XI-F2z;Nmu`CxEQb>$3oc#PJx>;G8x}kH9t<7zsNKzCnT4~~V zganLHI3z|3etGni!EnfUJi@y)=-ufiei)*AczOPUwzHIF$=WC)FA9cXz#^N|G(E#8 zVzJ2RtR?UbAAR~EN{{(^%Rj)=3Iy1;rSDqWwnYkw?|a}Jt+n``&&I|k!U4|l)2|QF zZPRgea6vjyw0Vo3XfB?-V(0x`mi0B|i-ueGjwrGvPQlhYTRc8_%H2=yP(Et-2aQ@` UMD^O=iU0rr07*qoM6N<$g5%VNbN~PV literal 0 HcmV?d00001 diff --git a/technic/textures/technic_mv_geothermal_top.png b/technic/textures/technic_mv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ba234284210bd29dab2cc292e1eb23836f1d4c GIT binary patch literal 858 zcmV-g1Eu_lP)5Vj z`R)b3JbQucO7yE}L97L`cvT}VEwUnKn`iWT z9>NxEw_Cz60%;hJBBWF-;{@fn^!l()Q_5IlSKEr=V2IJ0gDApaQ4|HOuCZ;KrfHeY z7u+qEw6yHYicPu(1IiLe(}Geqqw$C&S@GnZ_lV;Jts9I1&yl#w#kMSTtI4yRLBCI) zXBcCU{jkqpucr+90e!#EbUNetmtO%;1B(9~e(@QTvs1z_V6m7J9Yx4>ydivRh;kf^ zG1R*LH~c>XC?$!L6|?!Aqw$FAS2xIh->20zH5TD8;4V(_KKYo!xQ znC{6j=jRi4dBMHOA<_>$%35O^i>ht`xHz9+D@7EA)cYN->tJEn79~ZoWBU4U9HlsU zbPqe(tdUaE=$h-r0^j$MN>G+1y>6FydB^hh79k{VN3q)%xNaAr6feH}4O!)yrq*DA z5H>eAH#kb7t37EN({UVxqgXEQSgtc3o*a{9Im2*(bE}Z|Cu3B{MYk=(o{w&7(llid z1e9gPXnerU-7Wi4GYA5vvpJZSj#7N^>HFC6G$u|{jMkJ@NmZ5zVPgxMeOXcKmagj| zguue$?DUKv7}7Ki&%gN|Syv75gBhtOsJAsTl1zV^aWuY9CRXhJta#(eCB-Jg2snIr k$dAAN%;S&VWcNeGKiU*)TplaHGynhq07*qoM6N<$f{)aW;Q#;t literal 0 HcmV?d00001 diff --git a/technic/textures/technic_mv_geothermal_top_active.png b/technic/textures/technic_mv_geothermal_top_active.png new file mode 100644 index 0000000000000000000000000000000000000000..9362bf37722f07009b9860eb73839c5f359a3986 GIT binary patch literal 851 zcmV-Z1FZasP)3Bi&kZR6O9V<)zceYgR59_Q%&&{Bibc4#sS0-DO8TutZ9W%FlFH|Ww}Xe?a5 zeZjBaK1a0`X5ZihkA3^>(`U@C=j@9;u2hW1hpf{zowmoIKVTWH$kLSK2d7wD;{Zt# z^UdrllxPWN*9)$$u889m^TnKepV4V4{H{-y?+6b<+AWtnONo;hB?QWKu~mZ#-|V6t z#fukz;P-txoh}a0Zn^AsJBq3%Uab%`JUX9XOvx(QaB((4t|cmeSs^bS(mZ3ErF6R; zq>ya4TY?}2Wf_k`l+rAt80~s=d$3LtipU_!ZOL#j#2Ujv7-DhA^PI+12qCEJhS_|< z-Ev7o!@ellBx|ss9f`6HXe}6xN5t`pCvUw&6vY@*V=Z)Cg{M7)<6s&?mSzlkJ+dst zT8ruhJ^p?*Wzg%>^LtFEGrsuzOa9B#&z>?lJ0%GEEEaRZqY$-@HUw`B(XNZNmdaH8 zAFUNpyka(=b2J`t{qhFY>-jXMqQW5<_PL7^KKl4WHrp+3tA!MRwJ50|ifEr4bACQy zm*w1>9HRW7Ls1!obttO_fQ$19LTkb>pxW>7JQoMcHZREY9n)9;;A+juqkD*WvqmXJ zZ7Qx83w+;4X-QEOblYvBdJrvQVMQvZg922 zlzWmSqUE|sSF>E+v0SG-JUJ#!Glszc_g16sPsZq$hiMvyT_00dBuT=c-=`=_M&ko+ z?rzx^hC#p2bT$Xu(9)XsK6w`rO(UWt!5TwR7L-MSlma0I`=X>W4Q;Q3loAJrv(q#B z{ULQ-^WE1!psKPadN3pDNUCjx3Ki3zXB>_1lgbslze-+va!I~Pu@Vj+9`e&~zwr2j d*V+A8@-KksX`z@-e0cx>002ovPDHLkV1jmxgj@gs literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_hv_geothermal_side.png b/technic/textures/technicx32/technic_hv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..629f2b4952d9380fa2c83fe1dab8954c003e9df2 GIT binary patch literal 854 zcmV-c1F8IpP)+;s4y`%-CbcI8JGt5{0NGr63iG#0uE85@o>#kl64DeFh!`fy4^2 zs@Njb9Uzqj;!YZ(R%(*c+8$qL#xv*4VbcXdd{6NIqW8*+0kes;F-@6+kOc1$N|8Lb z$Li=0qW%D+Ab7{-n>Tp$)fcGPLU4%m;7Yjl-a9-zJ*6y45*xF*HDEj*(d+d{;+SkY zrO0!(w|DT~qm(3@jJbXM7%i>khjN|sGg@582zl zfIeHG%ZEqMxx_MG((NX!@;Q@fhLVDORgkpXR8@tI4dd)FYhTmd*kC*wQ)Lr$oqPKI zXIK?ERn-t_%cq}w&SJ3w0>&7OF>DXd^Y+af>JL{>4I zF3IzP<#NftIp@$Clv2crWjS9EYKOL4=NL~iLI|{y4y)ygCIkS45CDV_@ZM9FHIebO ztic#fvim%;d~`-9ZIh-g>UBYp7kKCRFQpWOKr8JqT`Unov-tgIWYix}6a}tIK=8Dl@N_3Kh9r(C@{+$FKS4=JdigbU zJvu`TFS4#G?j0ZFn>8PN_%6-|M39v0f+UHFt);FUi`g70B*qvr|5wQb7CS0ViL6 g#_sjEaNphGA1}*X!c|XGuK)l507*qoM6N<$f(`+R!2kdN literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_hv_geothermal_top.png b/technic/textures/technicx32/technic_hv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..c09c3961171fd7a777955e92f4c847f14274f905 GIT binary patch literal 873 zcmV-v1D5=WP)p|Su8v4Aa)z%%dwNIU{t z#HwP8P&QWmGDPYC(}olX}E@Lh-Pc1u+^Byo(O<@V7Ot#`!f6?bk;k;@!e z&Yoi5dy%Zj+2k4BZU?Q z28*I7XmyPcf~IMiFP5yLh?bVJ+HsX$f&t;UNTX|%5={0cBuUI`ufNH9ouGAtG0<@& zp7Icug>E%@mNV$}$ny+SYoxok&!5j`40?TfL66yN&Z95C0-y#I|F!?|M@(-WG8*++ zE*JQRw-M!X!Du+d^*#Jf2d(RW!T&LUQj&EN^ULXPNZTR%^)b>3C$zez#$q(=vs$Ng z-g}p;%?8JHu?1iZ(w4;QHU9Mjj*g~m^Mc^`6{H$ZsA`Qc7Q4Cy;Lgz$p%h^_qAs_1 zo`Z#9Q&beimf5qvaFil==?z33Es#>u=$f%BHF+y1vgkS`l4bVA~SURcy-w z&-1aBBKrOTQs*0*T7w0)EjT|v$59f!D@oHeuH#@kiYQtUU1r?8en6Jx3`YaxEJgN? z@1a}|-L?$70lKM4)09EKPgU)h?2S2JT~JnfCW5y_ye*nBOXsbKzIQHJ^X-5wo*7WmV$XlJVX(F0)HIzDK{;Ctj_| zvyA;4hZxgf0co1>@XvFka9w6+3rNRl=4#hjwd>9~?G2+4~r(I~=q9f~|7NfV?H zNXMbo8ri#hf>IWzr%wobA)QWu1^BMRcDtpj8D90n{!eyGWOV)_GXc+Vd7_Ava5eAE* zC}?$!5Q3&@navk0j24kS(NIc~s zEDPOg@+_y{?ULsirq)Pz?;3wUo6_(0=!RXU(-~iV`8EIL!N(7n+&W}9?6FwP@egk! z%Eg@FV1Vm;_?-?~*Zd!)B&%f2Z>N7CZHMgl$4Dm{)9RWUi{YTha+UJl`|onK+2FV? zwg8Ml+7ebP{DXatjwWpLg7Ekiq#BK>YK<@!ySfG7&d~&+6j3y!F1L7|gN0#JR20RQ z>9c=ulp=iT4MZK!ky6s=nzO}%Fbt8(rm89e-)9vsi7zg&ZHeb9wq=3m`PfPk|L_p0 z^9@a{!2;VBoS&cLD2d*cr0ELRaj+dl950D4Gj1O2lVv%BVIMh7k=^5aDAz-`ErTFL zH#KRR((m=CsvYCK5$DSb%1YDk^_b4)U|L+Ixbf*{*fMax*zfqbwhh8U*E?F%;<^rH zRpUA?0JYXAskr{!b<E`03G)$hM4mJoymeh3LG%4g%s|ex-kK%x=A8_t%W*t^4fO pF~Wl2g=1#leZ%4XchEmS;$LbfTeq_QedGWD002ovPDHLkV1iNyo#6lg literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_lv_geothermal_side.png b/technic/textures/technicx32/technic_lv_geothermal_side.png new file mode 100644 index 0000000000000000000000000000000000000000..90fb4305ed6fa1ed7dd363d72d89d544234abfb3 GIT binary patch literal 809 zcmV+^1J?YBP)4%a1{*feJadebnrU_$bgajoe#yZ-j#rJ)7 z$2)vqQx+vkYmM?GWtlTOgBeGhbL2%%mSsd?NM025UB~I^InFtpHQYbE$6ALuH*Xf3w!26nLIT7zH#{&Fl=)S;OHe zr)_&yQHoNEd07AuLLh_yz&Xb-80Oir3N&G;aPxvpvo&cFlO!w5*wc4C&RYJ<^E_A< zR!K@xHwdAarUALQnZEC_GelvCA9(y9r4@LRu4{Sq@+ANgP({_Cw8B{jLNE*l5PU3W z`MBe2O%(d{-N1*3J)V^4AVg`;Lkht-O}x3i#mysMe)R>`Er>-jj6G2l5(WWgveadT z6cVj9&yF(GZhOr85ASfx!t>)3l0?#V2IVQzbd3bG_E?Z;CHUpn-&n;lS+-{C2h{I3 zH=G=AQ8V1#{*7^#zVF$r6Pm6gjzY?+V47y)B%v%ToVA33=J1#!Ltk^qOJ-{rrvWpL zFk9-nMl2wuBn(2N6i6YsxVRwOWSGe?JA)F^BMyE1D5h#Eq!1W0akSas`##E37;9;o nmT9uoP0PviV;=VhtXud8?}KOOJ+E^|00000NkvXXu0mjf%HDNr literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_lv_geothermal_top.png b/technic/textures/technicx32/technic_lv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..601ff15fd8164b8168548e98772bbe80d9c05857 GIT binary patch literal 828 zcmV-C1H=4@P)J(Q8+g?f8*6&ZE(QrbV}A-5MdWN9++lfe`-_lB4>nC_v~9=X@Jy0KOlLEU85svduLt7L=W=Zr`W`7I*&-td z0_v(lDkTxFLs=GBM%ub2j$&RfuY{9;#eBvwKT%ySy!qlS){dBQi6-H$49S z8xIc;6vc_%en;I_guWz>Vye0!TVzapkGi^0lm*gtk)B7IrpWzvgHnF$NO3yhV)*j@4y}7m<(YT4cPJ&0XoC$TEAx2<(z04+ zNU1pH1mScq?^ZAthen;K($RtfrZGiGTthEe!_!s;i11KfQixb=3 zj?Y$0nz}$5Z7_OZz+s+FdC5z{Z@=Muz2f;k!Ue2F3dt$YnSB0+`};eZszwQcEYDXQ z2VCpW4+emD_jkBTk!5p+wjl^S94yzmqplk^kALAQg+H0#`cfdJWYhys`#o_SBbA`* zI-<#h{P@E0`57T3fv;%Vnjn}Ul;UQ+#?2OM#z6xhgv;S@VCZ{v-%yr0zULu4kK^%$ zKOQ&S+^q3@kJWmK>$=E~pFXi(F3`r1MlpIED9e)BbV}FtELRH-FVD1{W;UI&+3vs^ ze5I(W8aE6)^0LHgP1kqyU55}Zu5f9)o4_wXY1$q=TK)!i?r$2JWzDMq0000DW` zK~y-)b<9hS<3s>};oq(*+wmiDoJXSpO^a^Lx`mL~1N#w|K#02_xZP+L0|+|lB;9fB zPU3gDiUnKv4)8fY{rsa%(;02saX37aBoWiu3}Z&d!O-i0IP|$(8-~6|N=dfJ2!epR zs*p-agzHe21(uPvu8E_V*UKy6Bw#V0am-ItmkV#cc#E|oW*m9iZZO6o)71@+fBeqF z!vjTeVz=K>w-uo;iKCdRZpao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^%Rj)=3Iy1;rSDqWwnYkw?|a}Jt+n``&&I|k!U4|l)2|QF zZPRgea6vjyw0Vo3XfB?-V(0x`mi0B|i-ueGjwrGvPQlhYTRc8_%H2=yP(Et-2aQ@` UMD^O=iU0rr07*qoM6N<$g5%VNbN~PV literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_mv_geothermal_top.png b/technic/textures/technicx32/technic_mv_geothermal_top.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ba234284210bd29dab2cc292e1eb23836f1d4c GIT binary patch literal 858 zcmV-g1Eu_lP)5Vj z`R)b3JbQucO7yE}L97L`cvT}VEwUnKn`iWT z9>NxEw_Cz60%;hJBBWF-;{@fn^!l()Q_5IlSKEr=V2IJ0gDApaQ4|HOuCZ;KrfHeY z7u+qEw6yHYicPu(1IiLe(}Geqqw$C&S@GnZ_lV;Jts9I1&yl#w#kMSTtI4yRLBCI) zXBcCU{jkqpucr+90e!#EbUNetmtO%;1B(9~e(@QTvs1z_V6m7J9Yx4>ydivRh;kf^ zG1R*LH~c>XC?$!L6|?!Aqw$FAS2xIh->20zH5TD8;4V(_KKYo!xQ znC{6j=jRi4dBMHOA<_>$%35O^i>ht`xHz9+D@7EA)cYN->tJEn79~ZoWBU4U9HlsU zbPqe(tdUaE=$h-r0^j$MN>G+1y>6FydB^hh79k{VN3q)%xNaAr6feH}4O!)yrq*DA z5H>eAH#kb7t37EN({UVxqgXEQSgtc3o*a{9Im2*(bE}Z|Cu3B{MYk=(o{w&7(llid z1e9gPXnerU-7Wi4GYA5vvpJZSj#7N^>HFC6G$u|{jMkJ@NmZ5zVPgxMeOXcKmagj| zguue$?DUKv7}7Ki&%gN|Syv75gBhtOsJAsTl1zV^aWuY9CRXhJta#(eCB-Jg2snIr k$dAAN%;S&VWcNeGKiU*)TplaHGynhq07*qoM6N<$f{)aW;Q#;t literal 0 HcmV?d00001 diff --git a/technic/textures/technicx32/technic_mv_geothermal_top_active.png b/technic/textures/technicx32/technic_mv_geothermal_top_active.png new file mode 100644 index 0000000000000000000000000000000000000000..9362bf37722f07009b9860eb73839c5f359a3986 GIT binary patch literal 851 zcmV-Z1FZasP)3Bi&kZR6O9V<)zceYgR59_Q%&&{Bibc4#sS0-DO8TutZ9W%FlFH|Ww}Xe?a5 zeZjBaK1a0`X5ZihkA3^>(`U@C=j@9;u2hW1hpf{zowmoIKVTWH$kLSK2d7wD;{Zt# z^UdrllxPWN*9)$$u889m^TnKepV4V4{H{-y?+6b<+AWtnONo;hB?QWKu~mZ#-|V6t z#fukz;P-txoh}a0Zn^AsJBq3%Uab%`JUX9XOvx(QaB((4t|cmeSs^bS(mZ3ErF6R; zq>ya4TY?}2Wf_k`l+rAt80~s=d$3LtipU_!ZOL#j#2Ujv7-DhA^PI+12qCEJhS_|< z-Ev7o!@ellBx|ss9f`6HXe}6xN5t`pCvUw&6vY@*V=Z)Cg{M7)<6s&?mSzlkJ+dst zT8ruhJ^p?*Wzg%>^LtFEGrsuzOa9B#&z>?lJ0%GEEEaRZqY$-@HUw`B(XNZNmdaH8 zAFUNpyka(=b2J`t{qhFY>-jXMqQW5<_PL7^KKl4WHrp+3tA!MRwJ50|ifEr4bACQy zm*w1>9HRW7Ls1!obttO_fQ$19LTkb>pxW>7JQoMcHZREY9n)9;;A+juqkD*WvqmXJ zZ7Qx83w+;4X-QEOblYvBdJrvQVMQvZg922 zlzWmSqUE|sSF>E+v0SG-JUJ#!Glszc_g16sPsZq$hiMvyT_00dBuT=c-=`=_M&ko+ z?rzx^hC#p2bT$Xu(9)XsK6w`rO(UWt!5TwR7L-MSlma0I`=X>W4Q;Q3loAJrv(q#B z{ULQ-^WE1!psKPadN3pDNUCjx3Ki3zXB>_1lgbslze-+va!I~Pu@Vj+9`e&~zwr2j d*V+A8@-KksX`z@-e0cx>002ovPDHLkV1jmxgj@gs literal 0 HcmV?d00001 From a861362605c20ea8340dc9af049c5ea491bc9664 Mon Sep 17 00:00:00 2001 From: runningscissors Date: Tue, 14 Jul 2015 17:05:44 -0400 Subject: [PATCH 14/22] added multi-tier geothermal --- technic/machines/HV/geothermal.lua | 18 +++ technic/machines/HV/init.lua | 1 + technic/machines/LV/geothermal.lua | 116 +++---------------- technic/machines/LV/init.lua | 1 + technic/machines/LV/oldgeo.lua | 14 +++ technic/machines/MV/geothermal.lua | 35 ++++++ technic/machines/MV/init.lua | 1 + technic/machines/register/geothermal.lua | 139 +++++++++++++++++++++++ technic/machines/register/init.lua | 1 + 9 files changed, 223 insertions(+), 103 deletions(-) create mode 100644 technic/machines/HV/geothermal.lua create mode 100644 technic/machines/LV/oldgeo.lua create mode 100644 technic/machines/MV/geothermal.lua create mode 100644 technic/machines/register/geothermal.lua diff --git a/technic/machines/HV/geothermal.lua b/technic/machines/HV/geothermal.lua new file mode 100644 index 0000000..ec02b1f --- /dev/null +++ b/technic/machines/HV/geothermal.lua @@ -0,0 +1,18 @@ + +--- An HV geothermal EU generator +--- Using hot lava and water this device can create energy from steam + + + + +minetest.register_craft({ + output = 'technic:geothermal_hv 1', + recipe = { + {'technic:geothermal_mv', 'technic:geothermal_mv', 'technic:geothermal_mv'}, + {'technic:carbon_plate', 'technic:hv_transformer', 'technic:composite_plate'}, + {'', 'technic:hv_cable0', ''}, + } +}) + +technic.register_geothermal({tier="HV", power=100}) + diff --git a/technic/machines/HV/init.lua b/technic/machines/HV/init.lua index d7136b4..6c6637b 100644 --- a/technic/machines/HV/init.lua +++ b/technic/machines/HV/init.lua @@ -11,6 +11,7 @@ dofile(path.."/battery_box.lua") dofile(path.."/solar_array.lua") dofile(path.."/nuclear_reactor.lua") dofile(path.."/generator.lua") +dofile(path.."/geothermal.lua") -- Machines dofile(path.."/quarry.lua") diff --git a/technic/machines/LV/geothermal.lua b/technic/machines/LV/geothermal.lua index e88d3c9..bbb3186 100644 --- a/technic/machines/LV/geothermal.lua +++ b/technic/machines/LV/geothermal.lua @@ -1,111 +1,21 @@ --- A geothermal EU generator --- Using hot lava and water this device can create energy from steam --- The machine is only producing LV EUs and can thus not drive more advanced equipment --- The output is a little more than the coal burning generator (max 300EUs) -minetest.register_alias("geothermal", "technic:geothermal") -local S = technic.getter +--- A geothermal EU generator +--- Using hot lava and water this device can create energy from steam +--- The machine is only producing LV EUs and can thus not drive more advanced equipment +--- The output is a little more than the coal burning generator (max 300EUs) + minetest.register_craft({ - output = 'technic:geothermal', + output = 'technic:geothermal_lv 1', recipe = { - {'technic:granite', 'default:diamond', 'technic:granite'}, - {'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'}, - {'technic:granite', 'technic:lv_cable0', 'technic:granite'}, - } + {'technic:granite', 'default:diamond', 'technic:granite'}, + {'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'}, + {'technic:granite', 'technic:lv_cable0', 'technic:granite'}, + } }) -minetest.register_craftitem("technic:geothermal", { - description = S("Geothermal %s Generator"):format("LV"), -}) - -local check_node_around = function(pos) - local node = minetest.get_node(pos) - if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end - if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end - return 0 -end - -local run = function(pos, node) - local meta = minetest.get_meta(pos) - local water_nodes = 0 - local lava_nodes = 0 - local production_level = 0 - local eu_supply = 0 - - -- Correct positioning is water on one side and lava on the other. - -- The two cannot be adjacent because the lava the turns into obsidian or rock. - -- To get to 100% production stack the water and lava one extra block down as well: - -- WGL (W=Water, L=Lava, G=the generator, |=an LV cable) - -- W|L - - local positions = { - {x=pos.x+1, y=pos.y, z=pos.z}, - {x=pos.x+1, y=pos.y-1, z=pos.z}, - {x=pos.x-1, y=pos.y, z=pos.z}, - {x=pos.x-1, y=pos.y-1, z=pos.z}, - {x=pos.x, y=pos.y, z=pos.z+1}, - {x=pos.x, y=pos.y-1, z=pos.z+1}, - {x=pos.x, y=pos.y, z=pos.z-1}, - {x=pos.x, y=pos.y-1, z=pos.z-1}, - } - for _, p in pairs(positions) do - local check = check_node_around(p) - if check == 1 then water_nodes = water_nodes + 1 end - if check == 2 then lava_nodes = lava_nodes + 1 end - end - - if water_nodes == 1 and lava_nodes == 1 then production_level = 25; eu_supply = 50 end - if water_nodes == 2 and lava_nodes == 1 then production_level = 50; eu_supply = 100 end - if water_nodes == 1 and lava_nodes == 2 then production_level = 75; eu_supply = 200 end - if water_nodes == 2 and lava_nodes == 2 then production_level = 100; eu_supply = 300 end - - if production_level > 0 then - meta:set_int("LV_EU_supply", eu_supply) - end - - meta:set_string("infotext", - S("Geothermal %s Generator"):format("LV").." ("..production_level.."%)") - - if production_level > 0 and minetest.get_node(pos).name == "technic:geothermal" then - technic.swap_node (pos, "technic:geothermal_active") - return - end - if production_level == 0 then - technic.swap_node(pos, "technic:geothermal") - meta:set_int("LV_EU_supply", 0) - end -end - -minetest.register_node("technic:geothermal", { - description = S("Geothermal %s Generator"):format("LV"), - tiles = {"technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png", - "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, - paramtype2 = "facedir", - groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1}, - legacy_facedir_simple = true, - sounds = default.node_sound_wood_defaults(), - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("infotext", S("Geothermal %s Generator"):format("LV")) - meta:set_int("LV_EU_supply", 0) - end, - technic_run = run, -}) - -minetest.register_node("technic:geothermal_active", { - description = S("Geothermal %s Generator"):format("LV"), - tiles = {"technic_geothermal_top_active.png", "technic_machine_bottom.png", "technic_geothermal_side.png", - "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, - paramtype2 = "facedir", - groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, - legacy_facedir_simple = true, - sounds = default.node_sound_wood_defaults(), - drop = "technic:geothermal", - technic_run = run, -}) - -technic.register_machine("LV", "technic:geothermal", technic.producer) -technic.register_machine("LV", "technic:geothermal_active", technic.producer) +technic.register_geothermal({tier="LV", power=10}) +minetest.register_alias("geothermal", "technic:geothermal_lv") +minetest.register_alias("technic:geothermal", "technic:geothermal_lv") diff --git a/technic/machines/LV/init.lua b/technic/machines/LV/init.lua index 30523c9..24d9ffc 100644 --- a/technic/machines/LV/init.lua +++ b/technic/machines/LV/init.lua @@ -13,6 +13,7 @@ dofile(path.."/solar_array.lua") dofile(path.."/geothermal.lua") dofile(path.."/water_mill.lua") dofile(path.."/generator.lua") +dofile(path.."/oldgeo.lua") -- Machines dofile(path.."/alloy_furnace.lua") diff --git a/technic/machines/LV/oldgeo.lua b/technic/machines/LV/oldgeo.lua new file mode 100644 index 0000000..57a5d4f --- /dev/null +++ b/technic/machines/LV/oldgeo.lua @@ -0,0 +1,14 @@ + + +--- old non tiered one +--- A geothermal EU generator +--- Using hot lava and water this device can create energy from steam +--- The machine is only producing LV EUs and can thus not drive more advanced equipment +--- The output is a little more than the coal burning generator (max 300EUs) + + + + + +technic.register_geothermal({tier="LV", power=10, old=true}) + diff --git a/technic/machines/MV/geothermal.lua b/technic/machines/MV/geothermal.lua new file mode 100644 index 0000000..5f2f4dd --- /dev/null +++ b/technic/machines/MV/geothermal.lua @@ -0,0 +1,35 @@ + + +--- An MV geothermal EU generator +--- Using hot lava and water this device can create energy from steam + + + +minetest.register_craft({ + output = 'technic:geothermal_mv 1', + recipe = { + {'technic:geothermal_lv', 'technic:geothermal_lv', 'technic:geothermal_lv'}, + {'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'}, + {'', 'technic:mv_cable0', ''}, + } +}) + + +minetest.register_craft({ + output = 'technic:geothermal_mv 1', + recipe = { + {'technic:geothermal', 'technic:geothermal', 'technic:geothermal'}, + {'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'}, + {'', 'technic:mv_cable0', ''}, + } +}) + + + + + + +technic.register_geothermal({tier="MV", power=30}) + +-- compatibility alias for upgrading from old versions of technic +--minetest.register_alias("technic:geothermal_mv", "technic:geothermal_mv") diff --git a/technic/machines/MV/init.lua b/technic/machines/MV/init.lua index 72a98b6..84ea5e2 100644 --- a/technic/machines/MV/init.lua +++ b/technic/machines/MV/init.lua @@ -13,6 +13,7 @@ if technic.config:get_bool("enable_wind_mill") then end dofile(path.."/generator.lua") dofile(path.."/solar_array.lua") +dofile(path.."/geothermal.lua") -- Machines dofile(path.."/alloy_furnace.lua") diff --git a/technic/machines/register/geothermal.lua b/technic/machines/register/geothermal.lua new file mode 100644 index 0000000..0cb4544 --- /dev/null +++ b/technic/machines/register/geothermal.lua @@ -0,0 +1,139 @@ +local S = technic.getter + +function technic.register_geothermal(data) + local tier = data.tier + local ltier = string.lower(tier) + + local off_name = "technic:geothermal_"..ltier + local on_name = "technic:geothermal_active_"..ltier + + local texture_name = "technic_"..ltier .. "_geothermal" + + local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1} + local description = S("Geothermal %s Generator"):format(tier) + + if data.old then + + off_name = "technic:geothermal" + on_name = "technic:geothermal_active" + groups.not_in_creative_inventory=1 + description = "Old "..description + texture_name = "technic_geothermal" + end + + + local check_node_around = function(pos) + local node = minetest.get_node(pos) + if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end + if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end + return 0 + end + + + local run = function(pos, node) + local meta = minetest.get_meta(pos) + local water_nodes = 0 + local lava_nodes = 0 + local production_level = 0 + local eu_supply = 0 + + + + + + -- Correct positioning is water on one side and lava on the other. + -- The two cannot be adjacent because the lava the turns into obsidian or rock. + -- To get to 100% production stack the water and lava one extra block down as well: + -- WGL (W=Water, L=Lava, G=the generator, |=an LV cable) + -- W|L + + local positions = { + {x=pos.x+1, y=pos.y, z=pos.z}, + {x=pos.x+1, y=pos.y-1, z=pos.z}, + {x=pos.x-1, y=pos.y, z=pos.z}, + {x=pos.x-1, y=pos.y-1, z=pos.z}, + {x=pos.x, y=pos.y, z=pos.z+1}, + {x=pos.x, y=pos.y-1, z=pos.z+1}, + {x=pos.x, y=pos.y, z=pos.z-1}, + {x=pos.x, y=pos.y-1, z=pos.z-1}, + } + for _, p in pairs(positions) do + local check = check_node_around(p) + if check == 1 then water_nodes = water_nodes + 1 end + if check == 2 then lava_nodes = lava_nodes + 1 end + end + + if water_nodes == 1 and lava_nodes == 1 then production_level = 25; eu_supply = 5 * data.power end + if water_nodes == 2 and lava_nodes == 1 then production_level = 50; eu_supply = 10 * data.power end + if water_nodes == 1 and lava_nodes == 2 then production_level = 75; eu_supply = 20 * data.power end + if water_nodes == 2 and lava_nodes == 2 then production_level = 100; eu_supply = 30 * data.power end + + if production_level > 0 then + meta:set_int(tier.."_EU_supply", eu_supply) + end + + + + meta:set_string("infotext", description.." ("..production_level.."%) "..technic.prettynum(eu_supply) .." EU") + + + + + + + + + if production_level > 0 and minetest.get_node(pos).name == off_name then + technic.swap_node (pos, on_name) + return + end + if production_level == 0 then + technic.swap_node(pos, off_name) + meta:set_int(tier.."_EU_supply", 0) + end + end + + + if data.old then + + + else + + + + end + + minetest.register_node(off_name, { + description = description, + tiles = {texture_name.."_top.png", "technic_machine_bottom.png", texture_name.."_side.png", + texture_name.."_side.png", texture_name.."_side.png", texture_name.."_side.png"}, + paramtype2 = "facedir", + groups = groups, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Geothermal %s Generator"):format(tier)) + meta:set_int(tier.."_EU_supply", 0) + end, + technic_run = run, + }) + + minetest.register_node(on_name, { + description = description, + tiles = {texture_name.."_top_active.png", "technic_machine_bottom.png", texture_name.."_side.png", + texture_name.."_side.png", texture_name.."_side.png", texture_name.."_side.png"}, + paramtype2 = "facedir", + groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + drop = off_name, + technic_run = run, + }) + + + technic.register_machine(tier, off_name, technic.producer) + technic.register_machine(tier, on_name, technic.producer) + + +end diff --git a/technic/machines/register/init.lua b/technic/machines/register/init.lua index 1667d75..c3e51ea 100644 --- a/technic/machines/register/init.lua +++ b/technic/machines/register/init.lua @@ -9,6 +9,7 @@ dofile(path.."/battery_box.lua") -- Generators dofile(path.."/solar_array.lua") dofile(path.."/generator.lua") +dofile(path.."/geothermal.lua") -- API for machines dofile(path.."/recipes.lua") From 91e04b80f89523c1d77f5eba61a7f32e7d8c2369 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 11:53:27 +0200 Subject: [PATCH 15/22] added comments to some functions --- technic/machines/other/anchor.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index 1c15bd2..df8d576 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -2,6 +2,9 @@ local S = technic.getter local desc = S("Administrative World Anchor") +-- pos - position of the anchor node +-- meta - contains "radius" +-- return table of positions, one position per block local function compute_forceload_positions(pos, meta) local radius = meta:get_int("radius") local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) @@ -23,11 +26,15 @@ local function compute_forceload_positions(pos, meta) return flposes end +-- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded +-- return table of positions that are currently forceloaded local function currently_forceloaded_positions(meta) local ser = meta:get_string("forceloaded") return ser == "" and {} or minetest.deserialize(ser) end +-- turns off forceloading for all positions in the table +-- meta - contains "forceloaded" (used by currently_forceloaded_positions) local function forceload_off(meta) local flposes = currently_forceloaded_positions(meta) meta:set_string("forceloaded", "") @@ -36,6 +43,9 @@ local function forceload_off(meta) end end +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forcedloaded" +-- pos - position of the anchor node +-- meta - contains "radius" (to be read) and "forceloaded" (to be written) local function forceload_on(pos, meta) local want_flposes = compute_forceload_positions(pos, meta) local have_flposes = {} From ae879c00304909d3d9a66a15338f700b1432eb6a Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 19:57:11 +0200 Subject: [PATCH 16/22] added automatic forceloading --- technic/machines/HV/quarry.lua | 78 +++++++++++++++++++++++++++---- technic/machines/other/anchor.lua | 20 +++++++- 2 files changed, 89 insertions(+), 9 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 0187a30..ee4f05a 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -13,6 +13,41 @@ local quarry_dig_above_nodes = 3 -- How far above the quarry we will dig nodes local quarry_max_depth = 100 local quarry_demand = 10000 +-- keeps the quarry and the full dig zone loaded +-- pos - the position of the quarry +-- pos1,pos2 - two opposite corner positions that mark the zone to force load +local function forceload_dig(pos, pos1, pos2) + if not technic.auto_forceloading_enabled then + return + end + local meta = minetest.get_meta(pos) + + minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) + maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) + + flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) + technic.forceload_on_flposes(flpos, meta) + print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +end + +-- keeps only the quarry loaded +local function forceload_purge(pos) + if not technic.auto_forceloading_enabled then + return + end + local meta = minetest.get_meta(pos) + flpos = technic.compute_forceload_positions_between_points(pos, pos) + technic.forceload_on_flposes(flpos, meta) + print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +end + +local function forceload_off(meta) + if not technic.auto_forceloading_enabled then + return + end + technic.forceload_off(meta) +end + local function set_quarry_formspec(meta) local radius = meta:get_int("size") local formspec = "size[6,4.3]".. @@ -78,6 +113,7 @@ local function quarry_handle_purge(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local i = 0 + forceload_purge(pos) for _,stack in ipairs(inv:get_list("cache")) do i = i + 1 if stack then @@ -107,21 +143,43 @@ local function quarry_run(pos, node) end if meta:get_int("enabled") and meta:get_int("HV_EU_input") >= quarry_demand and meta:get_int("purge_on") == 0 then + -- the direction the quarry faces local pdir = minetest.facedir_to_dir(node.param2) + -- the direction to the right of where the quarry faces local qdir = pdir.x == 1 and vector.new(0,0,-1) or (pdir.z == -1 and vector.new(-1,0,0) or (pdir.x == -1 and vector.new(0,0,1) or vector.new(1,0,0))) local radius = meta:get_int("size") local diameter = radius*2 + 1 - local startpos = vector.add(vector.add(vector.add(pos, - vector.new(0, quarry_dig_above_nodes, 0)), - pdir), - vector.multiply(qdir, -radius)) - local endpos = vector.add(vector.add(vector.add(startpos, - vector.new(0, -quarry_dig_above_nodes-quarry_max_depth, 0)), - vector.multiply(pdir, diameter-1)), - vector.multiply(qdir, diameter-1)) + -- the back left top corner of the digging zone + local startpos = vector.add( + vector.add( + vector.add( + pos, + vector.new(0, quarry_dig_above_nodes, 0) + ), + pdir + ), + vector.multiply(qdir, -radius) + ) + -- the forward right bottom corner of the digging zone + local endpos = vector.add( + vector.add( + vector.add( + startpos, + vector.new(0, -quarry_dig_above_nodes-quarry_max_depth, 0) + ), + vector.multiply(pdir, diameter-1) + ), + vector.multiply(qdir, diameter-1) + ) + + --TEST +-- print("DEBUG: startpos = (" .. startpos.x .. "," .. startpos.y .. "," .. startpos.z .. ")") +-- print("DEBUG: endpos = (" .. endpos.x .. "," .. endpos.y .. "," .. endpos.z .. ")") + forceload_dig(pos, startpos, endpos) + local vm = VoxelManip() local minpos, maxpos = vm:read_from_map(startpos, endpos) local area = VoxelArea:new({MinEdge=minpos, MaxEdge=maxpos}) @@ -236,6 +294,10 @@ minetest.register_node("technic:quarry", { set_quarry_formspec(meta) set_quarry_demand(meta) end, + on_destruct = function (pos) + local meta = minetest.get_meta(pos) + forceload_off(meta) + end, after_place_node = function(pos, placer, itemstack) local meta = minetest.get_meta(pos) meta:set_string("owner", placer:get_player_name()) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index df8d576..cdc906c 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -2,6 +2,9 @@ local S = technic.getter local desc = S("Administrative World Anchor") +-- set to false to disable autoforceloading in other files, such as the quarry force loading itself and dig area +technic.auto_forceloading_enabled = true + -- pos - position of the anchor node -- meta - contains "radius" -- return table of positions, one position per block @@ -9,6 +12,12 @@ local function compute_forceload_positions(pos, meta) local radius = meta:get_int("radius") local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) local maxpos = vector.add(pos, vector.new(radius, radius, radius)) + return compute_forceload_positions_between_points(minpos, maxpos) +end + +-- minpos,maxpos - two opposite corner positions that mark the zone to force load; all coordinates in minpos have to be lower than the ones in maxpos +-- return table of positions, one position per block +local function compute_forceload_positions_between_points(minpos, maxpos) local minbpos = {} local maxbpos = {} for _, coord in ipairs({"x","y","z"}) do @@ -25,6 +34,7 @@ local function compute_forceload_positions(pos, meta) end return flposes end +technic.compute_forceload_positions_between_points = compute_forceload_positions_between_points -- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded -- return table of positions that are currently forceloaded @@ -32,6 +42,7 @@ local function currently_forceloaded_positions(meta) local ser = meta:get_string("forceloaded") return ser == "" and {} or minetest.deserialize(ser) end +technic.currently_forceloaded_positions = currently_forceloaded_positions -- turns off forceloading for all positions in the table -- meta - contains "forceloaded" (used by currently_forceloaded_positions) @@ -42,12 +53,18 @@ local function forceload_off(meta) minetest.forceload_free_block(p) end end +technic.forceload_off = forceload_off --- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forcedloaded" +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" -- pos - position of the anchor node -- meta - contains "radius" (to be read) and "forceloaded" (to be written) local function forceload_on(pos, meta) local want_flposes = compute_forceload_positions(pos, meta) + forceload_on_flposes(want_flposes, meta) + return +end + +local function forceload_on_flposes(want_flposes, meta) local have_flposes = {} for _, p in ipairs(want_flposes) do if minetest.forceload_block(p) then @@ -56,6 +73,7 @@ local function forceload_on(pos, meta) end meta:set_string("forceloaded", #have_flposes == 0 and "" or minetest.serialize(have_flposes)) end +technic.forceload_on_flposes = forceload_on_flposes local function set_display(pos, meta) meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc)) From c8febd809347bc0c3df641da9d23fde25c3b372e Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:15:43 +0200 Subject: [PATCH 17/22] disabled some debug output --- technic/machines/HV/quarry.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index ee4f05a..d9c707a 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -27,7 +27,7 @@ local function forceload_dig(pos, pos1, pos2) flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) technic.forceload_on_flposes(flpos, meta) - print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +-- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end -- keeps only the quarry loaded @@ -38,7 +38,7 @@ local function forceload_purge(pos) local meta = minetest.get_meta(pos) flpos = technic.compute_forceload_positions_between_points(pos, pos) technic.forceload_on_flposes(flpos, meta) - print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) +-- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end local function forceload_off(meta) From 768a229e508fe5671f1b1367367f02d32980c04c Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:33:56 +0200 Subject: [PATCH 18/22] made lasers 10x more precise --- technic/tools/mining_lasers.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 4c83ae9..476d774 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -132,7 +132,11 @@ local function laser_shoot(player, range, particle_texture, sound) texture = particle_texture .. "^[transform" .. math.random(0, 7), }) minetest.sound_play(sound, {pos = player_pos, max_hear_distance = range}) - for pos in rayIter(start_pos, dir, range) do + --rayIter is integer math... so make it more precise by multiplying pos and range here + start_pos_10x = vector.multiply(start_pos, 10) + for pos in rayIter(start_pos_10x, dir, range*10) do + --reverse the above multiplying here + pos = vector.multiply(pos, 0.1) if minetest.is_protected(pos, player_name) then minetest.record_protection_violation(pos, player_name) break From cec59b2e42c1217914f662ea183bccc395a86d22 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Thu, 16 Jul 2015 23:50:56 +0200 Subject: [PATCH 19/22] fixed some undeclared variable warnings --- technic/machines/HV/quarry.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index d9c707a..bd914a4 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -22,10 +22,10 @@ local function forceload_dig(pos, pos1, pos2) end local meta = minetest.get_meta(pos) - minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) - maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) + local minpos = vector.new(math.min(pos.x, pos1.x, pos2.x), math.min(pos.y, pos1.y, pos2.y), math.min(pos.z, pos1.z, pos2.z)) + local maxpos = vector.new(math.max(pos.x, pos1.x, pos2.x), math.max(pos.y, pos1.y, pos2.y), math.max(pos.z, pos1.z, pos2.z)) - flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) + local flpos = technic.compute_forceload_positions_between_points(minpos, maxpos) technic.forceload_on_flposes(flpos, meta) -- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end @@ -36,7 +36,7 @@ local function forceload_purge(pos) return end local meta = minetest.get_meta(pos) - flpos = technic.compute_forceload_positions_between_points(pos, pos) + local flpos = technic.compute_forceload_positions_between_points(pos, pos) technic.forceload_on_flposes(flpos, meta) -- print("DEBUG: forceload_dig(), currently forceloaded = " .. dump(technic.currently_forceloaded_positions(meta))) end From ab267d1e50f10a8dd58340a39637920e0d517eba Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Sun, 19 Jul 2015 23:22:19 +0200 Subject: [PATCH 20/22] moved compute_forceload_positions_between_points above compute_forceload_positions since apparently sometimes you need forward declaration --- technic/machines/other/anchor.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index cdc906c..b5f3f39 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -5,16 +5,6 @@ local desc = S("Administrative World Anchor") -- set to false to disable autoforceloading in other files, such as the quarry force loading itself and dig area technic.auto_forceloading_enabled = true --- pos - position of the anchor node --- meta - contains "radius" --- return table of positions, one position per block -local function compute_forceload_positions(pos, meta) - local radius = meta:get_int("radius") - local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) - local maxpos = vector.add(pos, vector.new(radius, radius, radius)) - return compute_forceload_positions_between_points(minpos, maxpos) -end - -- minpos,maxpos - two opposite corner positions that mark the zone to force load; all coordinates in minpos have to be lower than the ones in maxpos -- return table of positions, one position per block local function compute_forceload_positions_between_points(minpos, maxpos) @@ -36,6 +26,16 @@ local function compute_forceload_positions_between_points(minpos, maxpos) end technic.compute_forceload_positions_between_points = compute_forceload_positions_between_points +-- pos - position of the anchor node +-- meta - contains "radius" +-- return table of positions, one position per block +local function compute_forceload_positions(pos, meta) + local radius = meta:get_int("radius") + local minpos = vector.subtract(pos, vector.new(radius, radius, radius)) + local maxpos = vector.add(pos, vector.new(radius, radius, radius)) + return compute_forceload_positions_between_points(minpos, maxpos) +end + -- meta - contains "forceloaded", which is a serialized table of positions that are currently forceloaded -- return table of positions that are currently forceloaded local function currently_forceloaded_positions(meta) From ab9122b8503705cf3053aaa312a8f963e8187a60 Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Mon, 20 Jul 2015 00:00:38 +0200 Subject: [PATCH 21/22] fixed another forward declaration issue --- technic/machines/other/anchor.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index b5f3f39..0b2b100 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -55,15 +55,6 @@ local function forceload_off(meta) end technic.forceload_off = forceload_off --- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" --- pos - position of the anchor node --- meta - contains "radius" (to be read) and "forceloaded" (to be written) -local function forceload_on(pos, meta) - local want_flposes = compute_forceload_positions(pos, meta) - forceload_on_flposes(want_flposes, meta) - return -end - local function forceload_on_flposes(want_flposes, meta) local have_flposes = {} for _, p in ipairs(want_flposes) do @@ -75,6 +66,15 @@ local function forceload_on_flposes(want_flposes, meta) end technic.forceload_on_flposes = forceload_on_flposes +-- computes the forceload positions (using compute_forceload_positions) and tries to force load all of them, and records them in meta "forceloaded" +-- pos - position of the anchor node +-- meta - contains "radius" (to be read) and "forceloaded" (to be written) +local function forceload_on(pos, meta) + local want_flposes = compute_forceload_positions(pos, meta) + forceload_on_flposes(want_flposes, meta) + return +end + local function set_display(pos, meta) meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc)) meta:set_string("formspec", From c4bf3bdae0771445bd6e467d7faa49832fdf5cae Mon Sep 17 00:00:00 2001 From: Peter Maloney Date: Sat, 5 Sep 2015 07:53:57 +0200 Subject: [PATCH 22/22] just indentation to make some vector.xxx easier to read --- technic/machines/HV/quarry.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index bd914a4..f4a89b7 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -196,10 +196,16 @@ local function quarry_run(pos, node) local rq = math.floor(ndl / diameter) local rp = ndl % diameter if rq % 2 == 1 then rp = diameter - 1 - rp end - local digpos = vector.add(vector.add(vector.add(startpos, - vector.new(0, -ry, 0)), - vector.multiply(pdir, rp)), - vector.multiply(qdir, rq)) + local digpos = vector.add( + vector.add( + vector.add( + startpos, + vector.new(0, -ry, 0) + ), + vector.multiply(pdir, rp) + ), + vector.multiply(qdir, rq) + ) local can_dig = true if can_dig and minetest.is_protected and minetest.is_protected(digpos, owner) then can_dig = false