added wolf
This commit is contained in:
parent
5ed9fb1947
commit
3c5951229c
@ -141,14 +141,19 @@ end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if pets.players_pets[player:get_player_name()] then
|
||||
local vec = player:getpos()
|
||||
vec.x = vec.x + math.random(-3, 3)
|
||||
vec.z = vec.z + math.random(-3, 3)
|
||||
vec.y = vec.y + 3
|
||||
print("[pets] add entity " .. pets.players_pets[player:get_player_name()])
|
||||
local plpet = minetest.add_entity(vec, pets.players_pets[player:get_player_name()])
|
||||
plpet:get_luaentity().pl = player
|
||||
plpet:get_luaentity().is_pet = true
|
||||
minetest.after(3, function(player)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
local vec = player:getpos()
|
||||
vec.x = vec.x + math.random(-3, 3)
|
||||
vec.z = vec.z + math.random(-3, 3)
|
||||
vec.y = vec.y + 3
|
||||
local plpet = minetest.add_entity(vec, pets.players_pets[player:get_player_name()])
|
||||
plpet:get_luaentity().pl = player
|
||||
plpet:get_luaentity().is_pet = true
|
||||
end , player)
|
||||
end
|
||||
end)
|
||||
|
||||
@ -167,5 +172,6 @@ pets.register_pet("pets:sheep", {
|
||||
mesh = "pets_sheep.x",
|
||||
textures = {"pets_sheep.png",},
|
||||
})
|
||||
|
||||
pets.load_pets()
|
||||
|
||||
|
21
mods/wolf/LICENSE.txt
Normal file
21
mods/wolf/LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
||||
License for Code
|
||||
----------------
|
||||
|
||||
Copyright (C) 2016 cd2 (cdqwertz) <cdqwertz@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
License for Media
|
||||
-----------------
|
||||
|
||||
cd2 (cdqwertz) (CC-BY-SA 3.0 UNPORTED):
|
||||
wolf_black.png
|
||||
pets_wolf_spawn.png
|
||||
|
||||
farfadet46 (CC0):
|
||||
wolf_wolf.x
|
1
mods/wolf/depends.txt
Normal file
1
mods/wolf/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
pets
|
7
mods/wolf/init.lua
Normal file
7
mods/wolf/init.lua
Normal file
@ -0,0 +1,7 @@
|
||||
pets.register_pet("wolf:wolf", {
|
||||
description = "wolf",
|
||||
hp_max = 30,
|
||||
collisionbox = {-0.3,-0.5,-0.3, 0.3,0.1,0.3},
|
||||
mesh = "wolf_wolf.x",
|
||||
textures = {"wolf_black.png",},
|
||||
})
|
4411
mods/wolf/models/wolf_wolf.x
Normal file
4411
mods/wolf/models/wolf_wolf.x
Normal file
File diff suppressed because it is too large
Load Diff
BIN
mods/wolf/textures/pets_wolf_spawn.png
Normal file
BIN
mods/wolf/textures/pets_wolf_spawn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 221 B |
BIN
mods/wolf/textures/wolf_black.png
Normal file
BIN
mods/wolf/textures/wolf_black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 983 B |
Loading…
x
Reference in New Issue
Block a user