From a04573b271b48bbbaf570a9fbd37159580a41b19 Mon Sep 17 00:00:00 2001 From: Ombridride Date: Sun, 12 Apr 2015 02:10:11 +0200 Subject: [PATCH] Add Slimes mobs - Lava Slimes spawn in Lava sources - Green Slimes spawn in Acid sources - Big Slimes splits into Medium Slimes who splits in small Slimes --- mods/mobs/depends.txt | 1 + mods/mobs/init.lua | 18 +++++++++++++++++- mods/mobs/lava_flan.lua | 3 ++- mods/mobs/stonemonster.lua | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/mods/mobs/depends.txt b/mods/mobs/depends.txt index 4ad96d51..1584ea93 100755 --- a/mods/mobs/depends.txt +++ b/mods/mobs/depends.txt @@ -1 +1,2 @@ default +mesecons_materials? diff --git a/mods/mobs/init.lua b/mods/mobs/init.lua index b0023b4f..6f626b95 100755 --- a/mods/mobs/init.lua +++ b/mods/mobs/init.lua @@ -22,10 +22,26 @@ dofile(minetest.get_modpath("mobs").."/sandmonster.lua") -- PilzAdam dofile(minetest.get_modpath("mobs").."/stonemonster.lua") -- PilzAdam dofile(minetest.get_modpath("mobs").."/treemonster.lua") -- PilzAdam dofile(minetest.get_modpath("mobs").."/wolf.lua") -- PilzAdam -dofile(minetest.get_modpath("mobs").."/lava_flan.lua") -- Zeg9 +--dofile(minetest.get_modpath("mobs").."/lava_flan.lua") -- Zeg9 --Remplaced by Lava Slime dofile(minetest.get_modpath("mobs").."/mese_monster.lua") -- Zeg9 dofile(minetest.get_modpath("mobs").."/spider.lua") -- AspireMint +-- Migration to Mobs Redo API by TenPlus1 + +-- load mod files +dofile(minetest.get_modpath("slimes").."/greenslimes.lua") -- davedevils/TomasJLuis/TenPlus1 +dofile(minetest.get_modpath("slimes").."/lavaslimes.lua") -- davedevils/TomasJLuis/TenPlus1 + +-- cannot find mesecons?, craft glue instead +if not minetest.get_modpath("mesecons_materials") then + minetest.register_craftitem(":mesecons_materials:glue", { + image = "jeija_glue.png", + description = "Glue", + }) +end + +if minetest.setting_get("log_mods") then minetest.log("action", "Slimes loaded") end + -- NPC dofile(minetest.get_modpath("mobs").."/npc.lua") -- TenPlus1 diff --git a/mods/mobs/lava_flan.lua b/mods/mobs/lava_flan.lua index 92f9497a..82007b45 100755 --- a/mods/mobs/lava_flan.lua +++ b/mods/mobs/lava_flan.lua @@ -33,7 +33,7 @@ mobs:register_mob("mobs:lava_flan", { jump = true, -- step = 2, (c'était pas mal, voir comment faire pour le remettre comme ça ?) view_range = 16, - floats = 0, + floats = 1, -- chance of dropping lava orb when dead drops = { {name = "mobs:lava_orb", @@ -51,6 +51,7 @@ mobs:register_mob("mobs:lava_flan", { run_start = 20, run_end = 28, punch_start = 20, punch_end = 28, }, + -- do things when die on_die = function(self, pos) minetest.set_node(pos, {name="fire:basic_flame"}) end, diff --git a/mods/mobs/stonemonster.lua b/mods/mobs/stonemonster.lua index 7f175ba6..8a70288d 100755 --- a/mods/mobs/stonemonster.lua +++ b/mods/mobs/stonemonster.lua @@ -46,7 +46,7 @@ mobs:register_mob("mobs:stone_monster", { }, -- damaged by water_damage = 0, - lava_damage = 0, + lava_damage = 0 light_damage = 0, -- model animation animation = {