From 79d795f7941f2347889bc7d65ecfe1b32d8715c5 Mon Sep 17 00:00:00 2001 From: "A. Demant" Date: Tue, 8 Jan 2019 18:26:09 +0100 Subject: [PATCH] dependency on ethereal added --- craftitems.lua | 17 ++++++++++++----- crafts.lua | 24 ++++++++++++++---------- mod.conf | 1 + 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/craftitems.lua b/craftitems.lua index c3524d6..8d9b348 100644 --- a/craftitems.lua +++ b/craftitems.lua @@ -1,8 +1,15 @@ -minetest.register_craftitem('more_fire:charcoal', { - description = 'Charcoal', - inventory_image = 'more_fire_charcoal_lump.png', - groups = {coal = 1} -}) + +-- check if charcoal already defined by mod ethereal +if minetest.get_modpath("ethereal") then + minetest.override_item("ethereal:charcoal_lump",{groups={coal = 1}}) + minetest.register_alias("more_fire:charcoal", "ethereal:charcoal_lump") +else + minetest.register_craftitem('more_fire:charcoal', { + description = 'Charcoal', + inventory_image = 'more_fire_charcoal_lump.png', + groups = {coal = 1} + }) +end minetest.register_craftitem('more_fire:oil', { description = 'lantern oil', diff --git a/crafts.lua b/crafts.lua index e50ab3e..d4be1a1 100644 --- a/crafts.lua +++ b/crafts.lua @@ -135,11 +135,13 @@ minetest.register_craft({ }) -- cooking recipes -minetest.register_craft({ - type = 'cooking', - recipe = 'group:tree', - output = 'more_fire:charcoal', -}) +if not minetest.get_modpath("ethereal") then + minetest.register_craft({ + type = 'cooking', + recipe = 'group:tree', + output = 'more_fire:charcoal', + }) +end minetest.register_craft({ type = 'cooking', @@ -149,11 +151,13 @@ minetest.register_craft({ }) -- fuel recipes -minetest.register_craft({ - type = 'fuel', - recipe = 'more_fire:charcoal', - burntime = 35, -}) +if not minetest.get_modpath("ethereal") then + minetest.register_craft({ + type = 'fuel', + recipe = 'more_fire:charcoal', + burntime = 35, + }) +end minetest.register_craft({ type = 'fuel', diff --git a/mod.conf b/mod.conf index 44c5da9..95e3333 100644 --- a/mod.conf +++ b/mod.conf @@ -2,3 +2,4 @@ name = more_fire depends=default,farming,fire,vessels description = This is a Minetest mod that adds more/better fire related stuff. author = Napiophelios +optional_depends = ethereal