mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2025-07-09 11:50:19 +02:00
tweak and tidy code
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
-- Translation support
|
||||
|
||||
-- translation and custom land guard types
|
||||
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local guard_types = {
|
||||
@ -50,9 +52,7 @@ mobs:register_mob("mobs_monster:land_guard", {
|
||||
{"mobs_land_guard3.png"}
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_dungeonmaster",
|
||||
},
|
||||
sounds = {random = "mobs_dungeonmaster"},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 3.4,
|
||||
jump = true,
|
||||
@ -69,14 +69,10 @@ mobs:register_mob("mobs_monster:land_guard", {
|
||||
light_damage = 0,
|
||||
fear_height = 8,
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 19,
|
||||
walk_start = 20,
|
||||
walk_end = 35,
|
||||
punch_start = 36,
|
||||
punch_end = 48,
|
||||
speed_normal = 15,
|
||||
speed_run = 20,
|
||||
stand_start = 0, stand_end = 19,
|
||||
walk_start = 20, walk_end = 35,
|
||||
punch_start = 36, punch_end = 48,
|
||||
speed_normal = 15, speed_run = 20,
|
||||
},
|
||||
|
||||
-- check surrounding nodes and spawn a specific guard
|
||||
@ -95,9 +91,7 @@ mobs:register_mob("mobs_monster:land_guard", {
|
||||
self.object:set_properties({textures = self.base_texture})
|
||||
self.docile_by_day = tmp.docile
|
||||
|
||||
if tmp.drops then
|
||||
self.drops = tmp.drops
|
||||
end
|
||||
if tmp.drops then self.drops = tmp.drops end
|
||||
|
||||
return true
|
||||
end
|
||||
@ -107,20 +101,23 @@ mobs:register_mob("mobs_monster:land_guard", {
|
||||
end,
|
||||
})
|
||||
|
||||
-- where to spawn
|
||||
|
||||
if not mobs.custom_spawn_monster then
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:land_guard",
|
||||
nodes = {
|
||||
"default:snow", "default:ice", "default:stone",
|
||||
"default:dry_dirt_with_dry_grass", "ethereal:dry_dirt"
|
||||
},
|
||||
max_light = 7,
|
||||
chance = 25000,
|
||||
min_height = 0,
|
||||
active_object_count = 1,
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:land_guard",
|
||||
nodes = {
|
||||
"default:snow", "default:ice", "default:stone",
|
||||
"default:dry_dirt_with_dry_grass", "ethereal:dry_dirt"
|
||||
},
|
||||
max_light = 7,
|
||||
chance = 25000,
|
||||
min_height = 0,
|
||||
active_object_count = 1,
|
||||
})
|
||||
end
|
||||
|
||||
-- spawn egg
|
||||
|
||||
mobs:register_egg("mobs_monster:land_guard", S("Land Guard"), "default_ice.png", 1)
|
||||
|
Reference in New Issue
Block a user