From 7a102d8a3290ec583a62771eeaaf8bd058017dae Mon Sep 17 00:00:00 2001 From: crabman77 Date: Tue, 3 Mar 2015 21:18:02 +0100 Subject: [PATCH] resolve conflict straw resolve conflict darkage:straw and farming:straw Use darkage:straw if not mod farming else use farming:straw --- mods/darkage/crafts.lua | 76 +++++++++++++++++++++++++---------------- mods/darkage/nodes.lua | 37 +++++++++++++------- mods/darkage/stairs.lua | 11 +++--- 3 files changed, 78 insertions(+), 46 deletions(-) diff --git a/mods/darkage/crafts.lua b/mods/darkage/crafts.lua index 14e5705e..a95f5699 100755 --- a/mods/darkage/crafts.lua +++ b/mods/darkage/crafts.lua @@ -90,30 +90,56 @@ minetest.register_craft({ -- Cobble -- Other Blocks +--if not farming:straw +if minetest.get_modpath("farming") == nil then -minetest.register_craft({ - output = "darkage:straw 2", - recipe = { - {"default:dry_shrub","default:dry_shrub"}, + minetest.register_craft({ + output = "darkage:straw 2", + recipe = { {"default:dry_shrub","default:dry_shrub"}, - } -}) + {"default:dry_shrub","default:dry_shrub"}, + } + }) + + minetest.register_craft({ + output = "darkage:straw 2", + recipe = { + {"darkage:dry_leaves","darkage:dry_leaves"}, + {"darkage:dry_leaves","darkage:dry_leaves"}, + } + }) -minetest.register_craft({ - output = "darkage:straw 2", - recipe = { - {"darkage:dry_leaves","darkage:dry_leaves"}, - {"darkage:dry_leaves","darkage:dry_leaves"}, - } -}) - -minetest.register_craft({ - output = "darkage:straw_bale", - recipe = { - {"darkage:straw","darkage:straw"}, - {"darkage:straw","darkage:straw"}, - } -}) + minetest.register_craft({ + output = "darkage:straw_bale", + recipe = { + {"darkage:straw","darkage:straw"}, + {"darkage:straw","darkage:straw"}, + } + }) + minetest.register_craft({ + output = "darkage:adobe 4", + recipe = { + {"default:sand","default:sand"}, + {"default:clay_lump","darkage:straw"}, + } + }) +else + minetest.register_craft({ + output = "darkage:straw_bale", + recipe = { + {"farming:straw","farming:straw"}, + {"farming:straw","farming:straw"}, + } + }) + + minetest.register_craft({ + output = "darkage:adobe 4", + recipe = { + {"default:sand","default:sand"}, + {"default:clay_lump","farming:straw"}, + } + }) +end minetest.register_craft({ output = "darkage:slate_tile 4", @@ -151,14 +177,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "darkage:adobe 4", - recipe = { - {"default:sand","default:sand"}, - {"default:clay_lump","darkage:straw"}, - } -}) - minetest.register_craft({ output = "darkage:lamp", recipe = { diff --git a/mods/darkage/nodes.lua b/mods/darkage/nodes.lua index f73f9bed..b3d8c71c 100755 --- a/mods/darkage/nodes.lua +++ b/mods/darkage/nodes.lua @@ -164,20 +164,31 @@ minetest.register_node("darkage:stone_brick", { }) -- Other Blocks -minetest.register_node("darkage:straw", { - description = "Straw", - tiles = {"darkage_straw.png"}, - groups = {snappy=3, flammable=2}, - sounds = default.node_sound_leaves_defaults(), -}) +--if not farming:straw +if minetest.get_modpath("farming") == nil then + minetest.register_node("darkage:straw", { + description = "Straw", + tiles = {"darkage_straw.png"}, + groups = {snappy=3, flammable=2}, + sounds = default.node_sound_leaves_defaults(), + }) -minetest.register_node("darkage:straw_bale", { - description = "Straw Bale", - tiles = {"darkage_straw_bale.png"}, - drop = "darkage:straw 4", - groups = {snappy=2, flammable=2}, - sounds = default.node_sound_leaves_defaults(), -}) + minetest.register_node("darkage:straw_bale", { + description = "Straw Bale", + tiles = {"darkage_straw_bale.png"}, + drop = "darkage:straw 4", + groups = {snappy=2, flammable=2}, + sounds = default.node_sound_leaves_defaults(), + }) +else + minetest.register_node("darkage:straw_bale", { + description = "Straw Bale", + tiles = {"darkage_straw_bale.png"}, + drop = "farming:straw 4", + groups = {snappy=2, flammable=2}, + sounds = default.node_sound_leaves_defaults(), + }) +end minetest.register_node("darkage:slate_tile", { description = "Slate Tile", diff --git a/mods/darkage/stairs.lua b/mods/darkage/stairs.lua index 8dc6124c..ee1a12b1 100755 --- a/mods/darkage/stairs.lua +++ b/mods/darkage/stairs.lua @@ -95,7 +95,8 @@ if stairsplus then sounds = default.node_sound_stone_defaults(), sunlight_propagates = true, }) - + --if not farming:straw + if minetest.get_modpath("farming") == nil then stairsplus:register_all("darkage", "straw", "darkage:straw", { description = "Straw", tiles = {"darkage_straw.png"}, @@ -103,6 +104,7 @@ if stairsplus then sounds = default.node_sound_stone_defaults(), sunlight_propagates = true, }) + end stairsplus:register_all("darkage", "straw_bale", "darkage:straw_bale", { description = "Straw Bale", @@ -267,7 +269,8 @@ elseif stairs then "Basalt Cobble Slab", default.node_sound_stone_defaults() ) - + --if not farming:straw + if minetest.get_modpath("farming") == nil then stairs.register_stair_and_slab("straw", "darkage:straw", {snappy=3, flammable=2}, {"darkage_straw.png"}, @@ -275,7 +278,7 @@ elseif stairs then "Straw Slab", default.node_sound_stone_defaults() ) - + end stairs.register_stair_and_slab("straw_bale", "darkage:straw_bale", {snappy=2, flammable=2}, {"darkage_straw_bale.png"}, @@ -340,4 +343,4 @@ elseif stairs then default.node_sound_stone_defaults() ) -end \ No newline at end of file +end