[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",
|
||||
|
|
|
@ -89,7 +89,7 @@ local cow_def = {
|
|||
--head code
|
||||
has_head = true,
|
||||
head_bone = "head",
|
||||
|
||||
|
||||
swap_y_with_x = false,
|
||||
reverse_head_yaw = false,
|
||||
|
||||
|
@ -168,7 +168,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
|
|||
pos.y = pos.y + 0.5
|
||||
minetest.add_item(pos, {name = mobs_mc.items.mushroom_stew})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
mobs:register_mob("mobs_mc:mooshroom", mooshroom_def)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ mobs:register_mob("mobs_mc:enderdragon", {
|
|||
shoot_arrow = function(self, pos, dir)
|
||||
-- 2-4 damage per arrow
|
||||
local dmg = math.random(2,4)
|
||||
mobs.shoot_projectile_handling("mobs_mc:dragon_fireball", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||
mobs.shoot_projectile_handling("mobs_mc:dragon_fireball", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||
end,
|
||||
hp_max = 200,
|
||||
hp_min = 200,
|
||||
|
@ -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
|
||||
|
|
|
@ -13,7 +13,7 @@ mobs:register_mob("mobs_mc:guardian", {
|
|||
xp_min = 10,
|
||||
xp_max = 10,
|
||||
breath_max = -1,
|
||||
passive = false,
|
||||
passive = false,
|
||||
attack_type = "punch",
|
||||
pathfinding = 1,
|
||||
view_range = 16,
|
||||
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@ mobs:register_mob("mobs_mc:iron_golem", {
|
|||
passive = true,
|
||||
rotate = 270,
|
||||
hp_min = 100,
|
||||
hp_max = 100,
|
||||
hp_max = 100,
|
||||
protect = true,
|
||||
neutral = true,
|
||||
breath_max = -1,
|
||||
|
|
|
@ -35,7 +35,7 @@ mobs:register_mob("mobs_mc:llama", {
|
|||
shoot_arrow = function(self, pos, dir)
|
||||
-- 2-4 damage per arrow
|
||||
local dmg = 1
|
||||
mobs.shoot_projectile_handling("mobs_mc:spit", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||
mobs.shoot_projectile_handling("mobs_mc:spit", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||
end,
|
||||
hp_min = 15,
|
||||
hp_max = 30,
|
||||
|
@ -146,7 +146,7 @@ mobs:register_mob("mobs_mc:llama", {
|
|||
self.tamed = true
|
||||
self.owner = clicker:get_player_name()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--ignore other logic
|
||||
--make baby grow faster
|
||||
|
@ -307,19 +307,19 @@ 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},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, mob)
|
||||
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
|
||||
|
|
|
@ -44,7 +44,7 @@ mobs:register_mob("mobs_mc:parrot", {
|
|||
max = 2,
|
||||
looting = "common",},
|
||||
},
|
||||
animation = {
|
||||
animation = {
|
||||
stand_speed = 50,
|
||||
walk_speed = 50,
|
||||
fly_speed = 50,
|
||||
|
|
|
@ -130,7 +130,7 @@ mobs:register_mob("mobs_mc:pig", {
|
|||
-- Put saddle on pig
|
||||
local item = clicker:get_wielded_item()
|
||||
local wielditem = item
|
||||
|
||||
|
||||
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
|
||||
self.base_texture = {
|
||||
"blank.png", -- baby
|
||||
|
@ -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})
|
||||
|
|
|
@ -79,11 +79,11 @@ mobs:register_mob("mobs_mc:sheep", {
|
|||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
|
||||
|
||||
--head code
|
||||
has_head = true,
|
||||
head_bone = "head",
|
||||
|
||||
|
||||
swap_y_with_x = false,
|
||||
reverse_head_yaw = false,
|
||||
|
||||
|
@ -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,12 +31,8 @@ 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
|
||||
--head code
|
||||
has_head = false,
|
||||
head_bone = "head",
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -35,7 +35,7 @@ local wolf = {
|
|||
--head code
|
||||
has_head = false,
|
||||
head_bone = "head",
|
||||
|
||||
|
||||
swap_y_with_x = false,
|
||||
reverse_head_yaw = false,
|
||||
|
||||
|
@ -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
Block a user