From 55b0599cfecc0e31b69c2deb2d130f07955f4936 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 15 Apr 2016 15:23:02 +0100 Subject: [PATCH] Added compatibility with older mobs already spawned --- dirt_monster.lua | 3 ++- dungeon_master.lua | 3 ++- lava_flan.lua | 3 ++- mese_monster.lua | 3 ++- oerkki.lua | 3 ++- sand_monster.lua | 3 ++- spider.lua | 3 ++- stone_monster.lua | 3 ++- tree_monster.lua | 7 ++++--- 9 files changed, 20 insertions(+), 11 deletions(-) diff --git a/dirt_monster.lua b/dirt_monster.lua index 6f8b8b5..5d9d898 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -52,4 +52,5 @@ mobs:register_spawn("mobs_monster:dirt_monster", mobs:register_egg("mobs_monster:dirt_monster", "Dirt Monster", "default_dirt.png", 1) -minetest.register_alias("mobs:dirt_monster", "mobs_monster:dirt_monster") +-- compatibility +mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") diff --git a/dungeon_master.lua b/dungeon_master.lua index dcfc5c7..1497b85 100644 --- a/dungeon_master.lua +++ b/dungeon_master.lua @@ -56,7 +56,8 @@ mobs:register_spawn("mobs_monster:dungeon_master", {"default:stone"}, 7, 0, 7000 mobs:register_egg("mobs_monster:dungeon_master", "Dungeon Master", "fire_basic_flame.png", 1, true) -minetest.register_alias("mobs:dungeon_master", "mobs_monster:dungeon_master") +-- compatibility +mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- fireball (weapon) mobs:register_arrow("mobs_monster:fireball", { diff --git a/lava_flan.lua b/lava_flan.lua index 2936f3c..8cd97b1 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -56,7 +56,8 @@ mobs:register_spawn("mobs_monster:lava_flan", {"default:lava_source"}, 15, 0, 10 mobs:register_egg("mobs_monster:lava_flan", "Lava Flan", "default_lava.png", 1) -minetest.register_alias("mobs:lava_flan", "mobs_monster:lava_flan") +-- compatibility +mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") -- lava orb minetest.register_craftitem(":mobs:lava_orb", { diff --git a/mese_monster.lua b/mese_monster.lua index 9a5c121..99ec280 100644 --- a/mese_monster.lua +++ b/mese_monster.lua @@ -56,7 +56,8 @@ mobs:register_spawn("mobs_monster:mese_monster", {"default:stone"}, 7, 0, 5000, mobs:register_egg("mobs_monster:mese_monster", "Mese Monster", "default_mese_block.png", 1) -minetest.register_alias("mobs:mese_monster", "mobs_monster:mese_monster") +-- compatibility +mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") -- mese arrow (weapon) mobs:register_arrow("mobs_monster:mese_arrow", { diff --git a/oerkki.lua b/oerkki.lua index 44a75ea..2adf797 100644 --- a/oerkki.lua +++ b/oerkki.lua @@ -59,4 +59,5 @@ mobs:register_spawn("mobs_monster:oerkki", {"default:stone"}, 7, 0, 7000, 1, -10 mobs:register_egg("mobs_monster:oerkki", "Oerkki", "default_obsidian.png", 1) -minetest.register_alias("mobs:oerkki", "mobs_monster:oerkki") +-- compatibility +mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") diff --git a/sand_monster.lua b/sand_monster.lua index aeca697..54b5968 100644 --- a/sand_monster.lua +++ b/sand_monster.lua @@ -51,4 +51,5 @@ mobs:register_spawn("mobs_monster:sand_monster", {"default:desert_sand"}, 20, 0, mobs:register_egg("mobs_monster:sand_monster", "Sand Monster", "default_desert_sand.png", 1) -minetest.register_alias("mobs:sand_monster", "mobs_monster:sand_monster") +-- compatibility +mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") diff --git a/spider.lua b/spider.lua index df20ef0..dca29e0 100644 --- a/spider.lua +++ b/spider.lua @@ -54,7 +54,8 @@ mobs:register_spawn("mobs_monster:spider", mobs:register_egg("mobs_monster:spider", "Spider", "mobs_cobweb.png", 1) -minetest.register_alias("mobs:spider", "mobs_monster:spider") +-- compatibility +mobs:alias_mob("mobs:spider", "mobs_monster:spider") -- ethereal crystal spike compatibility if not minetest.get_modpath("ethereal") then diff --git a/stone_monster.lua b/stone_monster.lua index 148e7ba..1cf63de 100644 --- a/stone_monster.lua +++ b/stone_monster.lua @@ -53,4 +53,5 @@ mobs:register_spawn("mobs_monster:stone_monster", {"default:stone", "default:des mobs:register_egg("mobs_monster:stone_monster", "Stone Monster", "default_stone.png", 1) -minetest.register_alias("mobs:stone_monster", "mobs_monster:stone_monster") +-- compatibility +mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") diff --git a/tree_monster.lua b/tree_monster.lua index 62769b3..f2b6270 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -31,8 +31,8 @@ mobs:register_mob("mobs_monster:tree_monster", { {name = "ethereal:jungle_tree_sapling", chance = 3, min = 1, max = 2}, {name = "default:apple", chance = 2, min = 1, max=3}, }, - water_damage = 1, - lava_damage = 5, + water_damage = 2, + lava_damage = 0, light_damage = 2, fall_damage = 0, animation = { @@ -54,7 +54,8 @@ mobs:register_spawn("mobs_monster:tree_monster", mobs:register_egg("mobs_monster:tree_monster", "Tree Monster", "default_tree_top.png", 1) -minetest.register_alias("mobs:tree_monster", "mobs_monster:tree_monster") +-- compatibility +mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- ethereal sapling compatibility if not minetest.get_modpath("ethereal") then