diff --git a/depends.txt b/depends.txt index 73f1d0a..bef18c0 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default mymonths? +mobs? diff --git a/extras/Ostrich.blend b/extras/Ostrich.blend new file mode 100644 index 0000000..299284d Binary files /dev/null and b/extras/Ostrich.blend differ diff --git a/init.lua b/init.lua index 1b5d631..e917666 100644 --- a/init.lua +++ b/init.lua @@ -7,3 +7,7 @@ end dofile(minetest.get_modpath('desert_life')..'/functions.lua') dofile(minetest.get_modpath('desert_life')..'/prickly_pear.lua') dofile(minetest.get_modpath('desert_life')..'/barrel_cacti.lua') + +if minetest.get_modpath('mobs') then + dofile(minetest.get_modpath('desert_life')..'/ostrich.lua') +end diff --git a/models/dl_ostrich.b3d b/models/dl_ostrich.b3d new file mode 100644 index 0000000..0634125 Binary files /dev/null and b/models/dl_ostrich.b3d differ diff --git a/ostrich.lua b/ostrich.lua new file mode 100644 index 0000000..eb66105 --- /dev/null +++ b/ostrich.lua @@ -0,0 +1,58 @@ + +local S = mobs.intllib + +mobs:register_mob("desert_life:ostrich", { + type = "animal", + passive = false, + attack_type = "dogfight", + group_attack = true, + reach = 2, + damage = 2, + hp_min = 5, + hp_max = 10, + armor = 200, + collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.75, 0.4}, + visual = "mesh", + mesh = "dl_ostrich.b3d", + textures = { + {'dl_ostrich.png'}, + }, + visual_size = {x=9, y=9}, + makes_footstep_sound = true, + sounds = { + random = "mobs_chicken", + }, + walk_velocity = 1, + run_velocity = 3, + jump = true, + drops = { + {name = "mobs:chicken_raw", chance = 1, min = 2, max = 6}, + }, + water_damage = 1, + lava_damage = 5, + light_damage = 0, + fall_damage = 0, + fall_speed = -8, + fear_height = 5, + animation = { + speed_normal = 15, + speed_run = 30, + stand_start = 0, + stand_end = 60, + walk_start = 180, + walk_end = 229, + run_start = 180, + run_end = 229, + punch_start = 65, + punch_end = 90, + punch2_start = 95, + punch2_end = 125, + }, + follow = {"farming:seed_wheat", "farming:seed_cotton"}, + view_range = 5, +}) + +mobs:register_spawn("desert_life:ostrich", + {"default:dirt_with_grass", "ethereal:bamboo_dirt"}, 20, 10, 1500, 1, 31000, true) + +mobs:register_egg("desert_life:ostrich", S("Ostrich"), "mobs_chicken_inv.png", 0) diff --git a/prickly_pear.lua b/prickly_pear.lua index df68952..4af56de 100644 --- a/prickly_pear.lua +++ b/prickly_pear.lua @@ -57,7 +57,7 @@ for i in ipairs (prickly_pear_table) do paramtype = 'light', paramtype2 = 'facedir', selection_box = col, - collision_box = col, + collision_box = col, on_punch = function(pos, node, player, pointed_thing) minetest.set_node(pos, {name = AD, param2 = node.param2}) player:get_inventory():add_item('main', 'desert_life:prickly_pear') --If inventory is full it should be dropped. @@ -110,7 +110,7 @@ minetest.register_node('desert_life:prickly_pear', { drawtype = 'mesh', mesh = 'dl_pp_1.obj', tiles = {name='dl_prickly_pear.png'}, - groups = {}, + groups = {dig_immediate = 3}, paramtype = 'light', paramtype2 = 'facedir', selection_box = { diff --git a/readme.md b/readme.md index cae0c84..d69d46e 100644 --- a/readme.md +++ b/readme.md @@ -1 +1,2 @@ Deserts are pretty boring in default game, this mod attempts to remedy that by spicing them up with some extra flora and fauna. +If you have mobs_redo enabled you'll get a few additional desert animals. diff --git a/textures/dl_ostrich.png b/textures/dl_ostrich.png new file mode 100644 index 0000000..5cf6823 Binary files /dev/null and b/textures/dl_ostrich.png differ