master
runs 2020-01-17 01:31:46 +01:00
parent 1988b18a6a
commit 103de10e70
48 changed files with 1672 additions and 1227 deletions

View File

@ -6,8 +6,8 @@ petz.get_collisionbox = function(p1, p2, scale_model, scale_baby)
local collisionbox = {p1.x, p1.y, p1.z, p2.x, p2.y, p2.z}
local collisionbox_baby
if scale_baby then
p1b = vector.multiply(p1, scale_baby)
p2b = vector.multiply(p2, scale_baby)
local p1b = vector.multiply(p1, scale_baby)
local p2b = vector.multiply(p2, scale_baby)
collisionbox_baby = {p1b.x, p1b.y, p1b.z, p2b.x, p2b.y, p2b.z}
end
return collisionbox, collisionbox_baby

View File

@ -3,8 +3,20 @@ local modpath, S = ...
--
--Helper Functions
--
petz.set_properties = function(self, properties)
if type(self) == 'table' then
self = self.object
end
self:set_properties(properties)
end
function petz.is_night()
local timeofday = minetest.get_timeofday() * 24000
local timeofday = minetest.get_timeofday()
if timeofday == nil then --can be nil if world not loaded
return nil
end
timeofday = timeofday * 24000
if (timeofday < 4500) or (timeofday > 19500) then
return true
else
@ -73,7 +85,7 @@ petz.item_in_itemlist = function(item_name, itemlist)
for i = 1, #items do --loop thru all items
--minetest.chat_send_player("singleplayer", "itemlist item="..items[i])
--minetest.chat_send_player("singleplayer", "item name="..item_name)
item = petz.str_remove_spaces(items[i]) --remove spaces
local item = petz.str_remove_spaces(items[i]) --remove spaces
if string.sub(item, 1, 5) == "group" then
local item_group = minetest.get_item_group(item_name, string.sub(item, 7))
if item_group > 0 then

View File

@ -73,5 +73,12 @@ function petz.on_punch(self, puncher, time_from_last_punch, tool_capabilities, d
self.warn_attack = true
mobkit.clear_queue_high(self)
end
if petz.settings["lycanthropy"] and (self.type == "wolf" or self.type == "werewolf") then -- lycanthropy!
if (self.texture_no == (self.skin_colors-self.mutation+1)) or (self.type == "wolf" and (math.random(1, 200) == 1))
or (self.type == "werewolf" and (math.random(1, 10) == 1)) then
--if black wolf or get the chance or another werewolf
petz.set_lycanthropy(player)
end
end
end
end

View File

@ -22,7 +22,3 @@ petz.do_sound_effect = function(dest, dest_object, soundfile)
minetest.sound_play(soundfile, {pos = dest_object, gain = 0.5, max_hear_distance = petz.settings.max_hear_distance,})
end
end
petz.set_properties = function(self, properties)
self.object:set_properties(properties)
end

View File

@ -36,6 +36,10 @@ 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/food.lua"))(modpath, S) --Load the food items
assert(loadfile(modpath .. "/misc/hunger.lua"))(modpath, S) --Load the food items
if petz.settings["lycanthropy"] then
assert(loadfile(modpath .. "/misc/lycanthropy.lua"))(modpath, S) --Load the food items
end
if minetest.get_modpath("3d_armor") ~= nil then --Armors (optional)
assert(loadfile(modpath .. "/misc/armors.lua"))(modpath, S)
end

View File

@ -175,6 +175,7 @@ You have no pets with a name to call.=No tienes mascotas con nombre para llamar.
@1/@2 buckets of milk=@1/@2 cubos de leche
The Milky Way=La Vía Lactea
Milk @1 times=Ordeña una vaca @1 veces
#Colors
White=Blanco
Dark_grey=Gris oscuro
Brown=Marrón
@ -189,3 +190,14 @@ Dark_brown=Marrón oscuro
Light_brown=Beis
Light_gray=Gris claro
Pink=Rosa
#Lycantrophy
Wolf Jaw=Mandíbula de lobo
Wolf Fur=Piel de lobo
Lycanthropy Remedy=Remedio contra la Licantropía
The Savage Stalkers=Los Acosadores Salvajes
The Bravehide Pride=El Orgullo de Pielbrava
The Hidden Tails=Las Colas Ocultas
You've fallen ill with Lycanthropy!=¡Has enfermado de Licantropía!
You've cured of Lycanthropy=Te has curado de la licantropía
You are now a werewolf=Ahora eres un hombre lobo
You are now a human=Ahora eres humano

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -122,7 +122,6 @@ minetest.register_craftitem("petz:roasted_chicken_legs", {
description = S("Roasted Chicken Legs"),
inventory_image = "petz_roasted_chicken_legs.png",
on_use = minetest.item_eat(5),
groups = {flammable = 2, food = 2},
groups = {flammable = 2, food = 2, food_meat = 1},
})

62
petz/misc/hunger.lua Normal file
View File

@ -0,0 +1,62 @@
if minetest.get_modpath("hunger_ng") ~= nil then
hunger_ng.add_hunger_data('petz:ducky_egg', {
satiates = 2.0,
})
hunger_ng.add_hunger_data('petz:chicken_egg', {
satiates = 2.0,
})
hunger_ng.add_hunger_data('petz:penguin_egg', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('petz:fried_egg', {
satiates = 4.0,
})
hunger_ng.add_hunger_data('petz:fried_egg_bacon', {
satiates = 6.0,
})
hunger_ng.add_hunger_data('petz:frog_leg_roasted', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_parrot', {
satiates = 2.0,
})
hunger_ng.add_hunger_data('petz:roasted_chicken_legs', {
satiates = 5.0,
})
hunger_ng.add_hunger_data('petz:chicken_legs_bucket', {
satiates = 12.0,
})
hunger_ng.add_hunger_data('petz:roasted_chicken', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_porkchop', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_lamb_chop', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:steak', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:roasted_ducky', {
satiates = 3.0,
})
hunger_ng.add_hunger_data('petz:cheese', {
satiates = 5.0,
})
hunger_ng.add_hunger_data('petz:blueberry_cheese_cake', {
satiates = 6.0,
})
hunger_ng.add_hunger_data('petz:blueberry_ice_cream', {
satiates = 7.0,
})
hunger_ng.add_hunger_data('petz:blueberry_muffin', {
satiates = 4.0,
})
hunger_ng.add_hunger_data('petz:gingerbread_cookie', {
satiates = 8.0,
})
hunger_ng.add_hunger_data('petz:candy_cane', {
satiates = 6.0,
})
end

View File

@ -140,6 +140,18 @@ minetest.register_craftitem("petz:ducky_feather", {
groups = {feather = 1},
})
-- Wolf Drops
minetest.register_craftitem("petz:wolf_jaw", {
description = S("Wolf Jaw"),
inventory_image = "petz_wolf_jaw.png",
})
minetest.register_craftitem("petz:wolf_fur", {
description = S("Wolf Fur"),
inventory_image = "petz_wolf_fur.png",
})
--Material for Lion's Cage
minetest.register_node("petz:gray_paving_stone", {

311
petz/misc/lycanthropy.lua Normal file
View File

@ -0,0 +1,311 @@
local modpath, S = ...
local lycanthropy = {}
lycanthropy.clans = {
{
name = S("The Savage Stalkers")
},
{
name = S("The Bravehide Pride")
},
{
name = S("The Hidden Tails")
},
}
lycanthropy.werewolf = {}
lycanthropy.werewolf.model = "petz_werewolf.b3d"
lycanthropy.werewolf.textures = {"petz_werewolf_gray.png"}
lycanthropy.werewolf.collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}
lycanthropy.werewolf.animation_speed = 30
lycanthropy.werewolf.animations = {
stand = {x = 0, y = 79},
lay = {x = 162, y = 166},
walk = {x = 168, y = 187},
mine = {x = 189, y = 198},
walk_mine = {x = 200, y = 219},
sit = {x = 81, y = 160},
}
player_api.register_model(lycanthropy.werewolf.model, {
textures = lycanthropy.werewolf.textures,
animation_speed = lycanthropy.werewolf.animation_speed,
animations = lycanthropy.werewolf.animations,
collisionbox = lycanthropy.werewolf.collisionbox ,
stepheight = 0.6,
eye_height = 1.47,
})
petz.set_lycanthropy = function(player)
local meta = player:get_meta()
local player_name = player:get_player_name()
player_api.set_model(player, lycanthropy.werewolf.model)
player:set_local_animation(
{x = 0, y = 79},
{x = 168, y = 187},
{x = 189, y = 198},
{x = 200, y = 219},
30
)
local werewolf = meta:get_int("petz:werewolf")
local werewolf_texture_no = 1
local werewolf_texture
if werewolf == 0 then
meta:set_int("petz:lycanthropy", 1)
meta:set_int("petz:werewolf", 1)
werewolf_texture_no = math.random(1, #lycanthropy.werewolf.textures)
werewolf_texture = lycanthropy.werewolf.textures[werewolf_texture_no]
meta:set_int("petz:werewolf_texture_no", werewolf_texture_no)
local clan_index = math.random(1, #lycanthropy.clans)
meta:set_int("petz:werewolf_clan_idx", clan_index)
minetest.chat_send_player(player_name, S("You've fallen ill with Lycanthropy!"))
else
werewolf_texture_no = meta:get_int("petz:werewolf_texture_no")
werewolf_texture = lycanthropy.werewolf.textures[werewolf_texture_no]
end
if minetest.get_modpath("3d_armor") ~= nil then
petz.set_3d_armor_lycanthropy(player)
else
player_api.set_textures(player, {werewolf_texture})
end
--petz.set_properties(player, {textures = {werewolf_texture}})
--player:set_properties({textures = {werewolf_texture}})
end
petz.unset_lycanthropy = function(player)
local meta = player:get_meta()
local player_name = player:get_player_name()
if minetest.get_modpath("3d_armor") ~= nil then
player_api.set_model(player, "3d_armor_character.b3d")
else
player_api.set_model(player, "character.b3d")
end
meta:set_int("petz:werewolf", 0)
if minetest.get_modpath("3d_armor") ~= nil then
petz.unset_3d_armor_lycanthropy(player)
else
player_api.set_textures(player, {"character.png"})
end
end
petz.reset_lycanthropy = function(player)
local player_name = player:get_player_name()
local meta = player:get_meta()
if meta:get_int("petz:werewolf") == 1 then
petz.unset_lycanthropy(player)
end
meta:set_int("petz:lycanthropy", 0)
minetest.chat_send_player(player_name, S("You've cured of Lycanthropy"))
end
minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
if not(hitter.type == "petz:wolf") then
return
end
petz.set_lycanthropy(player)
end)
local timer = 0
local last_period_of_day
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if timer >= 5 then --only check each 30 seconds
timer = 0
local current_period_of_day = petz.is_night()
--minetest.chat_send_player("singleplayer", "current="..tostring(current_period_of_day))
--minetest.chat_send_player("singleplayer", "last="..tostring(last_period_of_day))
if (current_period_of_day ~= last_period_of_day) then --only continue if there is a change day-night or night-day
last_period_of_day = current_period_of_day
for _, player in pairs(minetest.get_connected_players()) do
local player_name = player:get_player_name()
local meta = player:get_meta()
local msg = ""
if meta:get_int("petz:lycanthropy") == 1 then
if petz.is_night() == true then
petz.set_lycanthropy(player)
msg = S("You are now a werewolf")
else
petz.unset_lycanthropy(player)
msg = S("You are now a human")
end
end
minetest.chat_send_player(player_name, msg)
end
end
end
end)
minetest.register_on_joinplayer(function(player)
local meta = player:get_meta()
if meta:get_int("petz:werewolf") == 1 then
petz.set_lycanthropy(player)
end
end)
petz.set_3d_armor_lycanthropy = function(player)
local player_name = player:get_player_name()
local meta = player:get_meta()
default.player_set_textures(player, {
lycanthropy.werewolf.textures[meta:get_int("petz:werewolf_texture_no")],
armor.textures[player_name].armor,
armor.textures[player_name].wielditem,
})
end
petz.unset_3d_armor_lycanthropy = function(player)
local player_name = player:get_player_name()
default.player_set_textures(player, {
armor.textures[player_name].skin,
armor.textures[player_name].armor,
armor.textures[player_name].wielditem,
})
end
if minetest.get_modpath("3d_armor") ~= nil then --Armors (optional)
armor:register_on_update(function(player)
local meta = player:get_meta()
if meta:get_int("petz:werewolf") == 1 then
petz.set_3d_armor_lycanthropy(player)
end
end)
end
--
--CHAT COMMANDS
--
minetest.register_chatcommand("werewolf", {
description = "Convert a player into a werewolf",
privs = {
server = true,
},
func = function(name, param)
local subcommand, player_name = string.match(param, "([%a%d_-]+) ([%a%d_-]+)")
if not(subcommand == "set") and not(subcommand == "unset") and not(subcommand == "reset") then
return true, "Error: The subcomands for the werewolf command are 'set' / 'unset'"
end
if player_name then
local player = minetest.get_player_by_name(player_name)
if player then
if subcommand == "set" then
petz.set_lycanthropy(player)
return true, player_name .." ".."set to werewolf!"
elseif subcommand == "unset" then
petz.unset_lycanthropy(player)
return true, "The werewolf".." "..player_name .." ".."reseted to human!"
elseif subcommand == "reset" then
petz.reset_lycanthropy(player)
return true, "The lycanthropy of".." "..player_name .." ".."was cured!"
end
else
return false, player_name .." ".."not online!"
end
else
return true, "Not a player name in command"
end
end,
})
--Lycanthropy Items
minetest.register_craftitem("petz:lycanthropy_remedy", {
description = S("Lycanthropy Remedy"),
inventory_image = "petz_lycanthropy_remedy.png",
wield_image = "petz_lycanthropy_remedy.png"
})
minetest.register_craft({
type = "shaped",
output = "petz:beaver_oil",
recipe = {
{"", "petz:wolf_jaw", ""},
{"", "petz:wolf_fur", ""},
{"", "petz:beaver_oil", ""},
}
})
--
-- WEREWOLF MONSTER
--
local pet_name = "werewolf"
local scale_model = 1.0
local mesh = lycanthropy.werewolf.model
local textures = lycanthropy.werewolf.textures
local collisionbox = lycanthropy.werewolf.collisionbox
minetest.register_entity("petz:"..pet_name,{
--Petz specifics
type = "werewolf",
init_tamagochi_timer = false,
is_pet = false,
is_monster = true,
is_boss = true,
has_affinity = false,
is_wild = true,
attack_player = true,
give_orders = false,
can_be_brushed = false,
capture_item = nil,
follow = petz.settings.werewolf_follow,
drops = {
{name = "petz:christmas_present", chance = 3, min = 1, max = 1,},
{name = "petz:gingerbread_cookie", chance = 1, min = 1, max = 6,},
{name = "petz:candy_cane", chance = 1, min = 1, max = 6,},
},
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=1.0*scale_model, y=1.0*scale_model},
static_save = true,
get_staticdata = mobkit.statfunc,
-- api props
springiness= 0,
buoyancy = 0.5, -- portion of hitbox submerged
max_speed = 1.5,
jump_height = 1.5,
view_range = 20,
lung_capacity = 10, -- seconds
max_hp = 50,
attack={range=0.5, damage_groups={fleshy=9}},
animation = {
walk={range={x=168, y=187}, speed=30, loop=true},
run={range={x=168, y=187}, speed=30, loop=true},
stand={range={x=0, y=79}, speed=30, loop=true},
},
sounds = {
misc = "petz_merry_christmas",
attack = "petz_ho_ho_ho",
laugh = "petz_ho_ho_ho",
die = "petz_monster_die",
},
logic = petz.monster_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:werewolf", S("Werewolf"), "petz_spawnegg_werewolf.png", false)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -64,6 +64,9 @@ bee_outing_ratio = 20
#behive_spawn_chance = 0.6
#max_behives_in_area = 3
#Lycanthropy stuff
lycanthropy = false
##Spawn Mobs?
kitty_spawn = true
puppy_spawn = true

View File

@ -6,7 +6,7 @@ local mesh = 'petz_bat.b3d'
local textures= {"petz_bat.png", "petz_bat2.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.125}
local p2 = {x= 0.1875, y = 0.0, z = 0.125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_beaver.b3d'
local textures= {"petz_beaver.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.1875}
local p2 = {x= 0.1875, y = -0.0625, z = 0.375}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -22,7 +22,7 @@ for i=1, 2 do
local mesh = 'petz_bee.b3d'
local p1 = {x= -0.1875, y = -0.5, z = -0.3125}
local p2 = {x= 0.25, y = 0.0625, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_calf.b3d'
local textures= {"petz_calf.png", "petz_calf2.png", "petz_calf3.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.1875}
local p2 = {x= 0.125, y = -0.0625, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_chicken.b3d'
local textures= {"petz_chicken.png", "petz_chicken2.png", "petz_chicken3.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.125}
local p2 = {x= 0.125, y = -0.125, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_chimp.b3d'
local textures = {"petz_chimp.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.125}
local p2 = {x= 0.1875, y = -0.125, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_clownfish.b3d'
local textures= {"petz_clownfish.png"}
local p1 = {x= -0.1875, y = -0.5, z = -0.1875}
local p2 = {x= 0.125, y = -0.25, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_dolphin.b3d'
local textures= {"petz_dolphin_bottlenose.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.3125}
local p2 = {x= 0.1875, y = -0.125, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_ducky.b3d'
local textures= {"petz_ducky.png", "petz_ducky2.png", "petz_ducky3.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.125}
local p2 = {x= 0.125, y = -0.0625, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_foxy.b3d'
local textures = {"petz_foxy.png"}
local p1 = {x= -0.1875, y = -0.5, z = -0.25}
local p2 = {x= 0.1875, y = -0.0625, z = 0.375}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_frog.b3d'
local textures= {"petz_frog.png", "petz_frog2.png", "petz_frog3.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.25}
local p2 = {x= 0.1875, y = -0.1875, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_grizzly.b3d'
local textures= {"petz_grizzly.png", "petz_grizzly2.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.4375}
local p2 = {x= 0.25, y = 0.25, z = 0.4375}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_kitty.b3d'
local textures= {"petz_kitty.png", "petz_kitty2.png", "petz_kitty3.png", "petz_kitty4.png", "petz_kitty5.png", "petz_kitty6.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.3125}
local p2 = {x= 0.125, y = -0.0625, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name, {
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_lion.b3d'
local textures = {"petz_lion.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.125}
local p2 = {x= 0.125, y = 0.0, z = 0.25}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -6,7 +6,7 @@ local mesh = 'petz_moth.b3d'
local textures= {"petz_moth.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.4375}
local p2 = {x= 0.3125, y = -0.1875, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -6,7 +6,7 @@ local mesh = 'petz_parrot.b3d'
local textures= {"petz_parrot.png", "petz_parrot2.png", "petz_parrot3.png", "petz_parrot4.png", "petz_parrot5.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.125}
local p2 = {x= 0.0625, y = 0.125, z = 0.1875}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -6,7 +6,7 @@ local mesh = 'petz_penguin.b3d'
local textures= {"petz_penguin.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.125}
local p2 = {x= 0.0625, y = 0.1875, z = 0.125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_pigeon.b3d'
local textures= {"petz_pigeon.png", "petz_pigeon2.png", "petz_pigeon3.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.125}
local p2 = {x= 0.125, y = -0.125, z = 0.125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_piggy.b3d'
local textures = {"petz_piggy.png"}
local p1 = {x= -0.1875, y = -0.5, z = -0.4375}
local p2 = {x= 0.1875, y = 0.375, z = 0.25}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_polar_bear.b3d'
local textures= {"petz_polar_bear.png"}
local p1 = {x= -0.25, y = -0.5, z = -0.4375}
local p2 = {x= 0.25, y = 0.125, z = 0.5}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_puppy.b3d'
local textures= {"petz_puppy.png", "petz_puppy2.png", "petz_puppy3.png"}
local p1 = {x= -0.0625, y = -0.5, z = -0.125}
local p2 = {x= 0.125, y = -0.1875, z = 0.25}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name, {
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_silkworm.b3d'
local textures= {"petz_silkworm.png", "petz_silkworm2.png", "petz_silkworm3.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.3125}
local p2 = {x= 0.0625, y = -0.25, z = 0.3125}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -6,7 +6,7 @@ local mesh = 'petz_toucan.b3d'
local textures= {"petz_toucan.png", "petz_toucan2.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.25}
local p2 = {x= 0.125, y = 0.3125, z = 0.375}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -9,7 +9,7 @@ local mesh = 'petz_tropicalfish.b3d'
local textures= {"petz_tropicalfish.png", "petz_tropicalfish2.png", "petz_tropicalfish3.png"}
local p1 = {x= -0.125, y = -0.5, z = -0.1875}
local p2 = {x= 0.1875, y = 0.1875, z = 0.375}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -10,7 +10,7 @@ local mesh = 'petz_turtle.b3d'
local textures= {"petz_turtle.png", "petz_turtle2.png", "petz_turtle3.png",}
local p1 = {x= -0.1875, y = -0.5, z = -0.1875}
local p2 = {x= 0.1875, y = 0.01, z = 0.25}
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, scale_baby)
local collisionbox, collisionbox_baby = petz.get_collisionbox(p1, p2, scale_model, nil)
minetest.register_entity("petz:"..pet_name,{
--Petz specifics

View File

@ -69,6 +69,10 @@ minetest.register_entity("petz:"..pet_name,{
misc = "petz_wolf_howl",
moaning = "petz_wolf_moaning",
},
drops = {
{name = "petz:wolf_fur", chance = 5, min = 1, max = 1,},
{name = "petz:wolf_jaw", chance = 5, min = 1, max = 1,},
},
--punch_start = 83, stand4_end = 95,

View File

@ -48,6 +48,8 @@ petz.settings.bee_outing_ratio = tonumber(settings:get("bee_outing_ratio", "20")
--petz.settings.max_behives_in_area = tonumber(settings:get("max_behives_in_area")) or 0.0
--Weapons
petz.settings.pumpkin_grenade_damage = tonumber(settings:get("pumpkin_grenade_damage", "8"))
--Lycanthropy
petz.settings.lycanthropy = settings:get_bool("lycanthropy", true)
--Mobs Specific
for i = 1, #petz.petz_list do --load the settings
local petz_type = petz.petz_list[i]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB