Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
329b088d1c | ||
|
0c4c6d79c3 | ||
|
b008c3d819 | ||
|
95ebd6ab85 | ||
|
aa71d13511 | ||
|
8e3fc0a7ed | ||
|
bda65b0c4b |
20
init.lua
20
init.lua
@@ -163,9 +163,8 @@ local function entity_physics(pos, radius, drops)
|
||||
|
||||
local damage = (4 / dist) * radius
|
||||
if obj:is_player() then
|
||||
-- currently the engine has no method to set
|
||||
-- player velocity. See #2960
|
||||
-- instead, we knock the player back 1.0 node, and slightly upwards
|
||||
-- we knock the player back 1.0 node, and slightly upwards
|
||||
-- TODO: switch to add_player_velocity() introduced in 5.1
|
||||
local dir = vector.normalize(vector.subtract(obj_pos, pos))
|
||||
local moveoff = vector.multiply(dir, dist + 1.0)
|
||||
local newpos = vector.add(pos, moveoff)
|
||||
@@ -174,10 +173,13 @@ local function entity_physics(pos, radius, drops)
|
||||
|
||||
obj:set_hp(obj:get_hp() - damage)
|
||||
else
|
||||
local luaobj = obj:get_luaentity()
|
||||
|
||||
-- object might have disappeared somehow
|
||||
if luaobj then
|
||||
local do_damage = true
|
||||
local do_knockback = true
|
||||
local entity_drops = {}
|
||||
local luaobj = obj:get_luaentity()
|
||||
local objdef = minetest.registered_entities[luaobj.name]
|
||||
|
||||
if objdef and objdef.on_blast then
|
||||
@@ -202,6 +204,7 @@ local function entity_physics(pos, radius, drops)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function add_effects(pos, radius, drops)
|
||||
@@ -274,7 +277,7 @@ function tnt.burn(pos, nodename)
|
||||
def.on_ignite(pos)
|
||||
elseif minetest.get_item_group(name, "tnt") > 0 then
|
||||
minetest.swap_node(pos, {name = name .. "_burning"})
|
||||
minetest.sound_play("tnt_ignite", {pos = pos})
|
||||
minetest.sound_play("tnt_ignite", {pos = pos}, true)
|
||||
minetest.get_node_timer(pos):start(1)
|
||||
end
|
||||
end
|
||||
@@ -403,7 +406,7 @@ function tnt.boom(pos, def)
|
||||
end
|
||||
local sound = def.sound or "tnt_explode"
|
||||
minetest.sound_play(sound, {pos = pos, gain = 2.5,
|
||||
max_hear_distance = math.min(def.radius * 20, 128)})
|
||||
max_hear_distance = math.min(def.radius * 20, 128)}, true)
|
||||
local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection,
|
||||
def.ignore_on_blast, owner, def.explode_center)
|
||||
-- append entity drops
|
||||
@@ -541,7 +544,8 @@ minetest.register_node("tnt:gunpowder_burning", {
|
||||
-- unaffected by explosions
|
||||
on_blast = function() end,
|
||||
on_construct = function(pos)
|
||||
minetest.sound_play("tnt_gunpowder_burning", {pos = pos, gain = 2})
|
||||
minetest.sound_play("tnt_gunpowder_burning", {pos = pos,
|
||||
gain = 2}, true)
|
||||
minetest.get_node_timer(pos):start(1)
|
||||
end,
|
||||
})
|
||||
@@ -672,7 +676,7 @@ function tnt.register_tnt(def)
|
||||
-- unaffected by explosions
|
||||
on_blast = function() end,
|
||||
on_construct = function(pos)
|
||||
minetest.sound_play("tnt_ignite", {pos = pos})
|
||||
minetest.sound_play("tnt_ignite", {pos = pos}, true)
|
||||
minetest.get_node_timer(pos):start(4)
|
||||
minetest.check_for_falling(pos)
|
||||
end,
|
||||
|
4
locale/tnt.ms.tr
Normal file
4
locale/tnt.ms.tr
Normal file
@@ -0,0 +1,4 @@
|
||||
# textdomain: tnt
|
||||
Gun Powder=Serbuk Senjata Api
|
||||
TNT Stick=Batang TNT
|
||||
TNT=TNT
|
4
locale/tnt.ru.tr
Normal file
4
locale/tnt.ru.tr
Normal file
@@ -0,0 +1,4 @@
|
||||
# textdomain: tnt
|
||||
Gun Powder=Порох
|
||||
TNT Stick=Тротиловая Палка
|
||||
TNT=Тротил
|
4
locale/tnt.se.tr
Normal file
4
locale/tnt.se.tr
Normal file
@@ -0,0 +1,4 @@
|
||||
# textdomain: tnt
|
||||
Gun Powder=Krut
|
||||
TNT Stick=Dynamitpinne
|
||||
TNT=Dynamit
|
4
locale/tnt.zh_CN.tr
Normal file
4
locale/tnt.zh_CN.tr
Normal file
@@ -0,0 +1,4 @@
|
||||
# textdomain: tnt
|
||||
Gun Powder=火药粉
|
||||
TNT Stick=炸药棒
|
||||
TNT=炸药包
|
4
locale/tnt.zh_TW.tr
Normal file
4
locale/tnt.zh_TW.tr
Normal file
@@ -0,0 +1,4 @@
|
||||
# textdomain: tnt
|
||||
Gun Powder=火藥粉
|
||||
TNT Stick=炸藥棒
|
||||
TNT=炸藥包
|
Reference in New Issue
Block a user