master
runs 2019-11-16 22:03:16 +01:00
parent 9490ef01ae
commit 0ae88ab7bf
15 changed files with 68 additions and 39 deletions

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
mobkit
default

View File

@ -5,7 +5,7 @@ petz.lay_egg = function(self)
local pos = self.object:get_pos()
if self.type_of_egg == "item" then
if math.random(1, petz.settings.lay_egg_chance) == 1 then
minetest.add_item(pos, "petz:"..self.type.."_egg") --chicken/duck egg!
minetest.add_item(pos, "petz:"..self.type.."_egg") --chicken/duck/penguin egg!
end
end
if self.lay_eggs_in_nest == true then

View File

@ -35,7 +35,7 @@ assert(loadfile(modpath .. "/misc/brains.lua"))(modpath, S)
assert(loadfile(modpath .. "/misc/behaviours.lua"))(modpath, S)
assert(loadfile(modpath .. "/misc/nodes.lua"))(modpath, S) --Load the nodes
assert(loadfile(modpath .. "/misc/items.lua"))(modpath, S) --Load the items
--assert(loadfile(modpath .. "/misc/chests.lua"))(modpath, S) --Load the chests
assert(loadfile(modpath .. "/misc/chests.lua"))(modpath, S) --Load the chests
assert(loadfile(modpath .. "/misc/food.lua"))(modpath, S) --Load the food items
assert(loadfile(modpath .. "/misc/spawn.lua"))(modpath, S) --Load the spawn engine
if minetest.get_modpath("3d_armor") ~= nil then --Armors (optional)

View File

@ -93,6 +93,7 @@ No honey in the behive.=No hay miel en la colmena.
Orders=Ordenes
Parrot=Loro
Penguin=Pinguino
Penguin Egg=Huevo de pinguino
Perch on shoulder=Pósate hombro
Pet Bowl=Bol de mascota
Pet Dreamcatcher=Cazador de Sueños de mascota
@ -155,6 +156,7 @@ Whip=Látigo
Worker Bee=Abeja obrera
Pet Whistle=Silbato para mascota
Wolf=Lobo
Write=Escribir
Your=Tu
You are not the owner of the=Tú no eres el propietario del
You got the bobbin!=¡Has obtenido la bobina!
@ -170,7 +172,6 @@ Grey=Gris
Vanilla=Vainilla
Yellow=Pardo
White_dotted=A manchas blanco
Write=Escribir
Gray_dotted=A manchas gris
Black=Negro
Golden=Dorado

View File

@ -28,10 +28,11 @@ Chicken=Цыплёнок
Chicken Legs=Куриные ножки
Chicken Legs Bucket=Ведро с курятиной
Chimp=Шимпанзе
Christmas Card=Christmas Card
Christmas Present=Christmas Present
Christmas Card=Рождественская открытка
Christmas Present=Новогодний подарок
Close=Закрыть
Clownfish=Рыба-клоун
Compose a message=Compose a message
Color=Цвет
Do your own thing=Отпустить погулять
Dolphin=Дельфин
@ -54,7 +55,7 @@ Gender=Пол
Glass Syringe=Стеклянный шприц
Glass Syringe with seed=Стеклянный шприц с семенами
Guard=Сохранить
had already been brushed.=уже почистили.
had already been brushed.=уже расчесывали.
had already been spreaded with beaver oil.=уже были смазаны бобровым жиром.
Hairbrush= Щётка для волос
has abandoned you!!!=бросил тебя...!!!
@ -76,8 +77,8 @@ Lasso=Лассо
Lamb=Ягнёнок
Leather=Кожа
Lion=Лев
Male=Самец
Merry Christmas=Merry Christmas
Male=Самец
Merry Christmas=С Рождеством!
Mini Lamb Chop=Отбивная из ягненка
Milk Bucket=Ведро с молоком
more to create the bobbin.=больше для создания катушки.
@ -91,7 +92,7 @@ No room in your inventory for the honey bottle.=В вашем инвентаре
No honey in the behive.=Мёда больше нет в улье!
Orders=Приказы
Parrot=Попугай
Penguin=Penguin
Penguin=Пингвин
Perch on shoulder=Окунь на лопатке
Pet Bowl=Миска для питомца
Pet Dreamcatcher=Поймать питомца мечты
@ -99,11 +100,11 @@ Pigeon=Голубь
Piggy=Свинья
Pollen=Пыльца
Pony=Пони
Polar Bear=Polar Bear
Polar Bear=Белый медведь
Pregnant=Беременна
Pumpkin Hood=Тыквенный колпак
Pumpkin Hood=Тыквенный голова
Puppy=Щенок
Prince Crown=Принц наследник
Prince Crown=Королевская корона
Queen Bee=Королева пчел
Raw Chicken=Сырая курица
Raw Ducky=Сырая Утка
@ -154,6 +155,7 @@ Whip=Кнут
Worker Bee=Пчела-рабочий
Pet Whistle=Домашний свисток
Wolf=Волк
Write=Write
Your=Твой
You are not the owner of the=Вы не являетесь владельцем
You got the bobbin!=Катушка у тебя!!

View File

@ -189,7 +189,7 @@ function petz.herbivore_brain(self)
if player then
local player_pos = player:get_pos()
local wielded_item_name = player:get_wielded_item():get_name()
if self.is_pet == false and self.follow ~= wielded_item_name and vector.distance(pos, player_pos) <= self.view_range then
if self.is_pet == false and self.follow ~= wielded_item_name and vector.distance(pos, player_pos) <= self.view_range then
mobkit.hq_runfrom(self, 14, player)
return
end
@ -646,6 +646,10 @@ function petz.semiaquatic_brain(self)
end
end
if prty < 6 then
petz.bh_replace(self)
end
-- Default Random Sound
petz.random_mob_sound(self)

View File

@ -132,11 +132,14 @@ end
function mobkit.lq_dumbfly(self, speed_factor)
local timer = petz.settings.fly_check_time
local status = "ascend"
local fly_status = ""
speed_factor = speed_factor or 1
local func = function(self)
timer = timer - self.dtime
if timer < 0 then
if fly_status == "" then
fly_status = "ascend"
end
--minetest.chat_send_player("singleplayer", tostring(timer))
local velocity = self.object:getvelocity()
local mob = self.object
@ -156,19 +159,19 @@ function mobkit.lq_dumbfly(self, speed_factor)
if mobkit.check_height(self) == false or mobkit.node_name_in(self, "top") ~= "air" then --check if max height, then stand or descend, or a node above the petz
random_num = math.random(1, 100)
if random_num < 70 then
status = "descend"
fly_status = "descend"
else
status = "stand"
fly_status = "stand"
end
else --check if water below, if yes ascend
local node_name = mobkit.node_name_in(self, "below")
if minetest.get_item_group(node_name, "water") >= 1 then
status = "ascend"
fly_status = "ascend"
end
end
--minetest.chat_send_player("singleplayer", status)
--local node_name_in_front = mobkit.node_name_in(self, "front")
if status == "stand" then -- stand
if fly_status == "stand" then -- stand
velocity = {
x= self.max_speed* speed_factor *2,
y= 0.0,
@ -176,12 +179,12 @@ function mobkit.lq_dumbfly(self, speed_factor)
}
random_num = math.random(1, 100)
if random_num < 20 and mobkit.check_height(self) == false then
status = "descend"
fly_status = "descend"
elseif random_num < 40 then
status = "ascend"
fly_status = "ascend"
end
--minetest.chat_send_player("singleplayer", "stand")
elseif status == "descend" then -- descend
elseif fly_status == "descend" then -- descend
velocity = {
x = self.max_speed* speed_factor,
y = -self.max_speed * speed_factor,
@ -189,13 +192,13 @@ function mobkit.lq_dumbfly(self, speed_factor)
}
random_num = math.random(1, 100)
if random_num < 20 then
status = "stand"
fly_status = "stand"
elseif random_num < 40 then
status = "ascend"
fly_status = "ascend"
end
--minetest.chat_send_player("singleplayer", "descend")
elseif status == "ascend" then --ascend
status = "ascend"
elseif fly_status == "ascend" then --ascend
fly_status = "ascend"
velocity ={
x = self.max_speed * speed_factor,
y = self.max_speed * speed_factor * 2,

View File

@ -18,6 +18,14 @@ minetest.register_craftitem("petz:chicken_egg", {
groups = {flammable = 2, food = 2, food_egg = 1},
})
minetest.register_craftitem("petz:penguin_egg", {
description = S("Penguin Egg"),
inventory_image = "petz_penguin_egg.png",
wield_image = "petz_penguin_egg.png",
on_use = minetest.item_eat(1),
groups = {flammable = 2, food = 2, food_egg = 1},
})
minetest.register_craftitem("petz:fried_egg", {
description = S("Fried Egg"),
inventory_image = "petz_fried_egg.png",

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,dolphin,tropicalfish,beaver,turtle,frog,toucan,bee,queen_bee,mr_pumpkin,foxy
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,tropicalfish,beaver,turtle,frog,toucan,bee,queen_bee,mr_pumpkin,foxy,penguin
disable_monsters = false
@ -100,7 +100,7 @@ mr_pumpkin_spawn = true
#Normal bees should not spam!!!
bee_spawn = false
foxy_spawn = true
#penguin_spawn = true
penguin_spawn = false
##Enviromental Damage
air_damage = 1

View File

@ -15,8 +15,8 @@ local textures = {}
for n = 1, #skin_colors do
textures[n] = "petz_"..pet_name.."_"..skin_colors[n]..".png"
end
local collisionbox = {-0.35, -0.75*scale_model, -0.28, 0.35, -0.35, 0.28}
local collisionbox_baby = {-0.35*scale_baby, -0.75*scale_model*scale_baby, -0.28, 0.35, -0.35, 0.28}
local collisionbox = {0.3125, -0.75*scale_model, 0.5, -0.15625, -0.3125, -0.3125}
local collisionbox_baby = {0.3125*scale_baby, -0.75*scale_model*scale_baby, 0.5, -0.15625, -0.3125, -0.3125}
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -4,21 +4,24 @@ local pet_name = "penguin"
local scale_model = 0.7
local mesh = 'petz_penguin.b3d'
local textures= {"petz_penguin.png"}
local collisionbox = {-0.35, -0.75*scale_model, -0.28, 0.35, 0.35, 0.28}
local collisionbox = {0.125, -0.75*scale_model, 0.125, -0.1875, 0.1875, -0.125}
minetest.register_entity("petz:"..pet_name,{
--Petz specifics
type = "penguin",
init_tamagochi_timer = true,
is_pet = true,
can_fly = true,
max_height = 5,
has_affinity = true,
init_tamagochi_timer = false,
is_pet = true,
can_fly = false,
max_height = 2,
has_affinity = false,
is_wild = false,
feathered = true,
give_orders = true,
give_orders = false,
can_be_brushed = true,
capture_item = "net",
lay_eggs = true,
lay_eggs_in_nest = false,
type_of_egg = "item",
follow = petz.settings.penguin_follow,
drops = {
},
@ -37,7 +40,7 @@ minetest.register_entity("petz:"..pet_name,{
-- api props
springiness= 0,
buoyancy = 0.5, -- portion of hitbox submerged
max_speed = 2.5,
max_speed = 1.0,
jump_height = 2.0,
view_range = 10,
max_hp = 8,
@ -54,10 +57,10 @@ minetest.register_entity("petz:"..pet_name,{
},
fly={range={x=92, y=98}, speed=25, loop=true},
stand_fly={range={x=92, y=98}, speed=25, loop=true},
def = {range={x=99, y=111}, speed=5, loop=true},
def = {range={x=99, y=111}, speed=15, loop=true},
},
sounds = {
misc = "petz_penguin_chirp",
misc = "petz_penguin_quak",
moaning = "petz_penguin_moaning",
},

View File

@ -243,3 +243,9 @@ Author: Alexander
http://www.orangefreesounds.com/fireball-sound-effect/
License: The sound effect is permitted for non-commercial use
under license “Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)”
--------------------------------------------
filenames: petz_penguin_quak.ogg & petz_penguin_moaning.ogg
Author: Alexander
https://www.freesoundeffects.com/
License: The sound effect is permitted for non-commercial use
under license “Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)”

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB