added new hostile mob - if mobs redo loaded, new mob mummy will be added to the game
This commit is contained in:
parent
a1c743c360
commit
24cbaeae6b
25
API.lua
25
API.lua
@ -12,6 +12,9 @@ for k, mob_mod in ipairs(ENABLED_MODS) do
|
||||
|
||||
if mob_mod == "mobs" and not (mobs.mod == "redo") then goto continue end
|
||||
|
||||
-- include spawners mob addons
|
||||
dofile(minetest.get_modpath("spawners").."/mob_mummy.lua")
|
||||
|
||||
table.insert(spawners.mob_tables, {name=mob.name, mod_prefix=mob_mod, egg_name_custom=mob.egg_name_custom, dummy_size=mob.dummy_size, dummy_offset=mob.dummy_offset, dummy_mesh=mob.dummy_mesh, dummy_texture=mob.dummy_texture, night_only=mob.night_only, sound_custom=mob.sound_custom})
|
||||
|
||||
-- use custom egg or create a default egg
|
||||
@ -229,18 +232,20 @@ function spawners.check_node_status(pos, mob, night_only)
|
||||
return false
|
||||
end
|
||||
|
||||
-- spawn only at day
|
||||
if not night_only and node_light < min_node_light then
|
||||
return false, true
|
||||
end
|
||||
|
||||
-- spawn only at night
|
||||
if night_only then
|
||||
if not (19359 > tod and tod > 5200) or node_light < min_node_light then
|
||||
return random_pos
|
||||
else
|
||||
if night_only ~= "disable" then
|
||||
-- spawn only at day
|
||||
if not night_only and node_light < min_node_light then
|
||||
return false, true
|
||||
end
|
||||
|
||||
-- spawn only at night
|
||||
if night_only then
|
||||
if not (19359 > tod and tod > 5200) or node_light < min_node_light then
|
||||
return random_pos
|
||||
else
|
||||
return false, true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return random_pos, false
|
||||
|
24
config.lua
24
config.lua
@ -10,17 +10,31 @@
|
||||
|
||||
-- * [dummy_texture : table] - Textures used for the mob.
|
||||
|
||||
-- * [night_only : string] - If true mobs will spawn only during the night or in dark areas, default:true.
|
||||
-- * [night_only : boolean : string] - If true mobs will spawn only during the night or in dark areas, default:true. Writing "disable" will disable light check and it will spawn in both states (night and day)
|
||||
|
||||
-- [sound_custom : string] - Custom name for the sound file name if differ from default: i.e 'mobs_cow'.
|
||||
|
||||
-- [*] -> MANDATORY - has to be filled in!
|
||||
|
||||
-- mods what should be enabled and loded, remove/add the one you want to load
|
||||
ENABLED_MODS = {"mobs", "pyramids", "creatures"}
|
||||
ENABLED_MODS = {"mobs", "pyramids", "creatures", "spawners"}
|
||||
|
||||
-- mobs properties - setup all you mobs here
|
||||
MOBS_PROPS = {
|
||||
|
||||
["spawners"] = { -- SPAWNERS (THIS) MOD CONFIG
|
||||
{
|
||||
name="mummy",
|
||||
egg_name_custom="",
|
||||
dummy_size={x=0.4,y=0.4},
|
||||
dummy_offset=0,
|
||||
dummy_mesh="creatures_mummy.b3d",
|
||||
dummy_texture={"creatures_mummy.png"},
|
||||
night_only="disable",
|
||||
sound_custom="spawners_mob_mummy"
|
||||
}
|
||||
},
|
||||
|
||||
["mobs"] = { -- MOBS REDO CONFIG
|
||||
{
|
||||
name="sheep_white",
|
||||
@ -137,7 +151,6 @@ MOBS_PROPS = {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
["creatures"] = { -- CREATURES MOD CONFIG
|
||||
{
|
||||
name="chicken",
|
||||
@ -188,7 +201,6 @@ MOBS_PROPS = {
|
||||
dummy_texture={"creatures_oerrki.png"},
|
||||
night_only=false,
|
||||
sound_custom="creatures_oerrki_idle"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
74
mob_mummy.lua
Normal file
74
mob_mummy.lua
Normal file
@ -0,0 +1,74 @@
|
||||
-- modified Sand Monster by PilzAdam with Mummy by BlockMen
|
||||
|
||||
local mummy_def = {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
damage = 4,
|
||||
hp_min = 40,
|
||||
hp_max = 40,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "spawners_mob_mummy.b3d",
|
||||
textures = {
|
||||
{"spawners_mob_mummy.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "spawners_mob_mummy",
|
||||
},
|
||||
walk_velocity = .75,
|
||||
run_velocity = 1.5,
|
||||
view_range = 8,
|
||||
jump = true,
|
||||
floats = 0,
|
||||
drops = {},
|
||||
water_damage = 4,
|
||||
lava_damage = 8,
|
||||
light_damage = 0,
|
||||
fear_height = 4,
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 0,
|
||||
stand_end = 39,
|
||||
walk_start = 41,
|
||||
walk_end = 72,
|
||||
run_start = 74,
|
||||
run_end = 105,
|
||||
punch_start = 74,
|
||||
punch_end = 105,
|
||||
},
|
||||
on_die = function(self, pos)
|
||||
minetest.sound_play("spawners_mob_mummy_death", {
|
||||
object = self.object,
|
||||
pos = pos,
|
||||
max_hear_distance = 10
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
-- drop mod specific blocks if the mod is found
|
||||
if minetest.get_modpath("pyramids") then
|
||||
mummy_def["drops"] = {
|
||||
{name = "default:sandstone", chance = 1, min = 1, max = 3},
|
||||
{name = "default:sandstonebrick", chance = 2, min = 1, max = 2},
|
||||
{name = "pyramids:deco_stone1", chance = 15, min = 1, max = 1},
|
||||
{name = "pyramids:deco_stone2", chance = 15, min = 1, max = 1},
|
||||
{name = "pyramids:deco_stone3", chance = 15, min = 1, max = 1},
|
||||
}
|
||||
else -- default drops
|
||||
mummy_def["drops"] = {
|
||||
{name = "default:sandstone", chance = 1, min = 1, max = 3},
|
||||
{name = "default:sandstonebrick", chance = 2, min = 1, max = 3},
|
||||
}
|
||||
end
|
||||
|
||||
mobs:register_mob("spawners:mummy", mummy_def)
|
||||
|
||||
mobs:register_spawn("spawners:mummy", {"default:desert_sand", "default:desert_stone"}, 20, 0, 7000, 2, 0)
|
||||
|
||||
mobs:register_egg("spawners:mummy", "Mummy Monster", "default_sandstone_brick", 1)
|
BIN
models/spawners_mob_mummy.b3d
Normal file
BIN
models/spawners_mob_mummy.b3d
Normal file
Binary file not shown.
BIN
sounds/spawners_mob_mummy.1.ogg
Normal file
BIN
sounds/spawners_mob_mummy.1.ogg
Normal file
Binary file not shown.
BIN
sounds/spawners_mob_mummy.2.ogg
Normal file
BIN
sounds/spawners_mob_mummy.2.ogg
Normal file
Binary file not shown.
BIN
sounds/spawners_mob_mummy_death.1.ogg
Normal file
BIN
sounds/spawners_mob_mummy_death.1.ogg
Normal file
Binary file not shown.
BIN
sounds/spawners_mob_mummy_hit.1.ogg
Normal file
BIN
sounds/spawners_mob_mummy_hit.1.ogg
Normal file
Binary file not shown.
BIN
textures/spawners_mob_mummy.png
Normal file
BIN
textures/spawners_mob_mummy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue
Block a user