From 25c79435f70cb31cb178b216c9ecc0fa2924f04a Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Mon, 11 Nov 2019 16:46:09 -0800 Subject: [PATCH] Add forge node. Set up LBM to set meta after placing schem --- mods/mapgen/schems/structures/town1.mts | Bin 2369 -> 2392 bytes mods/nodes/init.lua | 12 +++++++++ mods/nodes/src/stations.nbe | Bin 1020 -> 1271 bytes mods/nodes/stations.lua | 33 ++++++++++++++++++++++-- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/mods/mapgen/schems/structures/town1.mts b/mods/mapgen/schems/structures/town1.mts index 0369e8d5ed9c24e982316381cbbc03696c0a0900..99d22f495dd72ae77a690ae6ea58f98e73405b18 100644 GIT binary patch delta 2037 zcmZXSdsI^C8piQd&dl+0=yJM{I$5bXO=>AhSy@>+>1Y=%47ZZ2i|Xb}a^YL040N zy}n&R`cn%m zPCjL)JRm!XZ=Sh8r=Pt^P-BQB4n~$1R{sXzL4K3UR%wzB_E0p7lkHd_>64fCEI^N_ zQ5Ay6ZMzHfIu+=Z@loCoS>_Q#lRwC*ddc7J6iTe%%7NFR66&=hHr+Lv*Rj=5qh5uh z^_+df%d{3KnkjJ2wRnX;O}Z3Ma%AyU*&sWPYDHNQ*h@&}|KNc1D+I&$^#mvYuGLL_ zRjS;Gv_fJ&)YO<_MY)>u6#L%tNB}=iq2xxc=^Qq+aAFwGZz7L*y8- ztgVR161c=EGUW%#yz3l0)qZ??m%DkOHsz`uRyxK?mH3RJ0sf^l?iY6#JWQ54;#uJ3 z795^$RU{fAUWHng8qNan>#Bq32Po$EI(rj~h9 zJW!NV})fWef#nZ^H zw&w^sObxVIw!*N8S zw9D0=`(#<*g6CW@eKqb z|00hWSDDhRaH`u)=|6b%5iD3^(c7Ad@)WM!Z9n=Kw;UiOXU9 zorr6aE!_}x=n{>o_wIb1G}R|+qQnGX?firIjo)8li&7+S zd-!|PX+vs4ykvJ(ZjJY?*zxl1*=e25(5&4{2cF0^p?W?gW|&esz;b8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T%|J6Qh{x$nHom~1U5O+d)4ZZf&e|yIdVX1=j z>_r&b4^a8Es|6+!o055zV19Im9nJYm>MTmHp$Aq}v_fON!Bd5U5ZUYR>?WCX6+6uD zKL{TzE~M*Jw>L$iL1>#`OZNZCf1Ul|PMXKEeTUpPKH|r{4m!zV)^;ZDKGTyMd)lFQXHoy!E?kvuA+0Mmb#;5| zO9w5zm}?40es^))j)EtzMvl8Ao=K7^W=$cFO|FX@?>frEkGpdkFn66* zybA{(MU7rPdfnV$zo*60TIy&`W_Qi>U=3lsHqKX|{l&O))(f1@E2y&kH)Y;UR$J!b z^101Tx$xmOHmlRE4+qRHof;GrW!F+n7e#w8J4W#~9-kGXT^b|jdE?5qpByJP;7A!!csCnz#6nE(I) diff --git a/mods/nodes/init.lua b/mods/nodes/init.lua index e926bd0..668b3cb 100644 --- a/mods/nodes/init.lua +++ b/mods/nodes/init.lua @@ -1,5 +1,17 @@ nodes = {} +minetest.register_lbm({ -- Loads nodes placed by schematics that have meta + label = "Load special nodes placed by schematics", + name = "nodes:loadspecialnodes", + nodenames = {"group:loadme"}, + run_at_every_load = true, + action = function(pos, node) + if minetest.get_meta(pos):get_int("loaded") ~= 0 then return end -- Already loaded + + minetest.registered_nodes[node.name].on_construct(pos) + end +}) + -- --- Include the rest of the mod's lua files -- diff --git a/mods/nodes/src/stations.nbe b/mods/nodes/src/stations.nbe index 155b53ce673a967e244daaf68d0cda582c2ca9e3..6e7113e706b4695c2b65fb3c4deecc782aa5d711 100644 GIT binary patch delta 77 zcmeyv{+)Az4bvH>iFPJTZp<4?t}}}I`MbC(q~#Z-r*Z}O2YZHi`uiyuPTYM!+EhW; VKo3el879W&rV2pzW(TG{i~zAX725y+ delta 24 gcmey)`G