new panda texture and some code tweaks

This commit is contained in:
tenplus1 2022-08-26 10:35:32 +01:00
parent 15a6083540
commit 23e608eda7
7 changed files with 41 additions and 31 deletions

View File

@ -1,3 +1,5 @@
* 2021-03-30 : Poikilos
* Add more details to the panda texture (Change every pixel give or take a few) while reducing the number of pixels.
* 2021-02-01 : TenPlus1 * 2021-02-01 : TenPlus1
* Updated and tidied code to work with Minetest 5.x and latest Mobs Redo API * Updated and tidied code to work with Minetest 5.x and latest Mobs Redo API
* Fixed a few nil error bugs * Fixed a few nil error bugs

View File

@ -79,18 +79,24 @@ end
minetest.register_on_leaveplayer(function(player) minetest.register_on_leaveplayer(function(player)
if player then
force_detach(player) force_detach(player)
end
end) end)
minetest.register_on_shutdown(function() minetest.register_on_shutdown(function()
local players = minetest.get_connected_players() local players = minetest.get_connected_players()
for i = 1,#players do for i = 1, #players do
if players[i] then
force_detach(players[i]) force_detach(players[i])
end end
end
end) end)
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
if player then
force_detach(player) force_detach(player)
end
return true return true
end) end)

View File

@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
License for Textures, Models License for Textures, Models
--------------------------------------- ---------------------------------------
CC BY-SA 3.0 UNPORTED. Created by D00Med CC BY-SA 3.0 UNPORTED. Created by D00Med except where an author is listed
Roar.ogg - CC BY 3.0 Mike Koenig - http://soundbible.com/1165-Dinosaur-Roar.html Roar.ogg - CC BY 3.0 Mike Koenig - http://soundbible.com/1165-Dinosaur-Roar.html
Velociraptor.ogg - CC BY 3.0 snottyboi - http://soundbible.com/1373-Velociraptor-Call.html Velociraptor.ogg - CC BY 3.0 snottyboi - http://soundbible.com/1373-Velociraptor-Call.html
@ -30,6 +30,7 @@ whale_1.ogg - CC0 Public Domain - https://en.wikipedia.org/wiki/File:Humpbackwha
mobs_pig.ogg - from mobs_animal by TenPlus1 (MIT) mobs_pig.ogg - from mobs_animal by TenPlus1 (MIT)
dmobs_chirrup.ogg - CC BY SA 3.0 taikedz dmobs_chirrup.ogg - CC BY SA 3.0 taikedz
wasp.ogg - Public Domain wasp.ogg - Public Domain
dmobs_panda.png - CC BY SA 3.0 2016 D00Med & 2021 Poikilos
* dmobs_thunder.ogg - CC-0 : https://freesound.org/people/Josh74000MC/sounds/475094/ * dmobs_thunder.ogg - CC-0 : https://freesound.org/people/Josh74000MC/sounds/475094/
* dmobs_wind.ogg - CC-BY 3.0 : https://freesound.org/people/Pedaling%20Prince/sounds/338952/ * dmobs_wind.ogg - CC-BY 3.0 : https://freesound.org/people/Pedaling%20Prince/sounds/338952/

View File

@ -8,46 +8,47 @@ mobs:register_mob("dmobs:owl", {
visual = "mesh", visual = "mesh",
mesh = "owl.b3d", mesh = "owl.b3d",
textures = { textures = {
{"dmobs_owl.png"}, {"dmobs_owl.png"}
}, },
blood_texture = "mobs_blood.png", blood_texture = "mobs_blood.png",
visual_size = {x=2, y=2}, visual_size = {x = 2, y = 2},
makes_footstep_sound = false, makes_footstep_sound = false,
walk_velocity = 0, walk_velocity = 0,
run_velocity = 0, run_velocity = 0,
jump = false, jump = false,
drops = { drops = {
{name = "default:dry_grass_1", chance = 1, min = 1, max = 1}, {name = "default:dry_grass_1", chance = 1, min = 1, max = 1}
}, },
water_damage = 2, water_damage = 2,
lava_damage = 2, lava_damage = 2,
fire_damage = 2, fire_damage = 2,
light_damage = 0, light_damage = 0,
view_range = 1, view_range = 1,
do_custom = function(self)
local daytime = minetest.get_timeofday()*24000
if daytime <=6000 then
self.object:set_properties({
textures = {"dmobs_owl_awake.png"},
mesh = "owl.b3d",
})
elseif daytime >=6000 then
self.object:set_properties({
textures = {"dmobs_owl.png"},
mesh = "owl.b3d",
})
end
end,
animation = { animation = {
speed_normal = 1, speed_normal = 1,
walk_start = 1, walk_start = 1,
walk_end = 50, walk_end = 50
}, },
do_custom = function(self)
local daytime = minetest.get_timeofday() * 24000
if daytime <= 6000 then
self.object:set_properties({
textures = {"dmobs_owl_awake.png"},
mesh = "owl.b3d"
})
elseif daytime >= 6000 then
self.object:set_properties({
textures = {"dmobs_owl.png"},
mesh = "owl.b3d"
})
end
end
}) })

View File

@ -40,7 +40,7 @@ mobs:register_mob("dmobs:tortoise", {
fall_damage = 1, fall_damage = 1,
fall_speed = -10, fall_speed = -10,
fear_height = 4, fear_height = 4,
follow = {"default:papyrus"}, follow = {"default:papyrus", "default:leaves"},
view_range = 14, view_range = 14,
animation = { animation = {
speed_normal = 6, speed_normal = 6,

View File

@ -60,4 +60,4 @@ mobs:register_mob("dmobs:whale", {
}) })
mobs:register_egg("dmobs:whale", "Whale", "default_water.png", 1) mobs:register_egg("dmobs:whale", "Whale", "default_water_source.png", 1)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 20 KiB