From d7384fa12f16dc3e10327d4695ea6286f44bfa5c Mon Sep 17 00:00:00 2001 From: blert2112 Date: Fri, 24 Jul 2015 19:59:02 -0400 Subject: name changes for compatability --- mobs_sharks/License.txt | 7 + mobs_sharks/SETTINGS.txt | 8 ++ mobs_sharks/depends.txt | 2 + mobs_sharks/init.lua | 151 +++++++++++++++++++++ mobs_sharks/models/mob_shark.b3d | Bin 0 -> 79151 bytes mobs_sharks/models/mob_shark.blend | Bin 0 -> 504520 bytes mobs_sharks/textures/mob_shark_shark_item.png | Bin 0 -> 6020 bytes .../textures/original/mob_shark_shark_mesh.png | Bin 0 -> 14778 bytes mobs_sharks/textures/shark_first.png | Bin 0 -> 5745 bytes mobs_sharks/textures/shark_second.png | Bin 0 -> 14712 bytes mobs_sharks/textures/shark_third.png | Bin 0 -> 15248 bytes 11 files changed, 168 insertions(+) create mode 100644 mobs_sharks/License.txt create mode 100644 mobs_sharks/SETTINGS.txt create mode 100644 mobs_sharks/depends.txt create mode 100644 mobs_sharks/init.lua create mode 100644 mobs_sharks/models/mob_shark.b3d create mode 100644 mobs_sharks/models/mob_shark.blend create mode 100644 mobs_sharks/textures/mob_shark_shark_item.png create mode 100644 mobs_sharks/textures/original/mob_shark_shark_mesh.png create mode 100644 mobs_sharks/textures/shark_first.png create mode 100644 mobs_sharks/textures/shark_second.png create mode 100644 mobs_sharks/textures/shark_third.png (limited to 'mobs_sharks') diff --git a/mobs_sharks/License.txt b/mobs_sharks/License.txt new file mode 100644 index 0000000..0ce650a --- /dev/null +++ b/mobs_sharks/License.txt @@ -0,0 +1,7 @@ +Licenses + +Model/Textures: CC-BY-SA 3.0 + http://creativecommons.org/licenses/by-sa/3.0/de/legalcode +Author: Sapier + +texture modification by: blert2112 diff --git a/mobs_sharks/SETTINGS.txt b/mobs_sharks/SETTINGS.txt new file mode 100644 index 0000000..a728aaf --- /dev/null +++ b/mobs_sharks/SETTINGS.txt @@ -0,0 +1,8 @@ + +-- SETTINGS + +ENABLE_SHARK_LARGE = true +ENABLE_SHARK_MEDIUM = true +ENABLE_SHARK_SMALL = true + +HELP_WITH_EXPERIMENT = true diff --git a/mobs_sharks/depends.txt b/mobs_sharks/depends.txt new file mode 100644 index 0000000..cc03398 --- /dev/null +++ b/mobs_sharks/depends.txt @@ -0,0 +1,2 @@ +default +mobs diff --git a/mobs_sharks/init.lua b/mobs_sharks/init.lua new file mode 100644 index 0000000..1296546 --- /dev/null +++ b/mobs_sharks/init.lua @@ -0,0 +1,151 @@ + +if mobs.mod and mobs.mod == "redo" then + +-- local variables + local l_colors = { + "#604000:175", --brown + "#ffffff:150", --white + "#404040:150", --dark_grey + "#a0a0a0:150" --grey + } + local l_skins = { + {"(shark_first.png^[colorize:"..l_colors[3]..")^(shark_second.png^[colorize:"..l_colors[4]..")^shark_third.png"}, + {"(shark_first.png^[colorize:"..l_colors[1]..")^(shark_second.png^[colorize:"..l_colors[2]..")^shark_third.png"}, + {"(shark_first.png^[colorize:"..l_colors[4]..")^(shark_second.png^[colorize:"..l_colors[2]..")^shark_third.png"} + } + local l_anims = { + speed_normal = 24, speed_run = 24, + stand_start = 1, stand_end = 80, + walk_start = 80, walk_end = 160, + run_start = 80, run_end = 160 + } + local l_model = "mob_shark.b3d" + local l_egg_texture = "mob_shark_shark_item.png" + local l_spawn_in = {"default:water_flowing","default:water_source"} + local l_spawn_near = {"default:water_flowing","default:water_source","seawrecks:woodship","seawrecks:uboot"} + local l_spawn_chance = 60000 + +-- load settings + dofile(minetest.get_modpath("mobs_sharks").."/SETTINGS.txt") + if not ENABLE_SHARK_LARGE then + l_spawn_chance = l_spawn_chance - 20000 + end + if not ENABLE_SHARK_MEDIUM then + l_spawn_chance = l_spawn_chance - 20000 + end + if not ENABLE_SHARK_SMALL then + l_spawn_chance = l_spawn_chance - 20000 + end + +-- large + if ENABLE_SHARK_LARGE then + mobs:register_mob("mobs_sharks:shark_lg", { + type = "monster", + attack_type = "dogfight", + damage = 10, + hp_min = 20, + hp_max = 25, + armor = 150, + collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75}, + visual = "mesh", + mesh = l_model, + textures = l_skins, + makes_footstep_sound = false, + walk_velocity = 4, + run_velocity = 6, + fly = true, + fly_in = "default:water_source", + fall_speed = 0, + rotate = 4.5, + view_range = 10, + water_damage = 0, + lava_damage = 10, + light_damage = 0, + animation = l_anims, + do_custom = function(self) + if HELP_WITH_EXPERIMENT then + local p = self.object:getpos() + local a = self.object:getvelocity() + if p.y > 0 and a.y > 0 then + a.y = -1 + else + local r = math.random(100) + if r >= 1 and r <=25 then a.y = 0.25 + elseif r > 25 and r <= 50 then a.y = 0 + elseif r > 50 and r <= 75 then a.y = -0.25 + end + end + self.object:setvelocity(a) + end + end + }) + --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height + mobs:spawn_specific("mobs_sharks:shark_lg", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0) + mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0) + end + +-- medium + if ENABLE_SHARK_MEDIUM then + mobs:register_mob("mobs_sharks:shark_md", { + type = "monster", + attack_type = "dogfight", + damage = 8, + hp_min = 15, + hp_max = 20, + armor = 125, + collisionbox = {-0.57, -0.38, -0.57, 0.57, 0.38, 0.57}, + visual = "mesh", + visual_size = {x=0.75, y=0.75}, + mesh = l_model, + textures = l_skins, + makes_footstep_sound = false, + walk_velocity = 2, + run_velocity = 4, + fly = true, + fly_in = "default:water_source", + fall_speed = -1, + rotate = 4.5, + view_range = 10, + water_damage = 0, + lava_damage = 10, + light_damage = 0, + animation = l_anims + }) + --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height + mobs:spawn_specific("mobs_sharks:shark_md", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0) + mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0) + end + +-- small + if ENABLE_SHARK_SMALL then + mobs:register_mob("mobs_sharks:shark_sm", { + type = "monster", + attack_type = "dogfight", + damage = 6, + hp_min = 10, + hp_max = 15, + armor = 100, + collisionbox = {-0.38, -0.25, -0.38, 0.38, 0.25, 0.38}, + visual = "mesh", + visual_size = {x=0.5, y=0.5}, + mesh = l_model, + textures = l_skins, + makes_footstep_sound = false, + walk_velocity = 2, + run_velocity = 4, + fly = true, + fly_in = "default:water_source", + fall_speed = -1, + rotate = 4.5, + view_range = 10, + water_damage = 0, + lava_damage = 10, + light_damage = 0, + animation = l_anims + }) + --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height + mobs:spawn_specific("mobs_sharks:shark_sm", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0) + mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0) + end + +end diff --git a/mobs_sharks/models/mob_shark.b3d b/mobs_sharks/models/mob_shark.b3d new file mode 100644 index 0000000..c076e59 Binary files /dev/null and b/mobs_sharks/models/mob_shark.b3d differ diff --git a/mobs_sharks/models/mob_shark.blend b/mobs_sharks/models/mob_shark.blend new file mode 100644 index 0000000..a985bc3 Binary files /dev/null and b/mobs_sharks/models/mob_shark.blend differ diff --git a/mobs_sharks/textures/mob_shark_shark_item.png b/mobs_sharks/textures/mob_shark_shark_item.png new file mode 100644 index 0000000..375890b Binary files /dev/null and b/mobs_sharks/textures/mob_shark_shark_item.png differ diff --git a/mobs_sharks/textures/original/mob_shark_shark_mesh.png b/mobs_sharks/textures/original/mob_shark_shark_mesh.png new file mode 100644 index 0000000..6c3bc69 Binary files /dev/null and b/mobs_sharks/textures/original/mob_shark_shark_mesh.png differ diff --git a/mobs_sharks/textures/shark_first.png b/mobs_sharks/textures/shark_first.png new file mode 100644 index 0000000..26adb8c Binary files /dev/null and b/mobs_sharks/textures/shark_first.png differ diff --git a/mobs_sharks/textures/shark_second.png b/mobs_sharks/textures/shark_second.png new file mode 100644 index 0000000..5cd3542 Binary files /dev/null and b/mobs_sharks/textures/shark_second.png differ diff --git a/mobs_sharks/textures/shark_third.png b/mobs_sharks/textures/shark_third.png new file mode 100644 index 0000000..3b59782 Binary files /dev/null and b/mobs_sharks/textures/shark_third.png differ -- cgit v1.2.3