diff --git a/mods/bonfire/init.lua b/mods/bonfire/init.lua index b1a016c..bc78a20 100644 --- a/mods/bonfire/init.lua +++ b/mods/bonfire/init.lua @@ -28,6 +28,7 @@ realtest.add_bonfire_fuel("ores:peat") minetest.register_node("bonfire:self", { description = "Bonfire", tiles = {"bonfire_top.png", "bonfire_bottom.png", "bonfire_side.png"}, + particle_image = {"bonfire_bottom.png"}, drawtype = "nodebox", paramtype = "light", node_box = { @@ -68,6 +69,7 @@ minetest.register_node("bonfire:self", { minetest.register_node("bonfire:self_active", { description = "Bonfire", tiles = {"bonfire_top_active.png", "bonfire_bottom.png", "bonfire_side_active.png"}, + particle_image = {"bonfire_bottom.png"}, drawtype = "nodebox", paramtype = "light", node_box = { diff --git a/mods/decorations/init.lua b/mods/decorations/init.lua index 1327165..57ba733 100644 --- a/mods/decorations/init.lua +++ b/mods/decorations/init.lua @@ -5,6 +5,7 @@ minetest.register_node("decorations:malachite_block", { description = "Malachite Block", tiles = {"decorations_malachite.png"}, + particle_image = {"minerals_malachite.png"}, is_ground_content = true, drop = "minerals:malachite 4", groups = {cracky=3,drop_on_dig=1}, @@ -26,6 +27,7 @@ minetest.register_node("decorations:malachite_pyramid", { }, }, tiles = {"decorations_malachite.png"}, + particle_image = {"minerals_malachite.png"}, is_ground_content = true, groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), @@ -155,6 +157,7 @@ minetest.register_node("decorations:malachite_cylinder", { }, }, tiles = {"decorations_malachite.png"}, + particle_image = {"minerals_malachite.png"}, is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), diff --git a/mods/default/init.lua b/mods/default/init.lua index 2cb37a5..929ec68 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -263,6 +263,7 @@ end minetest.register_node("default:stone", { description = "Stone", tiles = {"default_stone.png"}, + particle_image = {"default_cobble.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, drop = { @@ -291,6 +292,7 @@ minetest.register_node("default:stone", { minetest.register_node("default:desert_stone", { description = "Desert Stone", tiles = {"default_desert_stone.png"}, + particle_image = {"default_desert_stone.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, sounds = default.node_sound_stone_defaults(), @@ -299,6 +301,7 @@ minetest.register_node("default:desert_stone", { minetest.register_node("default:stone_flat", { description = "Flat Stone", tiles = {"default_stone_flat.png"}, + particle_image = {"default_stone_flat.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, sounds = default.node_sound_stone_defaults(), @@ -307,6 +310,7 @@ minetest.register_node("default:stone_flat", { minetest.register_node("default:desert_stone_flat", { description = "Desert Flat Stone", tiles = {"default_desert_stone_flat.png"}, + particle_image = {"default_desert_stone_flat.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, sounds = default.node_sound_stone_defaults(), @@ -315,6 +319,7 @@ minetest.register_node("default:desert_stone_flat", { minetest.register_node("default:cobbleblock_flat", { description = "Stone Brick Block", tiles = {"default_cobbleblock_flat.png"}, + particle_image = {"default_cobble.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, sounds = default.node_sound_stone_defaults(), @@ -323,6 +328,7 @@ minetest.register_node("default:cobbleblock_flat", { minetest.register_node("default:dirt_with_grass", { description = "Dirt with Grass", tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, + particle_image = {"default_dirt.png"}, is_ground_content = true, groups = {crumbly=3,drop_on_dig=1}, drop = "default:dirt", @@ -334,6 +340,7 @@ minetest.register_node("default:dirt_with_grass", { minetest.register_node("default:dirt", { description = "Dirt", tiles = {"default_dirt.png"}, + particle_image = {"default_dirt.png"}, is_ground_content = true, groups = {crumbly=3,drop_on_dig=1}, sounds = default.node_sound_dirt_defaults(), @@ -342,6 +349,7 @@ minetest.register_node("default:dirt", { minetest.register_node("default:sand", { description = "Sand", tiles = {"default_sand.png"}, + particle_image = {"default_sand.png"}, is_ground_content = true, groups = {crumbly=3, falling_node=1,drop_on_dig=1}, sounds = default.node_sound_sand_defaults(), @@ -350,6 +358,7 @@ minetest.register_node("default:sand", { minetest.register_node("default:desert_sand", { description = "Desert Sand", tiles = {"default_desert_sand.png"}, + particle_image = {"default_desert_sand.png"}, is_ground_content = true, groups = {sand=1, crumbly=3, falling_node=1,drop_on_dig=1}, sounds = default.node_sound_sand_defaults(), @@ -358,6 +367,7 @@ minetest.register_node("default:desert_sand", { minetest.register_node("default:gravel", { description = "Gravel", tiles = {"default_gravel.png"}, + particle_image = {"default_gravel.png"}, is_ground_content = true, groups = {crumbly=2, falling_node=1,drop_on_dig=1}, sounds = default.node_sound_dirt_defaults({ @@ -368,6 +378,7 @@ minetest.register_node("default:gravel", { minetest.register_node("default:sandstone", { description = "Sandstone", tiles = {"default_sandstone.png"}, + particle_image = {"default_sandstone.png"}, is_ground_content = true, groups = {crumbly=2,cracky=2,drop_on_dig=1}, drop = "default:sand", @@ -377,6 +388,7 @@ minetest.register_node("default:sandstone", { minetest.register_node("default:sand_with_clay", { description = "Clay", tiles = {"default_sand.png^default_clay.png"}, + particle_image = {"default_clay_lump.png"}, is_ground_content = true, groups = {crumbly=3,drop_on_dig=1}, drop = "default:clay_lump 4", @@ -388,6 +400,7 @@ minetest.register_node("default:sand_with_clay", { minetest.register_node("default:dirt_with_clay", { description = "Clay", tiles = {"default_dirt.png^default_clay.png"}, + particle_image = {"default_clay_lump.png"}, is_ground_content = true, groups = {crumbly=3}, drop = "default:clay_lump 4", @@ -399,6 +412,7 @@ minetest.register_node("default:dirt_with_clay", { minetest.register_node("default:dirt_with_grass_and_clay", { description = "Clay", tiles = {"default_grass.png", "default_dirt.png^default_clay.png", "default_dirt.png^default_clay.png^default_grass_side.png"}, + particle_image = {"default_clay_lump.png"}, is_ground_content = true, groups = {crumbly=3}, drop = "default:clay_lump 4", @@ -411,6 +425,7 @@ minetest.register_node("default:dirt_with_grass_and_clay", { minetest.register_node("default:brick", { description = "Brick Block", tiles = {"default_brick.png"}, + particle_image = {"default_clay_brick.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, drop = "default:clay_brick 4", @@ -442,6 +457,7 @@ minetest.register_node("default:papyrus", { description = "Papyrus", drawtype = "plantlike", tiles = {"default_papyrus.png"}, + particle_image = {"default_papyrus.png"}, inventory_image = "default_papyrus.png", wield_image = "default_papyrus.png", paramtype = "light", @@ -456,6 +472,7 @@ minetest.register_node("default:glass", { drawtype = "glasslike", tiles = {"default_glass.png"}, inventory_image = minetest.inventorycube("default_glass.png"), + particle_image = {"default_glass.png"}, paramtype = "light", sunlight_propagates = true, is_ground_content = true, @@ -467,6 +484,7 @@ minetest.register_node("default:rail", { description = "Rail", drawtype = "raillike", tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"}, + particle_image = {"default_rail.png"}, inventory_image = "default_rail.png", wield_image = "default_rail.png", paramtype = "light", @@ -484,6 +502,7 @@ minetest.register_node("default:ladder", { description = "Ladder", drawtype = "signlike", tiles = {"default_ladder.png"}, + particle_image = {"default_wood.png"}, inventory_image = "default_ladder.png", wield_image = "default_ladder.png", paramtype = "light", @@ -788,6 +807,7 @@ minetest.register_node("default:chest_locked", { minetest.register_node("default:cobbleblock", { description = "Block of Cobble", tiles = {"default_cobbleblock.png"}, + particle_image = {"default_cobble.png"}, is_ground_content = true, drop = "default:cobble 9", groups = {crumbly=2, oddly_breakable_by_hand=1, falling_node=1, drop_on_dig=1}, @@ -814,6 +834,7 @@ minetest.register_node("default:dry_shrub", { visual_scale = 1.0, tiles = {"default_dry_shrub.png"}, inventory_image = "default_dry_shrub.png", + particle_image = {"default_dry_shrub.png"}, wield_image = "default_dry_shrub.png", paramtype = "light", walkable = false, diff --git a/mods/furnace/init.lua b/mods/furnace/init.lua index 5635fc5..12f8b04 100644 --- a/mods/furnace/init.lua +++ b/mods/furnace/init.lua @@ -30,6 +30,7 @@ furnace.formspec = minetest.register_node("furnace:self", { description = "Furnace", tiles = {"furnace_top.png", "furnace_bottom.png", "furnace_side.png"}, + particle_image = {"furnace_top.png"}, drawtype = "nodebox", paramtype = "light", node_box = { @@ -77,6 +78,7 @@ minetest.register_node("furnace:self", { minetest.register_node("furnace:self_active", { description = "Furnace", tiles = {"furnace_top_active.png", "furnace_bottom.png", "furnace_side_active.png"}, + particle_image = {"furnace_top_active.png"}, drawtype = "nodebox", paramtype = "light", node_box = { diff --git a/mods/instruments/textures/instruments_saw_aluminium.png b/mods/instruments/textures/instruments_saw_aluminium.png new file mode 100644 index 0000000..00edec2 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_aluminium.png differ diff --git a/mods/instruments/textures/instruments_saw_aluminium_head.png b/mods/instruments/textures/instruments_saw_aluminium_head.png new file mode 100644 index 0000000..e3e9c45 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_aluminium_head.png differ diff --git a/mods/instruments/textures/instruments_saw_bismuth.png b/mods/instruments/textures/instruments_saw_bismuth.png new file mode 100644 index 0000000..8a1467d Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bismuth.png differ diff --git a/mods/instruments/textures/instruments_saw_bismuth_bronze.png b/mods/instruments/textures/instruments_saw_bismuth_bronze.png new file mode 100644 index 0000000..6ae9e2a Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bismuth_bronze.png differ diff --git a/mods/instruments/textures/instruments_saw_bismuth_bronze_head.png b/mods/instruments/textures/instruments_saw_bismuth_bronze_head.png new file mode 100644 index 0000000..b785c47 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bismuth_bronze_head.png differ diff --git a/mods/instruments/textures/instruments_saw_bismuth_head.png b/mods/instruments/textures/instruments_saw_bismuth_head.png new file mode 100644 index 0000000..7dcc24e Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bismuth_head.png differ diff --git a/mods/instruments/textures/instruments_saw_black_bronze.png b/mods/instruments/textures/instruments_saw_black_bronze.png new file mode 100644 index 0000000..fbee8ba Binary files /dev/null and b/mods/instruments/textures/instruments_saw_black_bronze.png differ diff --git a/mods/instruments/textures/instruments_saw_black_bronze_head.png b/mods/instruments/textures/instruments_saw_black_bronze_head.png new file mode 100644 index 0000000..8b55873 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_black_bronze_head.png differ diff --git a/mods/instruments/textures/instruments_saw_black_steel.png b/mods/instruments/textures/instruments_saw_black_steel.png new file mode 100644 index 0000000..347da07 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_black_steel.png differ diff --git a/mods/instruments/textures/instruments_saw_black_steel_head.png b/mods/instruments/textures/instruments_saw_black_steel_head.png new file mode 100644 index 0000000..40f34c5 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_black_steel_head.png differ diff --git a/mods/instruments/textures/instruments_saw_bronze.png b/mods/instruments/textures/instruments_saw_bronze.png new file mode 100644 index 0000000..f2b72f4 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bronze.png differ diff --git a/mods/instruments/textures/instruments_saw_bronze_head.png b/mods/instruments/textures/instruments_saw_bronze_head.png new file mode 100644 index 0000000..ce9a5f8 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_bronze_head.png differ diff --git a/mods/instruments/textures/instruments_saw_copper.png b/mods/instruments/textures/instruments_saw_copper.png new file mode 100644 index 0000000..cc6661b Binary files /dev/null and b/mods/instruments/textures/instruments_saw_copper.png differ diff --git a/mods/instruments/textures/instruments_saw_copper_head.png b/mods/instruments/textures/instruments_saw_copper_head.png new file mode 100644 index 0000000..fe4b8f3 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_copper_head.png differ diff --git a/mods/instruments/textures/instruments_saw_rose_gold.png b/mods/instruments/textures/instruments_saw_rose_gold.png new file mode 100644 index 0000000..93b6a1a Binary files /dev/null and b/mods/instruments/textures/instruments_saw_rose_gold.png differ diff --git a/mods/instruments/textures/instruments_saw_rose_gold_head.png b/mods/instruments/textures/instruments_saw_rose_gold_head.png new file mode 100644 index 0000000..f4b59be Binary files /dev/null and b/mods/instruments/textures/instruments_saw_rose_gold_head.png differ diff --git a/mods/instruments/textures/instruments_saw_steel.png b/mods/instruments/textures/instruments_saw_steel.png new file mode 100644 index 0000000..cc7eb87 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_steel.png differ diff --git a/mods/instruments/textures/instruments_saw_steel_head.png b/mods/instruments/textures/instruments_saw_steel_head.png new file mode 100644 index 0000000..7b9822b Binary files /dev/null and b/mods/instruments/textures/instruments_saw_steel_head.png differ diff --git a/mods/instruments/textures/instruments_saw_stone.png b/mods/instruments/textures/instruments_saw_stone.png new file mode 100644 index 0000000..9bcac6b Binary files /dev/null and b/mods/instruments/textures/instruments_saw_stone.png differ diff --git a/mods/instruments/textures/instruments_saw_stone_head.png b/mods/instruments/textures/instruments_saw_stone_head.png new file mode 100644 index 0000000..5ae623d Binary files /dev/null and b/mods/instruments/textures/instruments_saw_stone_head.png differ diff --git a/mods/instruments/textures/instruments_saw_tin.png b/mods/instruments/textures/instruments_saw_tin.png new file mode 100644 index 0000000..a7ae626 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_tin.png differ diff --git a/mods/instruments/textures/instruments_saw_tin_head.png b/mods/instruments/textures/instruments_saw_tin_head.png new file mode 100644 index 0000000..23d6f48 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_tin_head.png differ diff --git a/mods/instruments/textures/instruments_saw_wrought_iron.png b/mods/instruments/textures/instruments_saw_wrought_iron.png new file mode 100644 index 0000000..67d5495 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_wrought_iron.png differ diff --git a/mods/instruments/textures/instruments_saw_wrought_iron_head.png b/mods/instruments/textures/instruments_saw_wrought_iron_head.png new file mode 100644 index 0000000..453efb2 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_wrought_iron_head.png differ diff --git a/mods/instruments/textures/instruments_saw_zinc.png b/mods/instruments/textures/instruments_saw_zinc.png new file mode 100644 index 0000000..0a108f6 Binary files /dev/null and b/mods/instruments/textures/instruments_saw_zinc.png differ diff --git a/mods/instruments/textures/instruments_saw_zinc_head.png b/mods/instruments/textures/instruments_saw_zinc_head.png new file mode 100644 index 0000000..529600e Binary files /dev/null and b/mods/instruments/textures/instruments_saw_zinc_head.png differ diff --git a/mods/metals/init.lua b/mods/metals/init.lua index 24730c7..65bc995 100644 --- a/mods/metals/init.lua +++ b/mods/metals/init.lua @@ -106,6 +106,7 @@ for i=1, #metals.list do minetest.register_node("metals:"..metals.list[i].."_block", { description = "Block of "..metals.desc_list[i], tiles = {"metals_"..metals.list[i].."_block.png"}, + particle_image = {"metals_"..metals.list[i].."_block.png"}, is_ground_content = true, drop = "metals:"..metals.list[i].."_doubleingot", groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,drop_on_dig=1}, diff --git a/mods/ores/init.lua b/mods/ores/init.lua index 44e51dd..1322fe7 100644 --- a/mods/ores/init.lua +++ b/mods/ores/init.lua @@ -51,6 +51,7 @@ for i,ore in ipairs(ores.list) do minetest.register_node("ores:"..ore, { description = ores.desc_list[i], tile_images = {"default_stone.png^ores_"..ore..".png"}, + particle_image = {"ores_"..ore..".png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, drop = { @@ -72,6 +73,7 @@ end minetest.register_node("ores:native_copper_desert", { description = "Native copper ore", tile_images = {"default_desert_stone.png^ores_native_copper.png"}, + particle_image = {"ores_native_copper.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, drop = { @@ -92,6 +94,7 @@ minetest.register_node("ores:native_copper_desert", { minetest.register_node("ores:native_gold_desert", { description = "Native gold ore", tile_images = {"default_desert_stone.png^ores_native_gold.png"}, + particle_image = {"ores_native_gold.png"}, is_ground_content = true, groups = {cracky=3,drop_on_dig=1}, drop = { @@ -112,6 +115,7 @@ minetest.register_node("ores:native_gold_desert", { minetest.register_node("ores:peat", { description = "Peat", tile_images = {"ores_peat.png"}, + particle_image = {"ores_peat.png"}, is_ground_content = true, groups = {crumbly=3,drop_on_dig=1}, sounds = default.node_sound_stone_defaults(), diff --git a/mods/particles/init.lua b/mods/particles/init.lua new file mode 100644 index 0000000..ecebe70 --- /dev/null +++ b/mods/particles/init.lua @@ -0,0 +1,93 @@ +minetest.register_entity("particles:particle", { + physical = true, + collisionbox = {0,0,0,0,0,0}, + timer = 0, + timer2 = 0, + on_activate = function(self, staticdata) + local obj = self.object + obj:setacceleration({x=0, y=-5, z=0}) + local dx = (math.random(0,60)-30)/30 + local dy = (math.random(0,60))/30 + local dz = (math.random(0,60)-30)/30 + obj:setvelocity({x=dx, y=dy, z=dz}) + obj:setyaw(math.random(0,359)/180*math.pi) + self.timer = math.random(0, 6)/3 + end, + on_step = function(self, dtime) + self.timer2 = self.timer2+dtime + if self.timer2 >= 0.5 then + if self.object:getvelocity().y == 0 then + self.object:setvelocity({x=0, y=0, z=0}) + end + self.timer2 = 0 + end + self.timer = self.timer+dtime + if self.timer >= 3 then + self.object:remove() + end + end, +}) + +minetest.register_on_dignode(function(pos, oldnode, digger) + local node = minetest.registered_nodes[oldnode.name] + if not node or node.groups.no_particles or not digger then + return + end + local tmp + if digger ~= nil then + tmp = minetest.get_node_drops(oldnode.name, digger:get_wielded_item():get_name()) + end + if type(tmp) == "string" then + node = minetest.registered_nodes[tmp] + elseif type(tmp) == "table" and tmp[1] and tmp[1].get_name then + node = minetest.registered_nodes[tmp[1]:get_name()] + end + if node == nil then + node = minetest.registered_nodes[oldnode.name] + -- prevent unwanted effects + if node == nil then + return + end + end + for i=1,15 do + if node.particle_image then + local dx = (math.random(0,10)-5)/10 + local dy = (math.random(0,10)-5)/10 + local dz = (math.random(0,10)-5)/10 + + local obj = minetest.env:add_entity({x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}, "particles:particle") + + local vis_size = math.random(5,15)/100 + obj:set_properties({ + textures = node.particle_image, + visual_size = {x=vis_size, y=vis_size}, + }) + end + + end +end) + +minetest.register_entity("particles:smoke", { + physical = true, + visual_size = {x=0.25, y=0.25}, + collisionbox = {0,0,0,0,0,0}, + visual = "sprite", + textures = {"smoke_puff.png"}, + on_step = function(self, dtime) + self.object:setacceleration({x=0, y=0.5, z=0}) + self.timer = self.timer + dtime + if self.timer > 3 then + self.object:remove() + end + end, + timer = 0, +}) + +minetest.register_abm({ + nodenames = {"group:smokes"}, + interval = 0.5, + chance = 1, + action = function(pos) + minetest.env:add_entity({x=pos.x+math.random()*0.5-0.25,y=pos.y+0.3,z=pos.z+math.random()*0.5-0.25}, "particles:smoke") + end, +})