Change a bit of TNT
This commit is contained in:
parent
b2e0b10214
commit
eaf5841824
@ -1,6 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
# [Sep 29th - **STILL UNDER DEVELOPMENT** 2024] World Update
|
||||
# [Sep 29th - **STILL UNDER DEVELOPMENT** 2024] Update: World Update
|
||||
|
||||
This update completely breaks the API and game lol.
|
||||
|
||||
|
@ -56,7 +56,7 @@ PyuTest.get_neighbours = function(pos)
|
||||
}
|
||||
end
|
||||
|
||||
PyuTest.create_explosion = function (pos, range, rm_pos, dmg, creator, dmg_creator)
|
||||
PyuTest.create_explosion = function (pos, range, rm_pos, dmg)
|
||||
if rm_pos then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
@ -65,7 +65,7 @@ PyuTest.create_explosion = function (pos, range, rm_pos, dmg, creator, dmg_creat
|
||||
if minetest.get_node(p).name == "pyutest_blocks:tnt" then
|
||||
minetest.after(0.8, function()
|
||||
minetest.remove_node(p)
|
||||
PyuTest.create_explosion(p, range, rm_pos, dmg, creator, dmg_creator)
|
||||
PyuTest.create_explosion(p, range, rm_pos, dmg)
|
||||
end)
|
||||
else
|
||||
minetest.dig_node(p)
|
||||
@ -73,21 +73,12 @@ PyuTest.create_explosion = function (pos, range, rm_pos, dmg, creator, dmg_creat
|
||||
end)
|
||||
|
||||
for _, v in pairs(minetest.get_objects_inside_radius(pos, range)) do
|
||||
if creator ~= nil then
|
||||
if v ~= creator then
|
||||
v:punch(creator, nil, {
|
||||
damage_groups = {fleshy = dmg}
|
||||
}, nil)
|
||||
end
|
||||
|
||||
if dmg_creator and v == creator then
|
||||
v:punch(creator, nil, {
|
||||
damage_groups = {fleshy = dmg}
|
||||
}, nil)
|
||||
end
|
||||
end
|
||||
v:punch(v, nil, {
|
||||
damage_groups = {fleshy = dmg}
|
||||
}, nil)
|
||||
end
|
||||
|
||||
|
||||
local r = range
|
||||
local minpos = {x = pos.x - r, y = pos.y - r, z = pos.z - r}
|
||||
local maxpos = {x = pos.x + r, y = pos.y + r, z = pos.z + r}
|
||||
|
@ -89,7 +89,7 @@ PyuTest.make_node("pyutest_blocks:tnt", "TNT", {
|
||||
if minetest.get_node(pos).name ~= "pyutest_blocks:tnt" then
|
||||
return
|
||||
end
|
||||
PyuTest.create_explosion(pos, 3, true, 7, clicker, true)
|
||||
PyuTest.create_explosion(pos, 3, true, 12)
|
||||
end)
|
||||
end,
|
||||
|
||||
@ -98,7 +98,7 @@ PyuTest.make_node("pyutest_blocks:tnt", "TNT", {
|
||||
if minetest.get_node(pos).name ~= "pyutest_blocks:tnt" then
|
||||
return
|
||||
end
|
||||
PyuTest.create_explosion(pos, 3, true, 7)
|
||||
PyuTest.create_explosion(pos, 3, true, 12)
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user