1
0
Fork 0

Remove legacy stuff in mcl_mobs

This commit is contained in:
Wuzzy 2020-01-30 16:17:29 +01:00
parent c234b273ad
commit fcf46b3423
3 changed files with 1 additions and 19 deletions

View File

@ -56,7 +56,6 @@ local mobs_drop_items = minetest.settings:get_bool("mobs_drop_items") ~= false
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
local creative = minetest.settings:get_bool("creative_mode") local creative = minetest.settings:get_bool("creative_mode")
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
-- TODO
local remove_far = false local remove_far = false
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0 local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
local show_health = false local show_health = false
@ -2742,12 +2741,6 @@ local mob_staticdata = function(self)
self.following = nil self.following = nil
self.state = "stand" self.state = "stand"
-- used to rotate older mobs
if self.drawtype
and self.drawtype == "side" then
self.rotate = math.rad(90)
end
if use_cmi then if use_cmi then
self.serialized_cmi_components = cmi.serialize_components(self._cmi_components) self.serialized_cmi_components = cmi.serialize_components(self._cmi_components)
end end
@ -3187,7 +3180,6 @@ minetest.register_entity(name, {
spawn_small_alternative = def.spawn_small_alternative, spawn_small_alternative = def.spawn_small_alternative,
do_custom = def.do_custom, do_custom = def.do_custom,
jump_height = def.jump_height or 4, -- was 6 jump_height = def.jump_height or 4, -- was 6
drawtype = def.drawtype, -- DEPRECATED, use rotate instead
rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2 rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2
lifetimer = def.lifetimer or 57.73, lifetimer = def.lifetimer or 57.73,
hp_min = scale_difficulty(def.hp_min, 5, 1), hp_min = scale_difficulty(def.hp_min, 5, 1),
@ -3686,14 +3678,6 @@ function mobs:register_arrow(name, def)
end end
-- compatibility function
function mobs:explosion(pos, radius)
local self = {sounds = {}}
self.sounds.explode = "tnt_explode"
mobs:boom(self, pos, radius)
end
-- no damage to nodes explosion -- no damage to nodes explosion
function mobs:safe_boom(self, pos, radius) function mobs:safe_boom(self, pos, radius)

View File

@ -459,8 +459,6 @@ This function registers a spawn egg which can be used by admin to properly spawn
Explosion Function Explosion Function
------------------ ------------------
mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead
mobs:boom(self, pos, radius) mobs:boom(self, pos, radius)
'self' mob entity 'self' mob entity
'pos' centre position of explosion 'pos' centre position of explosion

View File

@ -93,7 +93,7 @@ mobs:register_arrow("mobs_mc:potion_arrow", {
-- node hit, bursts into flame -- node hit, bursts into flame
hit_node = function(self, pos, node) hit_node = function(self, pos, node)
--mobs:explosion(pos, 1, 1, 0) --TODO
end end
}) })