diff --git a/README.md b/README.md index 17fa06ae..036b8839 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ The following mods are also included: * friendlies/ * animal_clownfish ([animals_modpack][]) ([CC-BY-SA](mods/friendlies/animal_clownfish/License.txt)) * animal_fish_blue_white ([animals_modpack][]) ([CC-BY-SA](mods/friendlies/animal_fish_blue_white/License.txt)) + * animal_gull ([animals_modpack][]) ([CC-BY-SA](mods/friendlies/animal_gull/License.txt)) * chicken ([Creatures MOB-Engine][cme]) * sheep ([Creatures MOB-Engine][cme]) * hostils/ diff --git a/mods/friendlies/animal_gull/License.txt b/mods/friendlies/animal_gull/License.txt new file mode 100644 index 00000000..15877d80 --- /dev/null +++ b/mods/friendlies/animal_gull/License.txt @@ -0,0 +1,5 @@ +Licenses + +Everything not mentioned: + CC-BY-SA 3.0, Author sapier + URL: http://creativecommons.org/licenses/by-sa/3.0/de/legalcode \ No newline at end of file diff --git a/mods/friendlies/animal_gull/depends.txt b/mods/friendlies/animal_gull/depends.txt new file mode 100644 index 00000000..6ca107db --- /dev/null +++ b/mods/friendlies/animal_gull/depends.txt @@ -0,0 +1,5 @@ +default +animalmaterials +mob_environments +mobf +intllib? diff --git a/mods/friendlies/animal_gull/init.lua b/mods/friendlies/animal_gull/init.lua new file mode 100644 index 00000000..9857bd2f --- /dev/null +++ b/mods/friendlies/animal_gull/init.lua @@ -0,0 +1,145 @@ +------------------------------------------------------------------------------- +-- Mob Framework Mod by Sapier +-- +-- You may copy, use, modify or do nearly anything except removing this +-- copyright notice. +-- And of course you are NOT allow to pretend you have written it. +-- +--! @file init.lua +--! @brief gull implementation +--! @copyright Sapier +--! @author Sapier +--! @date 2013-01-27 +-- +-- Contact sapier a t gmx net +------------------------------------------------------------------------------- + +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + +minetest.log("action","MOD: animal_gull loading ...") + +local version = "0.2.0" + +local gull_groups = { + not_in_creative_inventory=1 + } + +local selectionbox_gull = {-1, -0.3, -1, 1, 0.3, 1} + +gull_prototype = { + name="gull", + modname="animal_gull", + + factions = { + member = { + "animals", + "birds" + } + }, + + generic = { + description= S("Gull"), + base_health=5, + kill_result="", + armor_groups= { + fleshy=85, + }, + groups = gull_groups, + envid="flight_1", + population_density = 250, + }, + movement = { + min_accel=0.5, + max_accel=1, + max_speed=4, + pattern="flight_pattern1", + canfly=true, + }, + animation = { + fly = { + start_frame = 0, + end_frame = 95, + }, + }, + states = { + { + name = "default", + movgen = "probab_mov_gen", + typical_state_time = 100, + chance = 0, + animation = "fly", + graphics = { + sprite_scale={x=2,y=2}, + sprite_div = {x=6,y=1}, + visible_height = 1, + visible_width = 1, + }, + graphics_3d = { + visual = "mesh", + mesh = "animal_gull.b3d", + textures = {"animal_gull_mesh.png"}, + collisionbox = selectionbox_gull, + visual_size= {x=1,y=1,z=1}, + }, + }, + } + } + +--compatibility code +minetest.register_entity("animal_gull:gull_spawner", + { + physical = false, + collisionbox = { 0.0,0.0,0.0,0.0,0.0,0.0}, + visual = "sprite", + textures = { "invisible.png^[makealpha:128,0,0^[makealpha:128,128,0" }, + on_activate = function(self,staticdata) + + local pos = self.object:getpos(); + minetest.add_entity(pos,"mobf:compat_spawner") + self.object:remove() + end, +}) + +--spawning code +local gullname = gull_prototype.modname .. ":" .. gull_prototype.name +local gull_env = mobf_environment_by_name(gull_prototype.generic.envid) + +mobf_spawner_register("gull_spawner_1",gullname, + { + spawnee = gullname, + spawn_interval = 60, + spawn_inside = gull_env.media, + entities_around = + { + { type="MAX",distance=1,threshold=0 }, + { type="MAX",entityname=gullname, + distance=gull_prototype.generic.population_density,threshold=2 }, + }, + + relative_height = + { + min = gull_env.min_height_above_ground, + max = gull_env.min_height_above_ground + }, + + absolute_height = + { + min = 10, + }, + + surfaces = { "default:water_source", "default:water_flowing"}, + collisionbox = selectionbox_gull + }) + + +--register with animals mod +minetest.log("action","\tadding mob "..gull_prototype.name) +mobf_add_mob(gull_prototype) +minetest.log("action","MOD: animal_gull mod version " .. version .. " loaded") diff --git a/mods/friendlies/animal_gull/locale/de.txt b/mods/friendlies/animal_gull/locale/de.txt new file mode 100644 index 00000000..f61c5efd --- /dev/null +++ b/mods/friendlies/animal_gull/locale/de.txt @@ -0,0 +1,3 @@ +# Translation by Xanthin + +Gull = Moewe diff --git a/mods/friendlies/animal_gull/locale/es.txt b/mods/friendlies/animal_gull/locale/es.txt new file mode 100644 index 00000000..be250934 --- /dev/null +++ b/mods/friendlies/animal_gull/locale/es.txt @@ -0,0 +1,5 @@ +# Spanish translation for Animals Modpack. +# Traducción al español de Animals Modpack. +# Author/Autor: Diego Martínez + +Gull = Gaviota diff --git a/mods/friendlies/animal_gull/locale/template.txt b/mods/friendlies/animal_gull/locale/template.txt new file mode 100644 index 00000000..be87c758 --- /dev/null +++ b/mods/friendlies/animal_gull/locale/template.txt @@ -0,0 +1,3 @@ +# Template + +Gull = diff --git a/mods/friendlies/animal_gull/models/animal_gull.b3d b/mods/friendlies/animal_gull/models/animal_gull.b3d new file mode 100644 index 00000000..03780dda Binary files /dev/null and b/mods/friendlies/animal_gull/models/animal_gull.b3d differ diff --git a/mods/friendlies/animal_gull/models/animal_gull.xcf b/mods/friendlies/animal_gull/models/animal_gull.xcf new file mode 100644 index 00000000..e37b0ccb Binary files /dev/null and b/mods/friendlies/animal_gull/models/animal_gull.xcf differ diff --git a/mods/friendlies/animal_gull/models/gull.blend b/mods/friendlies/animal_gull/models/gull.blend new file mode 100644 index 00000000..6ce5e335 Binary files /dev/null and b/mods/friendlies/animal_gull/models/gull.blend differ diff --git a/mods/friendlies/animal_gull/textures/animal_gull_gull.png b/mods/friendlies/animal_gull/textures/animal_gull_gull.png new file mode 100644 index 00000000..78da86d1 Binary files /dev/null and b/mods/friendlies/animal_gull/textures/animal_gull_gull.png differ diff --git a/mods/friendlies/animal_gull/textures/animal_gull_gull_item.png b/mods/friendlies/animal_gull/textures/animal_gull_gull_item.png new file mode 100644 index 00000000..636afbac Binary files /dev/null and b/mods/friendlies/animal_gull/textures/animal_gull_gull_item.png differ diff --git a/mods/friendlies/animal_gull/textures/animal_gull_mesh.png b/mods/friendlies/animal_gull/textures/animal_gull_mesh.png new file mode 100644 index 00000000..4f5a6785 Binary files /dev/null and b/mods/friendlies/animal_gull/textures/animal_gull_mesh.png differ