Commit 31ad3722 authored by D00Med's avatar D00Med Committed by GitHub

Merge pull request #5 from taikedz/hatching

Hatching and sound
parents 232ff69f 2c3a3e9e
......@@ -756,8 +756,9 @@ minetest.register_node("dmobs:dragon_egg_fire", {
minetest.after(100, function(pos, dragon, pname)
minetest.remove_node(pos)
local ent = minetest.add_entity(pos, "dmobs:dragon_red")
minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
local obj = ent:get_luaentity()
self.object:set_properties({
ent:set_properties({
textures = {"dmobs_dragon_young.png"},
visual_size = {x=1, y=1},
})
......@@ -785,6 +786,7 @@ minetest.register_node("dmobs:dragon_egg_lightning", {
if wield_item == "dmobs:dragon_gem_lightning" then
minetest.after(100, function(pos, dragon, pname)
minetest.remove_node(pos)
minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
local ent = minetest.add_entity(pos, "dmobs:dragon_black")
local obj = ent:get_luaentity()
ent:set_properties({
......@@ -814,9 +816,10 @@ minetest.register_node("dmobs:dragon_egg_poison", {
if wield_item == "dmobs:dragon_gem_poison" then
minetest.after(100, function(pos, dragon, pname)
minetest.remove_node(pos)
minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
local ent = minetest.add_entity(pos, "dmobs:dragon_green")
local obj = ent:get_luaentity()
obj:set_properties({
ent:set_properties({
textures = {"dmobs_dragon_young.png"},
visual_size = {x=1, y=1},
})
......@@ -843,9 +846,10 @@ minetest.register_node("dmobs:dragon_egg_ice", {
if wield_item == "dmobs:dragon_gem_ice" then
minetest.after(100, function(pos, dragon, pname)
minetest.remove_node(pos)
minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
local ent = minetest.add_entity(pos, "dmobs:dragon_blue")
local obj = ent:get_luaentity()
obj:set_properties({
ent:set_properties({
textures = {"dmobs_dragon_young.png"},
visual_size = {x=1, y=1},
})
......@@ -1172,7 +1176,12 @@ mobs:register_egg("dmobs:dragon", "Wild Fire Dragon", "default_apple.png", 1)
mobs:register_egg("dmobs:dragon2", "Wild Lightning Dragon", "default_mese_crystal.png", 1)
mobs:register_egg("dmobs:dragon3", "Wild Poison Dragon", "dmobs_poison.png", 1)
mobs:register_egg("dmobs:dragon4", "Wild Ice Dragon", "default_ice.png", 1)
mobs:register_egg("dmobs:dragon_red", "Tame Fire Dragon", "dmobs_egg.png", 1)
mobs:register_egg("dmobs:dragon_red", "Tame Fire Dragon", "default_apple.png", 1)
mobs:register_egg("dmobs:dragon_black", "Tame Lightning Dragon", "default_mese_crystal.png", 1)
mobs:register_egg("dmobs:dragon_green", "Tame Poison Dragon", "dmobs_poison.png", 1)
mobs:register_egg("dmobs:dragon_blue", "Tame Ice Dragon", "default_ice.png", 1)
--other dragons
......
......@@ -26,6 +26,7 @@ CC BY-SA 3.0 UNPORTED. Created by D00Med
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
dmobs_chirrup.ogg - CC BY SA 3.0 taikedz
--License of lib_mount:
-- Minetest mod: lib_mount
......@@ -45,4 +46,5 @@ Velociraptor.ogg - CC BY 3.0 snottyboi - http://soundbible.com/1373-Velociraptor
-- License of source code:
-- -----------------------
-- WTFPL
\ No newline at end of file
-- WTFPL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment