Make villager stand still if there is near player
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / squid.lua
blobd61ae087884159e84dff8cef5189bfde097e5076
1 -- v1.1
3 --###################
4 --################### SQUID
5 --###################
7 -- intllib
8 local MP = minetest.get_modpath(minetest.get_current_modname())
9 local S, NS = dofile(MP.."/intllib.lua")
11 mobs:register_mob("mobs_mc:squid", {
12 type = "animal",
13 passive = true,
14 hp_min = 10,
15 hp_max = 10,
16 armor = 100,
17 -- FIXME: If the squid is near the floor, it turns black
18 collisionbox = {-0.4, 0.1, -0.4, 0.4, 0.9, 0.4},
19 visual = "mesh",
20 mesh = "mobs_mc_squid.b3d",
21 textures = {
22 {"mobs_mc_squid.png"}
24 sounds = {
25 damage = "mobs_mc_squid_hurt",
26 distance = 16,
28 animation = {
29 stand_start = 1,
30 stand_end = 60,
31 walk_start = 1,
32 walk_end = 60,
33 run_start = 1,
34 run_end = 60,
36 drops = {
37 {name = mobs_mc.items.black_dye,
38 chance = 1,
39 min = 1,
40 max = 3,},
42 visual_size = {x=1.75, y=1.75},
43 makes_footstep_sound = false,
44 stepheight = 0.1,
45 fly = true,
46 fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
47 jump = false,
48 fall_speed = 0.5,
49 view_range = 16,
50 water_damage = 0,
51 lava_damage = 4,
52 light_damage = 0,
53 runaway = true,
54 fear_height = 4,
55 blood_texture = "mobs_mc_squid_blood.png",
58 -- Spawn near the water surface
60 local water = mobs_mc.spawn_height.water
61 --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
62 mobs:spawn_specific("mobs_mc:squid", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 5500, 3, water-16, water)
64 -- compatibility
65 mobs:alias_mob("mobs:squid", "mobs_mc:squid")
67 -- spawn eggs
68 mobs:register_egg("mobs_mc:squid", S("Squid"), "mobs_mc_spawn_icon_squid.png", 0)