This commit is contained in:
runs 2019-08-28 19:55:47 +02:00
parent 194d73f41a
commit d2609ba039
23 changed files with 225 additions and 13 deletions

15
petz/awards.lua Normal file
View File

@ -0,0 +1,15 @@
awards.register_trigger("milk", {
type = "custom",
progress = "@1/@2 buckets of milk",
auto_description = { "Do a foo", "Foo @1 times" },
})
minetest.register_on_milk(function()
for _, trigger in pairs(awards.on.milk) do
if condition then
awards.unlock(trigger)
end
end
end)

View File

@ -23,6 +23,7 @@ Chicken Legs Bucket=Cubo de muslitos de pollo
Chimp=Chimpance
Close=Cerrar
Do your own thing=Anda a tu bola
Dolphin=Delfín
Ducky Egg=Huevo de pato
Ducky Feather=Pluma de pato
Ducky Nest with Egg=Nido de pato con huevo

View File

@ -2,4 +2,4 @@ name = petz
description = Cute mobs for Minetest
depends = default, mobkit, stairs, dye, farming, vessels, wool
optional_depends = bonemeal, 3d_armor
version = 3.0
version = 3.3.11

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,109 @@
mtllib petz_dolphin.mtl
o converted_out
v -0 -0.4375 -0.5
v -0 -0.4375 -0.375
v -0 -0.375 -0.375
v -0 -0.375 -0.5
v -0.0625 -0.4375 -0.5
v -0.0625 -0.4375 -0.375
v -0.0625 -0.375 -0.375
v -0.0625 -0.375 -0.5
v 0.125 -0.5 -0.375
v 0.125 -0.5 0.125
v 0.125 -0.1875 0.125
v 0.125 -0.1875 -0.375
v -0.1875 -0.5 -0.375
v -0.1875 -0.5 0.125
v -0.1875 -0.1875 0.125
v -0.1875 -0.1875 -0.375
v 0.0625 -0.4375 0.125
v 0.0625 -0.4375 0.375
v 0.0625 -0.25 0.375
v 0.0625 -0.25 0.125
v -0.125 -0.4375 0.125
v -0.125 -0.4375 0.375
v -0.125 -0.25 0.375
v -0.125 -0.25 0.125
v 0.25 -0.4375 -0.1875
v 0.25 -0.4375 -0.0625
v 0.25 -0.375 -0.0625
v 0.25 -0.375 -0.1875
v 0.125 -0.4375 -0.1875
v 0.125 -0.4375 -0.0625
v 0.125 -0.375 -0.0625
v 0.125 -0.375 -0.1875
v -0 -0.1875 -0.125
v -0 -0.1875 1.49012e-08
v -0 -0.0625001 1.49012e-08
v -0 -0.0625001 -0.125
v -0.0625 -0.1875 -0.125
v -0.0625 -0.1875 1.49012e-08
v -0.0625 -0.0625001 1.49012e-08
v -0.0625 -0.0625001 -0.125
v 0.125 -0.375 0.375
v 0.125 -0.375 0.5
v 0.125 -0.3125 0.5
v 0.125 -0.3125 0.375
v -0.1875 -0.375 0.375
v -0.1875 -0.375 0.5
v -0.1875 -0.3125 0.5
v -0.1875 -0.3125 0.375
v -0.1875 -0.4375 -0.1875
v -0.1875 -0.4375 -0.0625
v -0.1875 -0.375 -0.0625
v -0.1875 -0.375 -0.1875
v -0.3125 -0.4375 -0.1875
v -0.3125 -0.4375 -0.0625
v -0.3125 -0.375 -0.0625
v -0.3125 -0.375 -0.1875
usemtl none
s off
g snout
f 1 2 3 4
f 5 6 7 8
f 1 4 8 5
f 2 3 7 6
f 1 2 6 5
f 4 3 7 8
g body
f 9 10 11 12
f 13 14 15 16
f 9 12 16 13
f 10 11 15 14
f 9 10 14 13
f 12 11 15 16
g front_tail
f 17 18 19 20
f 21 22 23 24
f 17 20 24 21
f 18 19 23 22
f 17 18 22 21
f 20 19 23 24
g right_fin
f 25 26 27 28
f 29 30 31 32
f 25 28 32 29
f 26 27 31 30
f 25 26 30 29
f 28 27 31 32
g dorsal_fin
f 33 34 35 36
f 37 38 39 40
f 33 36 40 37
f 34 35 39 38
f 33 34 38 37
f 36 35 39 40
g back_tail
f 41 42 43 44
f 45 46 47 48
f 41 44 48 45
f 42 43 47 46
f 41 42 46 45
f 44 43 47 48
g left_fin
f 49 50 51 52
f 53 54 55 56
f 49 52 56 53
f 50 51 55 54
f 49 50 54 53
f 52 51 55 56

Binary file not shown.

View File

@ -3,7 +3,7 @@
##Important: All the values separated by commas have to be without spaces.
##
petz_list = kitty,puppy,ducky,lamb,lion,calf,panda,grizzly,pony,parrot,chicken,piggy,wolf,elephant,elephant_female,pigeon,moth,camel,clownfish,bat,silkworm,chimp,hamster
petz_list = kitty,puppy,ducky,lamb,lion,calf,panda,grizzly,pony,parrot,chicken,piggy,wolf,elephant,elephant_female,pigeon,moth,camel,clownfish,bat,silkworm,chimp,hamster,dolphin
##Type of model [mesh -or- cubic]
type_model = mesh
@ -73,6 +73,7 @@ bat_spawn = true
silkworm_spawn = true
chimp_spawn = true
hamster_spawn = true
dolphin_spawn = true
##Enviromental Damage
air_damage = 1
@ -200,11 +201,6 @@ turtle_follow = default:sand_with_kelp
turtle_spawn_chance = 0.6
turtle_spawn_biome = default
##Clownfish Specific
clownfish_follow = default:coral_orange
clownfish_spawn_chance = 0.6
clownfish_spawn_biome = default
##Tropicalfish Specific
tropicalfish_follow = default:coral_brown
tropicalfish_spawn_chance = 0.6
@ -245,6 +241,12 @@ clownfish_spawn_chance = 1.0
clownfish_spawn_nodes = default:water_source
clownfish_spawn_biome = default
##Dolphin Specific
dolphin_follow = petz:clownfish
dolphin_spawn_chance = 1.0
dolphin_spawn_nodes = default:water_source
dolphin_spawn_biome = default
##Silkworm Specific
silkworm_follow = default:pine_needles
silkworm_spawn_chance = 1.0

View File

@ -1,5 +1,5 @@
--
--DUCKY
--CLOWNFISH
--
local S = ...

View File

@ -0,0 +1,78 @@
--
--DOLPHIN
--
local S = ...
local pet_name = "dolphin"
local scale_model = 1.35
local mesh = 'petz_dolphin.b3d'
local textures= {"petz_dolphin_bottlenose.png"}
local collisionbox = {-0.35, -0.75*scale_model, -0.28, 0.35, -0.125, 0.28}
minetest.register_entity("petz:"..pet_name,{
--Petz specifics
type = "dolphin",
can_swin = true,
groups = {fish= 1},
is_mammal = true,
init_tamagochi_timer = false,
is_pet = false,
has_affinity = false,
is_wild = false,
give_orders = false,
can_be_brushed = false,
capture_item = "lasso",
rotate = petz.settings.rotate,
physical = true,
stepheight = 0.1, --EVIL!
collide_with_objects = true,
collisionbox = collisionbox,
visual = petz.settings.visual,
mesh = mesh,
textures = textures,
visual_size = {x=petz.settings.visual_size.x*scale_model, y=petz.settings.visual_size.y*scale_model},
static_save = true,
on_step = mobkit.stepfunc, -- required
get_staticdata = mobkit.statfunc,
-- api props
springiness= 0,
buoyancy = 0.5, -- portion of hitbox submerged
max_speed = 1,
jump_height = 2.0,
view_range = 10,
lung_capacity = 32767, -- seconds
max_hp = 4,
animation = {
swin={range={x=1, y=13}, speed=20, loop=true},
stand={
{range={x=13, y=25}, speed=5, loop=true},
},
},
sounds = {
misc = "petz_dolphin_clicking",
moaning = "petz_dolphin_moaning",
},
drops = {
{name = "default:coral_cyan", chance = 5, min = 1, max = 1,},
},
brainfunc = petz.aquatic_brain,
on_activate = function(self, staticdata, dtime_s) --on_activate, required
mobkit.actfunc(self, staticdata, dtime_s)
petz.set_initial_properties(self, staticdata, dtime_s)
end,
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
petz.on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir)
end,
on_rightclick = function(self, clicker)
petz.on_rightclick(self, clicker)
end,
})
petz:register_egg("petz:dolphin", S("Dolphin"), "petz_spawnegg_dolphin.png", 0)

View File

@ -135,11 +135,6 @@ petz.settings.turtle_spawn_chance = tonumber(settings:get("turtle_spawn_chance")
petz.settings.turtle_spawn_nodes = settings:get("turtle_spawn_nodes", "")
petz.settings.turtle_spawn_biome = settings:get("turtle_spawn_biome", "default")
petz.settings.turtle_follow = settings:get("turtle_follow", "")
petz.settings.clownfish_spawn = settings:get_bool("clownfish_spawn", true)
petz.settings.clownfish_spawn_chance = tonumber(settings:get("clownfish_spawn_chance"))
petz.settings.clownfish_spawn_nodes = settings:get("clownfish_spawn_nodes", "")
petz.settings.clownfish_spawn_biome = settings:get("clownfish_spawn_biome", "default")
petz.settings.clownfish_follow = settings:get("clownfish_follow", "")
petz.settings.tropicalfish_spawn = settings:get_bool("tropicalfish_spawn", true)
petz.settings.tropicalfish_spawn_chance = tonumber(settings:get("tropicalfish_spawn_chance"))
petz.settings.tropicalfish_spawn_nodes = settings:get("tropicalfish_spawn_nodes", "")
@ -172,10 +167,16 @@ petz.settings.camel_follow = settings:get("camel_follow", "")
petz.settings.camel_predators = settings:get("camel_predators", "")
petz.settings.camel_breed = settings:get("camel_breed", "")
petz.settings.camel_copulation_distance = tonumber(settings:get("camel_copulation_distance"))
petz.settings.clownfish_spawn = settings:get_bool("clownfish_spawn", true)
petz.settings.clownfish_spawn_chance = tonumber(settings:get("clownfish_spawn_chance"))
petz.settings.clownfish_spawn_nodes = settings:get("clownfish_spawn_nodes", "")
petz.settings.clownfish_spawn_biome = settings:get("clownfish_spawn_biome", "default")
petz.settings.clownfish_follow = settings:get("clownfish_follow", "")
petz.settings.dolphin_spawn = settings:get_bool("dolphin_spawn", true)
petz.settings.dolphin_spawn_chance = tonumber(settings:get("dolphin_spawn_chance"))
petz.settings.dolphin_spawn_nodes = settings:get("dolphin_spawn_nodes", "")
petz.settings.dolphin_spawn_biome = settings:get("dolphin_spawn_biome", "default")
petz.settings.dolphin_follow = settings:get("dolphin_follow", "")
petz.settings.bat_spawn = settings:get_bool("bat_spawn", true)
petz.settings.bat_spawn_chance = tonumber(settings:get("bat_spawn_chance"))
petz.settings.bat_spawn_nodes = settings:get("bat_spawn_nodes", "")

View File

@ -190,3 +190,9 @@ filenames: petz_hamster_squeak.ogg & petz_hamster_moaning.ogg
Author: Daniel Simon
http://soundbible.com/2144-Guinea-Pig.html
License: Attribution 3.0
--------------------------------------------
filenames: petz_dolphin_clicking.ogg & petz_dolphin_moaning.ogg
Author: Alexander
http://www.orangefreesounds.com/dolphin-sound/
License: The sound effect is permitted for non-commercial use
under license “Personal Use Only”

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B