Improvements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
name = ip_more_fire
|
||||
title = More Fire
|
||||
depends = ip_explosives, fire, ip_vessels
|
||||
depends = ip_explosives, fire, ip_vessels, ip_destruction_counter
|
||||
description = Derivative of the More Fire mod by Nathan Salapat
|
||||
author = Nathan, Napiophelios, MCL
|
||||
optional_depends = ethereal
|
||||
|
||||
@@ -147,7 +147,13 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime)
|
||||
maxsize = 0.75,
|
||||
texture = 'more_fire_spark.png',
|
||||
})
|
||||
if self.timer>0.2 then
|
||||
|
||||
if node == "main:glass" then
|
||||
minetest.set_node(pos.z, {name = "air"})
|
||||
return
|
||||
end
|
||||
|
||||
if self.timer > 0.1 then
|
||||
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
|
||||
for k, obj in pairs(objs) do
|
||||
if obj:get_luaentity() ~= nil then
|
||||
@@ -172,7 +178,9 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime)
|
||||
self.object:remove()
|
||||
end
|
||||
else
|
||||
if self.node ~= '' then
|
||||
|
||||
|
||||
if self.node ~= '' and self.node ~= "main:glass" then
|
||||
minetest.sound_play('more_fire_shatter', {gain = 1.0})
|
||||
for dx=-2,2 do
|
||||
for dy=-2,2 do
|
||||
@@ -190,6 +198,7 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime)
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
destruction_counter.nodesDestroyed = destruction_counter.nodesDestroyed + 20
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -214,6 +223,7 @@ MORE_FIRE_MOLOTOV_ENTITY.on_step = function(self, dtime)
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
destruction_counter.nodesDestroyed = destruction_counter.nodesDestroyed + 20
|
||||
end
|
||||
end
|
||||
self.lastpos={x=pos.x, y=pos.y, z=pos.z}
|
||||
|
||||
@@ -79,6 +79,7 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime)
|
||||
if obj:get_luaentity() ~= nil then
|
||||
if obj:get_luaentity().name ~= 'more_fire:pipebomb_entity' and obj:get_luaentity().name ~= '__builtin:item' then
|
||||
if self.node ~= '' then
|
||||
minetest.sound_play('tnt_explode', {gain = 1.0})
|
||||
explosives.boom(pos, {radius = 5})
|
||||
local damage = 1
|
||||
obj:punch(self.object, 1.0, {
|
||||
@@ -93,13 +94,13 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime)
|
||||
|
||||
if node.name ~= 'air' then
|
||||
self.object:remove()
|
||||
|
||||
minetest.sound_play('tnt_explode', {gain = 1.0})
|
||||
explosives.boom(pos, {
|
||||
owner = playerWhoThrewObject
|
||||
})
|
||||
|
||||
minetest.add_particlespawner({
|
||||
amount = 64,
|
||||
amount = 256,
|
||||
time = 0.5,
|
||||
minpos = {x = pos.x - 2, y = pos.y - 2, z = pos.z - 2},
|
||||
maxpos = {x = pos.x + 2, y = pos.y + 2, z = pos.z + 2},
|
||||
@@ -109,8 +110,8 @@ MORE_FIRE_PIPEBOMB_ENTITY.on_step = function(self, dtime)
|
||||
maxacc = vector.new(),
|
||||
minexptime = 1,
|
||||
maxexptime = 2.5,
|
||||
minsize = 2,
|
||||
maxsize = 5,
|
||||
minsize = 4,
|
||||
maxsize = 7,
|
||||
texture = "tnt_smoke.png",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user