forked from VoxeLibre/VoxeLibre
[mobs_mc] fix warnings
This commit is contained in:
parent
470f7b70bc
commit
335405f131
|
@ -83,7 +83,7 @@ mobs_mc.items = {
|
|||
water_source = "default:water_source",
|
||||
water_flowing = "default:water_flowing",
|
||||
river_water_source = "default:river_water_source",
|
||||
water_flowing = "default:river_water_flowing",
|
||||
--water_flowing = "default:river_water_flowing",
|
||||
black_dye = "dye:black",
|
||||
poppy = "flowers:rose",
|
||||
dandelion = "flowers:dandelion_yellow",
|
||||
|
@ -128,7 +128,6 @@ mobs_mc.items = {
|
|||
|
||||
nether_portal = "nether:portal",
|
||||
netherrack = "nether:rack",
|
||||
nether_brick_block = "nether:brick",
|
||||
|
||||
-- Wool (Minecraft color scheme)
|
||||
wool_white = "wool:white",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- NOTE: Strings intentionally not marked for translation, other mods already have these items.
|
||||
-- TODO: Remove this file eventually, all items here are already outsourced in other mods.
|
||||
|
||||
local S = minetest.get_translator("mobs_mc")
|
||||
--local S = minetest.get_translator("mobs_mc")
|
||||
|
||||
--maikerumines throwing code
|
||||
--arrow (weapon)
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
-- NOTE: Strings intentionally not marked for translation, other mods already have these items.
|
||||
-- TODO: Remove this file eventually, all items here are already outsourced in other mods.
|
||||
-- TODO: Add translation.
|
||||
|
||||
local S = minetest.get_translator("mobs_mc")
|
||||
--local S = minetest.get_translator("mobs_mc")
|
||||
|
||||
-- Heads system
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ mobs:register_mob("mobs_mc:blaze", {
|
|||
xp_max = 10,
|
||||
tilt_fly = false,
|
||||
hostile = true,
|
||||
rotate = 270,
|
||||
--rotate = 270,
|
||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3},
|
||||
rotate = -180,
|
||||
visual = "mesh",
|
||||
|
|
|
@ -24,7 +24,6 @@ mobs:register_mob("mobs_mc:enderdragon", {
|
|||
xp_max = 500,
|
||||
collisionbox = {-2, 0, -2, 2, 2, 2},
|
||||
eye_height = 1,
|
||||
physical = false,
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_dragon.b3d",
|
||||
textures = {
|
||||
|
@ -60,8 +59,6 @@ mobs:register_mob("mobs_mc:enderdragon", {
|
|||
arrow = "mobs_mc:dragon_fireball",
|
||||
shoot_interval = 0.5,
|
||||
shoot_offset = -1.0,
|
||||
xp_min = 500,
|
||||
xp_max = 500,
|
||||
animation = {
|
||||
fly_speed = 8, stand_speed = 8,
|
||||
stand_start = 0, stand_end = 20,
|
||||
|
@ -114,8 +111,8 @@ mobs:register_mob("mobs_mc:enderdragon", {
|
|||
fire_resistant = true,
|
||||
})
|
||||
|
||||
|
||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||
--TODO: replace this setting by a proper gamerules system
|
||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing", true)
|
||||
|
||||
-- dragon fireball (projectile)
|
||||
mobs:register_arrow("mobs_mc:dragon_fireball", {
|
||||
|
@ -143,7 +140,9 @@ mobs:register_arrow("mobs_mc:dragon_fireball", {
|
|||
-- node hit, explode
|
||||
hit_node = function(self, pos, node)
|
||||
--mobs:boom(self, pos, 2)
|
||||
mcl_explosions.explode(self.object:get_pos(), 2,{ drop_chance = 1.0 })
|
||||
if mobs_griefing then
|
||||
mcl_explosions.explode(self.object:get_pos(), 2, { drop_chance = 1.0 })
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
|
|
@ -318,12 +318,12 @@ mobs:register_mob("mobs_mc:enderman", {
|
|||
for n = 1, #objs do
|
||||
local obj = objs[n]
|
||||
if obj then
|
||||
if minetest.is_player(obj) then
|
||||
--if minetest.is_player(obj) then
|
||||
-- Warp from players during day.
|
||||
--if (minetest.get_timeofday() * 24000) > 5001 and (minetest.get_timeofday() * 24000) < 19000 then
|
||||
-- self:teleport(nil)
|
||||
--end
|
||||
else
|
||||
if not obj:is_player() then
|
||||
local lua = obj:get_luaentity()
|
||||
if lua then
|
||||
if lua.name == "mcl_bows:arrow_entity" or lua.name == "mcl_throwing:snowball_entity" then
|
||||
|
|
|
@ -94,7 +94,6 @@ mobs:register_mob("mobs_mc:guardian", {
|
|||
makes_footstep_sound = false,
|
||||
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
|
||||
jump = false,
|
||||
view_range = 16,
|
||||
})
|
||||
|
||||
-- Spawning disabled due to size issues
|
||||
|
|
|
@ -104,7 +104,6 @@ mobs:register_mob("mobs_mc:guardian_elder", {
|
|||
makes_footstep_sound = false,
|
||||
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
|
||||
jump = false,
|
||||
view_range = 16,
|
||||
})
|
||||
|
||||
-- Spawning disabled due to size issues <- what do you mean? -j4i
|
||||
|
|
|
@ -38,9 +38,9 @@ end
|
|||
local can_equip_horse_armor = function(entity_id)
|
||||
return entity_id == "mobs_mc:horse" or entity_id == "mobs_mc:skeleton_horse" or entity_id == "mobs_mc:zombie_horse"
|
||||
end
|
||||
local can_equip_chest = function(entity_id)
|
||||
--[[local can_equip_chest = function(entity_id)
|
||||
return entity_id == "mobs_mc:mule" or entity_id == "mobs_mc:donkey"
|
||||
end
|
||||
end]]
|
||||
local can_breed = function(entity_id)
|
||||
return entity_id == "mobs_mc:horse" or "mobs_mc:mule" or entity_id == "mobs_mc:donkey"
|
||||
end
|
||||
|
@ -314,7 +314,7 @@ local horse = {
|
|||
-- Make sure tamed horse is mature and being clicked by owner only
|
||||
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
--local inv = clicker:get_inventory()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
|
|
@ -307,9 +307,9 @@ mobs:register_arrow("mobs_mc:spit", {
|
|||
tail_distance_divider = 4,
|
||||
|
||||
hit_player = function(self, player)
|
||||
if rawget(_G, "armor") and armor.last_damage_types then
|
||||
--[[if rawget(_G, "armor") and armor.last_damage_types then
|
||||
armor.last_damage_types[player:get_player_name()] = "spit"
|
||||
end
|
||||
end]]
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = self._damage},
|
||||
|
@ -319,7 +319,7 @@ mobs:register_arrow("mobs_mc:spit", {
|
|||
hit_mob = function(self, mob)
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = _damage},
|
||||
damage_groups = {fleshy = self._damage},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ end
|
|||
|
||||
mobs:register_mob("mobs_mc:cat", cat)
|
||||
|
||||
local base_spawn_chance = 5000
|
||||
--local base_spawn_chance = 5000
|
||||
|
||||
-- Spawn ocelot
|
||||
--they get the same as the llama because I'm trying to rework so much of this code right now -j4i
|
||||
|
|
|
@ -163,7 +163,7 @@ mobs:register_mob("mobs_mc:pig", {
|
|||
end
|
||||
|
||||
-- Mount or detach player
|
||||
local name = clicker:get_player_name()
|
||||
--local name = clicker:get_player_name()
|
||||
if self.driver and clicker == self.driver then
|
||||
-- Detach if already attached
|
||||
mobs.detach(clicker, {x=1, y=0, z=0})
|
||||
|
|
|
@ -150,7 +150,6 @@ mobs:register_mob("mobs_mc:sheep", {
|
|||
do_custom = function(self, dtime)
|
||||
if not self.initial_color_set then
|
||||
local r = math.random(0,100000)
|
||||
local textures
|
||||
if r <= 81836 then
|
||||
-- 81.836%
|
||||
self.color = "unicolor_white"
|
||||
|
|
|
@ -46,7 +46,6 @@ mobs:register_mob("mobs_mc:silverfish", {
|
|||
view_range = 16,
|
||||
attack_type = "punch",
|
||||
damage = 1,
|
||||
reach = 1,
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_mc:silverfish", S("Silverfish"), "mobs_mc_spawn_icon_silverfish.png", 0)
|
||||
|
|
|
@ -31,10 +31,6 @@ local skeleton = {
|
|||
group_attack = true,
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_skeleton.b3d",
|
||||
textures = { {
|
||||
"mcl_bows_bow_0.png", -- bow
|
||||
"mobs_mc_skeleton.png", -- skeleton
|
||||
} },
|
||||
|
||||
--head code
|
||||
has_head = false,
|
||||
|
|
|
@ -15,7 +15,7 @@ mobs:register_mob("mobs_mc:vex", {
|
|||
spawn_class = "hostile",
|
||||
pathfinding = 1,
|
||||
passive = false,
|
||||
attack_type = "punch",
|
||||
attack_type = "dogfight",
|
||||
physical = false,
|
||||
hp_min = 14,
|
||||
hp_max = 14,
|
||||
|
@ -36,7 +36,6 @@ mobs:register_mob("mobs_mc:vex", {
|
|||
view_range = 16,
|
||||
walk_velocity = 3.2,
|
||||
run_velocity = 5.9,
|
||||
attack_type = "dogfight",
|
||||
sounds = {
|
||||
-- TODO: random
|
||||
death = "mobs_mc_vex_death",
|
||||
|
|
|
@ -26,7 +26,6 @@ mobs:register_mob("mobs_mc:wither", {
|
|||
{"mobs_mc_wither.png"},
|
||||
},
|
||||
visual_size = {x=4, y=4},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 16,
|
||||
fear_height = 4,
|
||||
walk_velocity = 2,
|
||||
|
@ -81,7 +80,7 @@ mobs:register_mob("mobs_mc:wither", {
|
|||
end,
|
||||
})
|
||||
|
||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||
--local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||
|
||||
mobs:register_arrow("mobs_mc:wither_skull", {
|
||||
visual = "sprite",
|
||||
|
|
|
@ -186,7 +186,7 @@ dog.on_rightclick = function(self, clicker)
|
|||
if is_food(item:get_name()) then
|
||||
-- Feed to increase health
|
||||
local hp = self.health
|
||||
local hp_add = 0
|
||||
local hp_add
|
||||
-- Use eatable group to determine health boost
|
||||
local eatable = minetest.get_item_group(item, "eatable")
|
||||
if eatable > 0 then
|
||||
|
|
Loading…
Reference in New Issue