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 0000000..6d6df09 Binary files /dev/null and b/mods/mapgen/textures/mapgen_blue_ground_flower.png differ 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 0000000..a908415 Binary files /dev/null and b/mods/mapgen/textures/mapgen_pink_ground_flower.png differ 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 0000000..d8609d0 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_graveller.png differ 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 0000000..b54bbe7 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_graveller_active.png differ diff --git a/mods/stm_nodes/textures/stm_nodes_graveller_back.png b/mods/stm_nodes/textures/stm_nodes_graveller_back.png new file mode 100644 index 0000000..c83d901 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_graveller_back.png differ diff --git a/mods/stm_nodes/textures/stm_nodes_graveller_front.png b/mods/stm_nodes/textures/stm_nodes_graveller_front.png new file mode 100644 index 0000000..37751d0 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_graveller_front.png differ diff --git a/mods/stm_nodes/textures/stm_nodes_graveller_top.png b/mods/stm_nodes/textures/stm_nodes_graveller_top.png new file mode 100644 index 0000000..6849024 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_graveller_top.png differ diff --git a/mods/stm_nodes/textures/stm_nodes_hopper.png b/mods/stm_nodes/textures/stm_nodes_hopper.png new file mode 100644 index 0000000..670f285 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_hopper.png differ 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 0000000..c4eaf49 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_hopper_bottom.png differ diff --git a/mods/stm_nodes/textures/stm_nodes_hopper_top.png b/mods/stm_nodes/textures/stm_nodes_hopper_top.png new file mode 100644 index 0000000..5440866 Binary files /dev/null and b/mods/stm_nodes/textures/stm_nodes_hopper_top.png differ