Change icon graphics, adjust npc random sounds, remove debugging messages
parent
1e6ced3782
commit
ecc6c16d42
|
@ -21,12 +21,9 @@ function mobs.put_icon(obj,icon,timeout)
|
||||||
local pos = obj.object:getpos()
|
local pos = obj.object:getpos()
|
||||||
local iobj = minetest.add_entity({x=pos.x,y=(pos.y+3),z=pos.z},icon)
|
local iobj = minetest.add_entity({x=pos.x,y=(pos.y+3),z=pos.z},icon)
|
||||||
if iobj ~= nil then
|
if iobj ~= nil then
|
||||||
print("putting icon ")
|
|
||||||
iobj = iobj:get_luaentity()
|
iobj = iobj:get_luaentity()
|
||||||
iobj.timeout = timeout
|
iobj.timeout = timeout
|
||||||
iobj.object:set_attach(obj.object,"",{x = 0, y = 10, z = 0}, {x = 0, y = 0, z = 0})
|
iobj.object:set_attach(obj.object,"",{x = 0, y = 10, z = 0}, {x = 0, y = 0, z = 0})
|
||||||
else
|
|
||||||
print("failed to add entity")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ mobs:register_mob("mobs:male1_npc",{
|
||||||
attack = "default_punch2",
|
attack = "default_punch2",
|
||||||
random = "mobs_male1_random",
|
random = "mobs_male1_random",
|
||||||
},
|
},
|
||||||
random_freq = 8,
|
random_freq = 4,
|
||||||
attacks_monsters=true,
|
attacks_monsters=true,
|
||||||
peaceful = true,
|
peaceful = true,
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
|
@ -57,7 +57,7 @@ mobs:register_mob("mobs:male1_npc",{
|
||||||
{chance=60, item="experience:6_exp"},
|
{chance=60, item="experience:6_exp"},
|
||||||
{chance=50, item="potions:magic_replenish1"},
|
{chance=50, item="potions:magic_replenish1"},
|
||||||
},
|
},
|
||||||
walk_chance = 12,
|
walk_chance = 7,
|
||||||
lifetimer = false,
|
lifetimer = false,
|
||||||
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
||||||
avoid_range = 4,
|
avoid_range = 4,
|
||||||
|
@ -110,7 +110,7 @@ mobs:register_mob("mobs:male2_npc",{
|
||||||
attack = "default_punch2",
|
attack = "default_punch2",
|
||||||
random = "mobs_male2_random",
|
random = "mobs_male2_random",
|
||||||
},
|
},
|
||||||
random_freq = 5,
|
random_freq = 3,
|
||||||
attacks_monsters=true,
|
attacks_monsters=true,
|
||||||
peaceful = true,
|
peaceful = true,
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
|
@ -122,7 +122,7 @@ mobs:register_mob("mobs:male2_npc",{
|
||||||
{chance=60, item="experience:6_exp"},
|
{chance=60, item="experience:6_exp"},
|
||||||
{chance=50, item="potions:magic_replenish1"},
|
{chance=50, item="potions:magic_replenish1"},
|
||||||
},
|
},
|
||||||
walk_chance = 8,
|
walk_chance = 5,
|
||||||
lifetimer = false,
|
lifetimer = false,
|
||||||
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
||||||
avoid_range = 4,
|
avoid_range = 4,
|
||||||
|
@ -175,7 +175,7 @@ mobs:register_mob("mobs:male3_npc",{
|
||||||
attack = "default_punch2",
|
attack = "default_punch2",
|
||||||
random = "mobs_male3_random",
|
random = "mobs_male3_random",
|
||||||
},
|
},
|
||||||
random_freq = 3,
|
random_freq = 2,
|
||||||
attacks_monsters=true,
|
attacks_monsters=true,
|
||||||
peaceful = true,
|
peaceful = true,
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
|
|
|
@ -24,7 +24,7 @@ type = "npc",
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
on_rightclick = nil,
|
||||||
walk_chance = 12,
|
walk_chance = 7,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 30,
|
speed_normal = 30,
|
||||||
|
@ -43,7 +43,7 @@ type = "npc",
|
||||||
attack = "default_punch",
|
attack = "default_punch",
|
||||||
random = "mobs_female1_random",
|
random = "mobs_female1_random",
|
||||||
},
|
},
|
||||||
random_freq = 7,
|
random_freq = 5,
|
||||||
attacks_monsters=false,
|
attacks_monsters=false,
|
||||||
peaceful = true,
|
peaceful = true,
|
||||||
step=2,
|
step=2,
|
||||||
|
@ -104,7 +104,7 @@ type = "npc",
|
||||||
attack = "default_punch",
|
attack = "default_punch",
|
||||||
random = "mobs_female2_random",
|
random = "mobs_female2_random",
|
||||||
},
|
},
|
||||||
random_freq = 12,
|
random_freq = 4,
|
||||||
attacks_monsters=false,
|
attacks_monsters=false,
|
||||||
peaceful = true,
|
peaceful = true,
|
||||||
step=2,
|
step=2,
|
||||||
|
@ -115,7 +115,7 @@ type = "npc",
|
||||||
{chance=40, item="experience:6_exp"},
|
{chance=40, item="experience:6_exp"},
|
||||||
{chance=60, item="potions:magic_replenish1"},
|
{chance=60, item="potions:magic_replenish1"},
|
||||||
},
|
},
|
||||||
walk_chance = 5,
|
walk_chance = 4,
|
||||||
lifetimer = false,
|
lifetimer = false,
|
||||||
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
||||||
avoid_range = 4,
|
avoid_range = 4,
|
||||||
|
@ -176,10 +176,11 @@ type = "npc",
|
||||||
{chance=80, item="experience:6_exp 2"},
|
{chance=80, item="experience:6_exp 2"},
|
||||||
{chance=40, item="potions:magic_replenish1"},
|
{chance=40, item="potions:magic_replenish1"},
|
||||||
},
|
},
|
||||||
walk_chance = 9,
|
walk_chance = 6,
|
||||||
lifetimer = false,
|
lifetimer = false,
|
||||||
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
avoid_nodes = {"fire:basic_flame","default:water_source","default:water_flowing","default:lava_source","default:lava_flowing"},
|
||||||
avoid_range = 4,
|
avoid_range = 4,
|
||||||
|
icon = "mobs:icon_quest",
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_mob("mobs:mother", {
|
mobs:register_mob("mobs:mother", {
|
||||||
|
|
|
@ -67,8 +67,8 @@ function mobs.on_step(self,dtime)
|
||||||
local maxhear = 50
|
local maxhear = 50
|
||||||
local g = 1
|
local g = 1
|
||||||
if self.type == "npc" then
|
if self.type == "npc" then
|
||||||
maxhear = 20
|
maxhear = 30
|
||||||
g = 0.7
|
g = 0.75
|
||||||
end
|
end
|
||||||
minetest.sound_play(self.sounds.random, {object = self.object, max_hear_distance=maxhear, gain=g})
|
minetest.sound_play(self.sounds.random, {object = self.object, max_hear_distance=maxhear, gain=g})
|
||||||
mobs.put_icon(self,"mobs:icon_notice",4)
|
mobs.put_icon(self,"mobs:icon_notice",4)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue