Add "mob_shark" mod from "animals_modpack".

This commit is contained in:
AntumDeluge 2016-08-01 04:00:44 -07:00
parent ad7c177d56
commit 265a34d8f5
11 changed files with 203 additions and 0 deletions

View File

@ -35,6 +35,7 @@ The following mods are also included:
* sheep ([Creatures MOB-Engine][cme])
* hostils/
* ghost ([Creatures MOB-Engine][cme])
* mob_shark ([animals_modpack][]) ([CC-BY-SA](mods/hostils/mob_shark/License.txt))
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0](mods/hostils/mobs_goblins/README.md))
* oerrki ([Creatures MOB-Engine][cme])
* zombie ([Creatures MOB-Engine][cme])

View File

@ -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

View File

@ -0,0 +1,5 @@
default
animalmaterials
mob_environments
mobf
intllib?

View File

@ -0,0 +1,181 @@
-------------------------------------------------------------------------------
-- 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 shark implementation
--! @copyright Sapier
--! @author Sapier
--! @date 2014-05-30
--
-- 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
local version = "0.2.0"
minetest.log("action","MOD: mob_shark loading ...")
local selectionbox_shark = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75}
local shark_groups = {
not_in_creative_inventory=1
}
function shark_drop()
local result = {}
if math.random() < 0.01 then
table.insert(result,"animalmaterials:shark_tooth 3")
end
if math.random() < 0.01 then
table.insert(result,"animalmaterials:shark_skin 1")
end
table.insert(result,"animalmaterials:fish_shark 3")
return result
end
local shark_prototype = {
name="shark",
modname="mob_shark",
factions = {
member = {
"animals",
"fish",
"sharks"
}
},
generic = {
description= S("Shark"),
base_health=5,
kill_result=shark_drop,
armor_groups= {
fleshy=20,
},
groups = shark_groups,
envid="deep_water",
population_density = 450,
},
movement = {
default_gen="probab_mov_gen",
min_accel=0.1,
max_accel=0.3,
max_speed=0.8,
pattern="swim_pattern1",
canfly=true,
follow_speedup= { x=20,y=1.5,z=20 },
},
combat = {
angryness=1,
starts_attack=true,
sun_sensitive=false,
melee = {
maxdamage=5,
range=2,
speed=1,
},
distance = nil,
self_destruct = nil,
},
animation = {
swim = {
start_frame = 80,
end_frame = 160,
},
stand = {
start_frame = 1,
end_frame = 80,
},
},
states = {
{
name = "default",
movgen = "none",
chance = 0,
animation = "stand",
graphics_3d = {
visual = "mesh",
mesh = "mob_shark.b3d",
textures = {"mob_shark_shark_mesh.png"},
collisionbox = selectionbox_shark,
visual_size= {x=1,y=1,z=1},
},
graphics = {
sprite_scale={x=2,y=1},
sprite_div = {x=1,y=1},
visible_height = 1,
visible_width = 1,
},
typical_state_time = 30,
},
{
name = "swiming",
movgen = "probab_mov_gen",
chance = 0.9,
animation = "swim",
typical_state_time = 180,
},
{
name = "combat",
typical_state_time = 9999,
chance = 0.0,
animation = "swim",
movgen = "follow_mov_gen"
},
},
}
local shark_name = shark_prototype.modname .. ":" .. shark_prototype.name
local shark_env = mobf_environment_by_name(shark_prototype.generic.envid)
mobf_spawner_register("shark_spawner_1",shark_name,
{
spawnee = shark_name,
spawn_interval = 60,
spawn_inside = shark_env.media,
entities_around =
{
{ type="MAX",distance=1,threshold=0 },
{ type="MAX",entityname=shark_name,
distance=shark_prototype.generic.population_density,threshold=2 },
},
absolute_height =
{
min = -50,
max = -20
},
nodes_around =
{
{type="MIN",distance=2, name={ "default:water_flowing","default:water_source"},threshold=22},
},
-- set to empty to disable relative check
relative_height = {},
collisionbox = selectionbox_shark,
spawns_per_interval = 5
})
--register with animals mod
minetest.log("action","\tadding mob "..shark_prototype.name)
mobf_add_mob(shark_prototype)
minetest.log("action","MOD: mob_shark mod version " .. version .. " loaded")

View File

@ -0,0 +1,3 @@
# Translation by Xanthin
Shark = Hai

View File

@ -0,0 +1,5 @@
# Spanish translation for Animals Modpack.
# Traducción al español de Animals Modpack.
# Author/Autor: Diego Martínez <kaeza>
Shark = Tiburon

View File

@ -0,0 +1,3 @@
# Template
Shark =

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB