From 9acb5dfb13732c0647fc2df99445d1230b4e2aae Mon Sep 17 00:00:00 2001 From: D00Med Date: Sat, 11 Mar 2017 10:05:27 +1000 Subject: [PATCH] gravellers --- mods/mapgen/mapgen.lua | 13 ++ mods/mapgen/nodes.lua | 57 ++++++ .../textures/mapgen_blue_ground_flower.png | Bin 0 -> 274 bytes .../textures/mapgen_pink_ground_flower.png | Bin 0 -> 267 bytes ...lower.png => mapgen_red_ground_flower.png} | Bin mods/stm_nodes/init.lua | 162 ++++++++++++++++++ .../textures/stm_nodes_graveller.png | Bin 0 -> 429 bytes .../textures/stm_nodes_graveller_active.png | Bin 0 -> 439 bytes .../textures/stm_nodes_graveller_back.png | Bin 0 -> 406 bytes .../textures/stm_nodes_graveller_front.png | Bin 0 -> 395 bytes .../textures/stm_nodes_graveller_top.png | Bin 0 -> 309 bytes mods/stm_nodes/textures/stm_nodes_hopper.png | Bin 0 -> 311 bytes .../textures/stm_nodes_hopper_bottom.png | Bin 0 -> 269 bytes .../textures/stm_nodes_hopper_top.png | Bin 0 -> 401 bytes 14 files changed, 232 insertions(+) create mode 100644 mods/mapgen/textures/mapgen_blue_ground_flower.png create mode 100644 mods/mapgen/textures/mapgen_pink_ground_flower.png rename mods/mapgen/textures/{red_ground_flower.png => mapgen_red_ground_flower.png} (100%) create mode 100644 mods/stm_nodes/textures/stm_nodes_graveller.png create mode 100644 mods/stm_nodes/textures/stm_nodes_graveller_active.png create mode 100644 mods/stm_nodes/textures/stm_nodes_graveller_back.png create mode 100644 mods/stm_nodes/textures/stm_nodes_graveller_front.png create mode 100644 mods/stm_nodes/textures/stm_nodes_graveller_top.png create mode 100644 mods/stm_nodes/textures/stm_nodes_hopper.png create mode 100644 mods/stm_nodes/textures/stm_nodes_hopper_bottom.png create mode 100644 mods/stm_nodes/textures/stm_nodes_hopper_top.png diff --git a/mods/mapgen/mapgen.lua b/mods/mapgen/mapgen.lua index e616316..272cebf 100644 --- a/mods/mapgen/mapgen.lua +++ b/mods/mapgen/mapgen.lua @@ -2119,6 +2119,19 @@ minetest.register_decoration({ height = 1, }) + --purple allium + + +minetest.register_decoration({ + deco_type = "simple", + place_on = "mapgen:dirt_with_leafygrass", + sidelen = 16, + fill_ratio = 0.02, + biomes = {"coniferous_forest_tall",}, + decoration = "mapgen:purple_allium", + height = 1, +}) + --ferns minetest.register_decoration({ diff --git a/mods/mapgen/nodes.lua b/mods/mapgen/nodes.lua index 4e49e05..c0cacea 100644 --- a/mods/mapgen/nodes.lua +++ b/mods/mapgen/nodes.lua @@ -59,6 +59,63 @@ mapgen.register_shrub("shrub", "Hog Peanut", "1") --plants (PLNT01) +minetest.register_node("mapgen:red_ground_flower", { + description = "Red Ground flower", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "mapgen_red_ground_flower.png", + }, + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.49,0.5} + } + }, + buildable_to = true, + groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 1, dig_immediate = 1, flower = 1}, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("mapgen:pink_ground_flower", { + description = "Pink Ground flower", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "mapgen_pink_ground_flower.png", + }, + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.49,0.5} + } + }, + buildable_to = true, + groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 1, dig_immediate = 1, flower = 1}, + sounds = default.node_sound_leaves_defaults() +}) + +minetest.register_node("mapgen:blue_ground_flower", { + description = "Blue Ground Flower", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "mapgen_blue_ground_flower.png", + }, + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.49,0.5} + } + }, + buildable_to = true, + groups = {snappy = 1, oddly_breakable_by_hand = 1, flammable = 1, dig_immediate = 1, flower = 1}, + sounds = default.node_sound_leaves_defaults() +}) + minetest.register_node("mapgen:dicksonia", { description = "Dicksonia", drawtype = "mesh", diff --git a/mods/mapgen/textures/mapgen_blue_ground_flower.png b/mods/mapgen/textures/mapgen_blue_ground_flower.png new file mode 100644 index 0000000000000000000000000000000000000000..6d6df09689704e3e4e327773442454cd00cd7be8 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkQ1FPS zi(`nz>Er~75(n)s7wR`I5dGg7dcNsG#fSgX?dMC*tJ!(z!`siwi*!?(4D)LD9s2O* zu4Y@mP8@V_;Y(S zkG%bzv>(MQS_@ws;p5)Ob|A^!`pt>|=l|Oo+C)7*+9AaKBiH^%e1mh}!}6EXZL{;g z8QA=;VXxMCz?0d(^1tN1{V5kFd`YSJ`k3$VYTk`cST}9Bf9StXndyJYHgN`q1A#$d U0gT?Of&O9eboFyt=akR{0M{mU+yDRo literal 0 HcmV?d00001 diff --git a/mods/mapgen/textures/mapgen_pink_ground_flower.png b/mods/mapgen/textures/mapgen_pink_ground_flower.png new file mode 100644 index 0000000000000000000000000000000000000000..a908415cf1884a420ec53da40419fd331d659079 GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP;jrO zi(`nz>Er~7k_UGeo&7(*H207HnkuoB-g>+LsXr<{s~?{J`+mo^37p4%?077Fc=qCW z36V2p1}7@GjP}gh)u|C~pj2$9bMw>x)0_A6%-5?)evpum6c8nL&SQ(X1Q6KS|2g{M zlv=Er+K8I1h zye9d_xev1&&uTX`o`0a<>@(9|*^^DfY4PWc-*)|B8`EesvzvV*Slr6fF5D+ MboFyt=akR{0Q?(lJ^%m! literal 0 HcmV?d00001 diff --git a/mods/mapgen/textures/red_ground_flower.png b/mods/mapgen/textures/mapgen_red_ground_flower.png similarity index 100% rename from mods/mapgen/textures/red_ground_flower.png rename to mods/mapgen/textures/mapgen_red_ground_flower.png diff --git a/mods/stm_nodes/init.lua b/mods/stm_nodes/init.lua index 5b504c0..d0e0f9e 100644 --- a/mods/stm_nodes/init.lua +++ b/mods/stm_nodes/init.lua @@ -1,4 +1,47 @@ + +minetest.register_node("stm_nodes:hopper", { + description = "Hopper", + tiles = { + "stm_nodes_hopper_top.png", + "stm_nodes_hopper_bottom.png", + "stm_nodes_hopper.png", + "stm_nodes_hopper.png", + "stm_nodes_hopper.png", + "stm_nodes_hopper.png" + }, + drawtype = "nodebox", + paramtype = "light", + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.1875, -0.3125, 0.3125, -0.125, 0.3125}, -- NodeBox14 + {-0.125, -0.5, -0.125, 0.125, -0.1875, 0.125}, -- NodeBox15 + {0.3125, -0.125, -0.375, 0.375, 0.5, 0.375}, -- NodeBox16 + {-0.375, -0.125, -0.375, -0.3125, 0.5, 0.375}, -- NodeBox17 + {-0.375, -0.125, -0.375, 0.375, 0.5, -0.3125}, -- NodeBox18 + {-0.375, -0.125, 0.3125, 0.375, 0.5, 0.375}, -- NodeBox19 + {-0.1875, -0.25, -0.1875, 0.1875, -0.1875, 0.1875}, -- NodeBox20 + } + }, + collision_box = { + type = "fixed", + fixed = { + {0.3125, -0.125, -0.375, 0.375, 0.5, 0.375}, -- NodeBox16 + {-0.375, -0.125, -0.375, -0.3125, 0.5, 0.375}, -- NodeBox17 + {-0.375, -0.125, -0.375, 0.375, 0.5, -0.3125}, -- NodeBox18 + {-0.375, -0.125, 0.3125, 0.375, 0.5, 0.375}, -- NodeBox19 + } + }, + groups = {cracky=1}, + sounds = default.node_sound_metal_defaults(), + on_rightclick = function(pos, node, clicker, itemstack) + minetest.add_item({x=pos.x, y=pos.y+0.5, z=pos.z}, itemstack) + itemstack:clear() + end +}) + + minetest.register_node("stm_nodes:chimney", { description = "Tin Chimney", tiles = { @@ -217,3 +260,122 @@ minetest.register_node("stm_nodes:pipe_lid", { }, sounds = default.node_sound_metal_defaults() }) + +minetest.register_node("stm_nodes:graveller", { + description = "Stone Grinder", + tiles = { + "stm_nodes_graveller_top.png", + "stm_nodes_graveller_top.png", + "stm_nodes_graveller.png", + "stm_nodes_graveller.png", + "stm_nodes_graveller_front.png", + "stm_nodes_graveller_front.png", + }, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, machine = 1}, + on_punch = function(pos, node) + minetest.set_node(pos, {name="stm_nodes:graveller_active", param2=node.param2}) + end, + sounds = default.node_sound_metal_defaults() +}) + +minetest.register_node("stm_nodes:graveller_active", { + tiles = { + "stm_nodes_graveller_top.png", + "stm_nodes_graveller_top.png", + "stm_nodes_graveller_active.png", + "stm_nodes_graveller_active.png", + "stm_nodes_graveller_back.png", + "stm_nodes_graveller_back.png", + }, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, machine = 1}, + drop = "stm_nodes:graveller", + on_punch = function(pos, node) + minetest.set_node(pos, {name="stm_nodes:graveller", param2=node.param2}) + end, + sounds = default.node_sound_metal_defaults() +}) + +minetest.register_node("stm_nodes:output_tray", { + description = "Collection Tray", + tiles = { + "stm_nodes_tin.png", + }, + drawtype = "nodebox", + paramtype = "light", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- NodeBox21 + {-0.5, -0.5, 0.4375, 0.5, -0.125, 0.5}, -- NodeBox22 + {-0.5, -0.5, -0.5, 0.5, -0.125, -0.4375}, -- NodeBox23 + {0.4375, -0.5, -0.5, 0.5, -0.125, 0.5}, -- NodeBox24 + {-0.5, -0.5, -0.5, -0.4375, -0.125, 0.5}, -- NodeBox25 + } + }, + groups = {cracky=1}, + sounds = default.node_sound_metal_defaults() +}) + +minetest.register_abm({ + nodenames = {"stm_nodes:graveller_active"}, + interval = 1, + chance = 1, + action = function(pos, node) + local input_pos = {x=pos.x, y=pos.y+1, z=pos.z} + local output_pos = minetest.find_node_near(pos, 1.5, {"stm_nodes:output_tray"}) + local n = { + {x=pos.x+1, y=pos.y, z=pos.z}, + {x=pos.x-1, y=pos.y, z=pos.z}, + {x=pos.x, y=pos.y, z=pos.z+1}, + {x=pos.x, y=pos.y, z=pos.z-1}, + {x=pos.x, y=pos.y+1, z=pos.z}, + } + local vent_pos = nil + + for _, position in ipairs(n) do + local item = minetest.get_node(position).name + if minetest.get_item_group(item, "ventilation") ~= 0 then + vent_pos = position + end + end + if vent_pos ~= nil then + if minetest.get_node(input_pos).name == "stm_nodes:hopper" then + local objects = minetest.get_objects_inside_radius(input_pos, 0.5) + for _, obj in ipairs(objects) do + if obj:get_luaentity().name == "__builtin:item" then + local input_item = obj:get_luaentity().itemstring + local itemname = ItemStack(input_item):get_name() + local itemcount = ItemStack(input_item):get_count() + if minetest.get_item_group(itemname, "cracky") ~= 0 then + obj:remove() + minetest.add_particlespawner({ + amount = 4, + time = itemcount/2, + minpos = {x=vent_pos.x-0.1, y=vent_pos.y+0.8, z=vent_pos.z-0.1}, + maxpos = {x=vent_pos.x+0.1, y=vent_pos.y+1, z=vent_pos.z+0.1}, + minvel = {x=-0.2, y=1, z=-0.2}, + maxvel = {x=0.2, y=3, z=0.2}, + minacc = {x=0, y=0.1, z=0}, + maxacc = {x=0, y=0.2, z=0}, + minexptime = 1, + maxexptime = 2, + minsize = 5, + maxsize = 10, + collisiondetection = false, + vertical = false, + texture = "stm_nodes_steam.png", + }) + minetest.after(itemcount/2, function() + minetest.add_item(output_pos, "default:gravel "..itemcount) + end) + end + end + end + end + end + end +}) \ No newline at end of file diff --git a/mods/stm_nodes/textures/stm_nodes_graveller.png b/mods/stm_nodes/textures/stm_nodes_graveller.png new file mode 100644 index 0000000000000000000000000000000000000000..d8609d0809bd5f4f22965d50c5f24c500863d0e5 GIT binary patch literal 429 zcmV;e0aE^nP)4H8=?x?QFYr5?uTk-24On z0DqN}lOPBkEY5}a1Fmos%0al?4H;T>kerFV>$AM!ee&de^XAFceTI727yfNT=vrSal_(4-534Y(Q{d9ewBJCwXMC>AqksDAA2XUI!a4-f!I zv6x{j=Z)>(U0-@vSbeQ(ek|vx^6a;RBnsCKc(}jC)AI{1&QAaURaJSs)db7s(j)A~ zVle{%yncMv+~Ab26(Yu%#woiMoA|smD0H!Y1+8@*U4O__)tsv#ZqhZ0Oci9Rptg^_ zsk_ixH~YXoW4AxVUhfdy{;>6f1#J#Yq7d110szRSlU6qdwmr8(5`}*@et$#LQ(Mgs X_-(1*CC&7`00000NkvXXu0mjfL>jfd literal 0 HcmV?d00001 diff --git a/mods/stm_nodes/textures/stm_nodes_graveller_active.png b/mods/stm_nodes/textures/stm_nodes_graveller_active.png new file mode 100644 index 0000000000000000000000000000000000000000..b54bbe7f8d150be3807863503ad5650f1d747db4 GIT binary patch literal 439 zcmV;o0Z9IdP){8nJ z1N=vJR)Qc1ffNZAR)O^gT;K>C3&(vFTO?``cG>eTg44WV-p-qy+1ag!>yvN68Dx|~ z6&e>}7cxrGWP&q{F*7z=^`o6O~8ltOR@VuFG*guVw#DFkN_oIw@3f|OEQ z-3StsV644!VErW16?8el8QMV`#0~z}XxIVy>%d*VTfru4xkFKfMwZN-p;mE!FNP|# z9UuUZESY007d2&7Xxv`)tq%aJua)J;a)DCC>l=i=R};7&-r(u^6_;m60D!VAE4;~R zEtks*VGd@=902h4{%N`MV_qvnwAS{DO+s!9zgx`mtlmPN=N8@lkWp$mH;1@EcS&TF zBHcc;=!&_;8u!3FV?3MUbTC9bn{NDIjRL0UPPd1Tmq&EEy~a5JK+7zJTOss4s6slR-+uKoo{Q%e2)HXAD$D3e5$gZpD>H5Rc#;1aIL9 zyn+k&LRaow2yxM61t~R!c1B5KEa;+6+O&yE-|D@e`Tv>!y*FzYrw3nw@3BgR-66t~ z+hLE!=6d15Z8gIqod6K{9)a&6q?Fv=cM8dtxVyEH!y}y#c847A`v}){OK-JADJ1~L zm<)?_f|3fMc3QwgsZS{-N~)}$7jYX+Dt|RfNrl^JX1RThjS7H{QwDFzlF$BVoYhuj zF@%17&H>kVo&1TL$6R@JenfvXCejJ-gO`~F9j7bpf|yJuIpFf_uyAzNj=en-NRnw` z;!oO7J>rk4pi>tFEw6OB0JPD|Q*i2nd0UIkwPEp!F=je%r;2iFnTXAQBO7B70LrPM z;}q#sXAAU`mo?Yo*?Wsb{xcyFc88nlR-|yFcd@|$Za7CHjxSll{Oa$9Do%^;4&NxPQZ!< z61!}=3{r(4m4ZzbOsNEmV7FBh3jHg4~D){-6ZXn%JJ&$T7Z3eHbsL>PvRw>qMf5&&b2$8v2^QX$mg z0C;GeQ%Z@F%I_DOgxwz7>mEu;McD26wNv9t0O)cGz(sNlK>wt_bZ9ajp^dJ+KHM0XjGKM5znvh@`aVMi?X}@qYG7>@3{!rh%PGT;YSy45 zNCr`3xB#@#t1bi`!QxosH(N_~__i^o@;hjG`9VkgI*KD3V=5a}&_ze$7u3!mTYmib3O+SpJQVIY9j$_uC%X9_;fFeykx=U_OC#(czyCba0M-QLlqk3;E{@_XIQ3b44kw?(XL0ob z9J`sNVuKWkf`cxmq}W;~{ilTEzWXn^^LS~sj2{348SqJ|z5uY^Y(0Rs8%$J2qB17K z9xlu#B`O0b;w8X92JH5SB4BQJ%O5lVPvqK-f1n?U+Buj{ zN5vGr0bG#IP2t3z-NcUo3rSQ~S=Cjm4$!nzjeu{}YFgVSJprB}hw=)G>WcsX002ov JPDHLkV1mKrd+`7O literal 0 HcmV?d00001 diff --git a/mods/stm_nodes/textures/stm_nodes_hopper_bottom.png b/mods/stm_nodes/textures/stm_nodes_hopper_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..c4eaf49774c6d9866cff4b23bee3fb64c08ad0a2 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP;kGe zi(`nz>9dnIay2U7C?khI0Zt@y%~&0l1EZQajby2Wg=tF(KfdxuPuv#)yG zQWm~%zU=b%-~YaQSH4ZpTmIYbx55fv_MU4D5o3_)Q|C^&lB1@iEGStha-rqrLYEYV z()$c8`;PxCS}VP3O+YGZ!|NM6`p*7c$Z%tg*nEbDn^#y5%7oUEq?qrZCmjzWICni?3|CmM=^^QWJAtoN^S-kXSSQ^Zdns?7uQC6U;ws&Rn)CQU~CK4A%<80#Ov-liNK8MfZ z>H|19FqptXETocBEWN$gL223u;-+UhIVZngzViqEI-GTKdvk38qF(n$!DN;KaCiUU z0H}I%IG!>bPdPj3Q#V_ShT|zf)o&O?y)KVWBSw=qo?l+k+EA1RfR-yLB`kBzAUfje z;b$%3LNQA*fzTmX!< zy9uIRw?QD{V64Shi-@zEV7-GlS#aDx0KoTJ0A%k407<&seuc>_B~CKJV4pDX$=-`f vc-U>@do7d_;v}mc>l?x4`QX>D{D0yD2gRgWWk#wq00000NkvXXu0mjf=)I)_ literal 0 HcmV?d00001