Skip to content

Commit

Permalink
Ores: add damage from magma. Closes #1343
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Oct 6, 2024
1 parent f01d15e commit 5a7473c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
52 changes: 32 additions & 20 deletions mods/lord/Blocks/lord_ores/init.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
local S = minetest.get_translator("lord_ores")

local mod_path = minetest.get_modpath(minetest.get_current_modname())
dofile(mod_path .. "/rock_ores.lua")

minetest.register_node("lord_ores:magma", {
description = S("Magma"),
groups = { rock = 1, cracky = 2, },
paramtype = "light",
light_source = 4,
sounds = default.node_sound_stone_defaults(),
tiles = {
{
name = "lord_ores_magma.png",
animation = {
type = "vertical_frames",
aspect_w = 32,
aspect_h = 32,
length = 1.5
minetest.mod(function(mod)
require('rock_ores')


local S = minetest.get_translator('lord_ores')

minetest.register_node("lord_ores:magma", {
description = S("Magma"),
groups = { rock = 1, cracky = 2, },
paramtype = "light",
light_source = 4,
sounds = default.node_sound_stone_defaults(),
tiles = {
{
name = "lord_ores_magma.png",
animation = {
type = "vertical_frames",
aspect_w = 32,
aspect_h = 32,
length = 1.5
}
}
}
},
})
},
walkable = false,
liquidtype = "source",
liquid_alternative_source = "lord_ores:magma",
liquid_alternative_flowing = "lord_ores:magma",
liquid_range = 0,
move_resistance = 15,
damage_per_second = 4,
damage_groups = { fire = true, },
})
end)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local S = minetest.get_translator("lord_ores")


for name, registration in pairs(rocks.get_lord_nodes()) do
local stripped_name = name:replace("lord_rocks:", "")
local rock_texture = minetest.registered_nodes[name].tiles[1]
Expand Down

0 comments on commit 5a7473c

Please sign in to comment.