master
runs 2019-11-03 01:33:40 +01:00
parent 502229e052
commit aee7c592f3
23 changed files with 110 additions and 10 deletions

View File

@ -1,4 +1,5 @@
# textdomain: petz
@1 at full health (@2)=@1 tiene la salud llena (@2)
Alight=Posarse
A silk bobbin has been created!=¡Se ha creado una bobina de seda!
Bat=Murciélago
@ -55,6 +56,7 @@ had already been spreaded with beaver oil.=ya había sido untado con aceite de c
Hairbrush=Cepillo para pelo
has abandoned you!!!=te ha abandonado!!!
has been captured=ha sido capturado
has been tamed.=ha sido domesticado.
has starved to death!!!=ha muerto de hambre!!!
Honey=Miel
Honeycomb=Panal

View File

@ -1,4 +1,5 @@
# textdomain: petz
@1 at full health (@2)=@1 at full health (@2)
Alight=Свет
A silk bobbin has been created!=Шелковая катушка была создана!
Bat=Летучая мышь
@ -55,6 +56,7 @@ had already been spreaded with beaver oil.=уже были смазаны боб
Hairbrush=Щётка для волос
has abandoned you!!!=бросил тебя...!!!
has been captured=был пойман
has been tamed.=has been tamed.
has starved to death!!!=Умер от голода!!!
Honey=Мед
Honeycomb=Соты

View File

@ -54,6 +54,12 @@ minetest.register_globalstep(function(dtime)
can_spawn = false
end
end
--Check if monsters are disabled
if can_spawn and ent.is_monster == true then
if petz.settings.disable_monsters == true then
can_spawn = false
end
end
end
local spawn_nodes_list = petz.settings[pet_name.."_spawn_nodes"]
if can_spawn and spawn_nodes_list then

View File

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

BIN
petz/models/petz_foxy.b3d Normal file

Binary file not shown.

BIN
petz/models/petz_foxy.blend Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,9 @@
##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
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
disable_monsters = false
##Type of model [mesh -or- cubic]
type_model = mesh
@ -73,7 +75,6 @@ grizzly_spawn = true
pony_spawn = true
parrot_spawn= true
chicken_spawn = true
chimp_spawn = true
pigeon_spawn = true
turtle_spawn = true
clownfish_spawn = true
@ -95,6 +96,7 @@ queen_bee_spawn = true
mr_pumpkin_spawn = true
#Normal bees should not spam!!!
bee_spawn = false
foxy_spawn = true
##Enviromental Damage
air_damage = 1
@ -124,6 +126,7 @@ ducky_follow = farming:seed_wheat
ducky_spawn_chance = 0.6
ducky_spawn_nodes = default:dirt_with_grass
ducky_spawn_biome = default
ducky_predators = petz:foxy
##Beaver Specific
beaver_follow = farming:wheat
@ -202,12 +205,7 @@ chicken_follow = farming:seed_wheat
chicken_spawn_chance = 0.6
chicken_spawn_nodes = default:dirt_with_grass
chicken_spawn_biome = default
##Chimp Specific
chimp_follow = default:blueberries
chimp_spawn_chance = 0.8
chimp_spawn_nodes = default:dirt_with_rainforest_litter
chimp_spawn_biome = default
chicken_predators = petz:foxy
#Piggy Specific
piggy_follow = farming:wheat
@ -313,3 +311,10 @@ mr_pumpkin_follow = farming:pumpkin
mr_pumpkin_spawn_chance = 0.1
mr_pumpkin_spawn_nodes = default:dirt_with_grass
mr_pumpkin_spawn_biome = default
##Foxy Specific
foxy_follow = petz:raw_chicken
foxy_spawn_chance = 0.8
foxy_spawn_nodes = default:dirt_with_coniferous_litter,default:dirt_with_grass
foxy_preys = petz:ducky,petz:chicken,petz:hamster
foxy_spawn_biome = default

85
petz/petz/foxy_mobkit.lua Normal file
View File

@ -0,0 +1,85 @@
--
--FOXY
--
local S = ...
local pet_name = "foxy"
local scale_model = 1.8
petz.foxy = {}
local mesh = 'petz_foxy.b3d'
local textures = {"petz_foxy.png"}
local collisionbox = {-0.5, -0.75*scale_model, -0.5, 0.375, -0.375, 0.375}
minetest.register_entity("petz:"..pet_name,{
--Petz specifics
type = "foxy",
init_tamagochi_timer = true,
is_pet = true,
has_affinity = true,
is_wild =false,
attack_player = false,
give_orders = true,
can_be_brushed = true,
capture_item = "lasso",
follow = petz.settings.foxy_follow,
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,
get_staticdata = mobkit.statfunc,
-- api props
springiness= 0,
buoyancy = 0.5, -- portion of hitbox submerged
max_speed = 2.3,
jump_height = 2.0,
view_range = 10,
lung_capacity = 10, -- seconds
max_hp = 20,
attack={range=0.5, damage_groups={fleshy=7}},
animation = {
walk={range={x=1, y=12}, speed=20, loop=true},
run={range={x=13, y=25}, speed=20, loop=true},
stand={
{range={x=26, y=46}, speed=5, loop=true},
{range={x=47, y=59}, speed=5, loop=true},
{range={x=82, y=94}, speed=5, loop=true},
},
},
sounds = {
misc = "petz_foxy_howl",
moaning = "petz_foxy_moaning",
},
--punch_start = 83, stand4_end = 95,
logic = petz.predator_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,
on_step = function(self, dtime)
mobkit.stepfunc(self, dtime) -- required
petz.on_step(self, dtime)
end,
})
petz:register_egg("petz:foxy", S("Foxy"), "petz_spawnegg_foxy.png", true)

View File

@ -5,7 +5,7 @@ local settings = Settings(modpath .. "/petz.conf")
--A list with all the petz names
petz.settings.petz_list = settings:get("petz_list", "")
petz.petz_list = string.split(petz.settings.petz_list, ',')
petz.settings.disable_monsters = settings:get_bool("disable_monsters", false)
petz.settings.type_model = settings:get("type_model", "mesh")
petz.settings.tamagochi_mode = settings:get_bool("tamagochi_mode", true)
petz.settings.tamagochi_check_time = tonumber(settings:get("tamagochi_check_time"))

Binary file not shown.

Binary file not shown.

BIN
petz/textures/petz_foxy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B