From 6b3db0ae72beeae62804cff12610ebe3e42906a7 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Feb 2017 18:53:17 +0100 Subject: [PATCH] Eliminate crumbly, cracky, snappy and choppy fully --- mods/CORE/walkover/README.md | 12 +++++------ mods/ENTITIES/drippingwater/init.lua | 4 ++-- mods/ENTITIES/drippingwater/readme.txt | 5 +++-- mods/ENTITIES/mobs_mc/horse.lua | 7 +------ mods/ENTITIES/mobs_mc/skeleton.lua | 2 +- mods/ENTITIES/mobs_mc/spider.lua | 2 +- mods/ITEMS/mcl_tools/init.lua | 28 ++++++++++++++++++++++---- 7 files changed, 37 insertions(+), 23 deletions(-) diff --git a/mods/CORE/walkover/README.md b/mods/CORE/walkover/README.md index 1f4bb4c3..2b78b0b0 100644 --- a/mods/CORE/walkover/README.md +++ b/mods/CORE/walkover/README.md @@ -11,13 +11,11 @@ Example Usage ------------- minetest.register_node("somemod:someblock", { - description = key, + description = "Talking Block", tiles = {"somemod_someblock.png"}, - groups = {cracky=1}, - on_walk_over = function(pos, node, player) - - minetest.chat_send_player(player, "Hey! Watch it!") - end + on_walk_over = function(pos, node, player) + minetest.chat_send_player(player, "Hey! Watch it!") + end }) - \ No newline at end of file + diff --git a/mods/ENTITIES/drippingwater/init.lua b/mods/ENTITIES/drippingwater/init.lua index 91469568..13e83677 100644 --- a/mods/ENTITIES/drippingwater/init.lua +++ b/mods/ENTITIES/drippingwater/init.lua @@ -84,7 +84,7 @@ minetest.register_entity("drippingwater:drop_lava", { --Create drop minetest.register_abm( - {nodenames = {"group:crumbly", "group:cracky"}, + {nodenames = {"group:solid"}, neighbors = {"group:water"}, interval = 2, chance = 22, @@ -100,7 +100,7 @@ minetest.register_abm( --Create lava drop minetest.register_abm( - {nodenames = {"group:crumbly", "group:cracky"}, + {nodenames = {"group:solid"}, neighbors = {"group:lava"}, interval = 2, chance = 22, diff --git a/mods/ENTITIES/drippingwater/readme.txt b/mods/ENTITIES/drippingwater/readme.txt index 4a524720..f609163e 100644 --- a/mods/ENTITIES/drippingwater/readme.txt +++ b/mods/ENTITIES/drippingwater/readme.txt @@ -1,6 +1,8 @@ Dripping Water Mod by kddekadenz +modified for MineClone 2 by Wuzzy + Installing instructions: @@ -11,8 +13,7 @@ Installing instructions: Manual: --> drops are generated rarely under crumbly nodes (dirt,grass,sandstone) --> waterdrops are generated under cloudstone massively +-> drops are generated rarely under solid nodes -> they will stay some time at the generated block and than they fall down -> when they collide with the ground, a sound is played and they are destroyed diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua index 02b45f68..270d0338 100644 --- a/mods/ENTITIES/mobs_mc/horse.lua +++ b/mods/ENTITIES/mobs_mc/horse.lua @@ -13,12 +13,7 @@ --Tweaked by: maikerumine local function is_ground(pos) local nn = minetest.get_node(pos).name - return minetest.get_item_group(nn, "crumbly") ~= 0 or - minetest.get_item_group(nn, "choppy") ~= 0 or - minetest.get_item_group(nn, "cracky") ~= 0 or - minetest.get_item_group(nn, "snappy") ~= 0 or - minetest.get_item_group(nn, "unbreakable") ~= 0 or - minetest.get_item_group(nn, "immortal") ~= 0 + return minetest.get_item_group(nn, "solid") ~= 0 end local function get_sign(i) diff --git a/mods/ENTITIES/mobs_mc/skeleton.lua b/mods/ENTITIES/mobs_mc/skeleton.lua index 929c4118..4e5aa8e3 100644 --- a/mods/ENTITIES/mobs_mc/skeleton.lua +++ b/mods/ENTITIES/mobs_mc/skeleton.lua @@ -136,7 +136,7 @@ mobs:register_mob("mobs_mc:skeleton2", { dogshoot_switch = 1, dogshoot_count_max =6, }) -mobs:register_spawn("mobs_mc:skeleton2", {"group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 7, -1, 5000, 4, -3000) +mobs:register_spawn("mobs_mc:skeleton2", {"group:solid"}, 7, -1, 5000, 4, -3000) local arrows = { diff --git a/mods/ENTITIES/mobs_mc/spider.lua b/mods/ENTITIES/mobs_mc/spider.lua index ecd7cbec..f72aad58 100644 --- a/mods/ENTITIES/mobs_mc/spider.lua +++ b/mods/ENTITIES/mobs_mc/spider.lua @@ -58,7 +58,7 @@ mobs:register_mob("mobs_mc:spider", { punch_start = 50, punch_end = 90, }, }) -mobs:register_spawn("mobs_mc:spider", {"mcl_core:stone" ,"mcl_core:gravel","mcl_core:cobble","group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 4, -1, 17000, 2, 3000) +mobs:register_spawn("mobs_mc:spider", {"group:solid"}, 4, -1, 17000, 2, 3000) -- compatibility diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index 4c5d9b8b..f8501308 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -117,16 +117,36 @@ minetest.register_tool("mcl_tools:pick_diamond", { sound = { breaks = "default_tool_breaks" }, }) +local get_shovel_dig_group = function(itemstring) + local def = minetest.registered_items[itemstring] + if itemstring == "mcl_core:shovel_wood" then + return "shovely_dig_wood" + elseif itemstring == "mcl_core:shovel_stone" then + return "shovely_dig_stone" + elseif itemstring == "mcl_core:shovel_iron" then + return "shovely_dig_iron" + elseif itemstring == "mcl_core:shovel_gold" then + return "shovely_dig_gold" + elseif itemstring == "mcl_core:shovel_diamond" then + return "shovely_dig_diamond" + else + -- Fallback + return "shovely_dig_wood" + end +end + local make_grass_path = function(itemstack, placer, pointed_thing) if minetest.get_node(pointed_thing.under).name == "mcl_tools:dirt_with_grass" and pointed_thing.above.y == pointed_thing.under.y then local above = table.copy(pointed_thing.under) above.y = above.y + 1 if minetest.get_node(above).name == "air" then if not minetest.setting_getbool("creative_mode") then - -- Add wear, as if digging a level 0 crumbly node - local def = minetest.registered_items[itemstack:get_name()] - local base_uses = def.tool_capabilities.groupcaps.crumbly.uses - local maxlevel = def.tool_capabilities.groupcaps.crumbly.maxlevel + -- Add wear, as if digging a level 0 shovely node + local toolname = itemstack:get_name() + local def = minetest.registered_items[toolname] + local group = get_shovel_dig_group + local base_uses = def.tool_capabilities.groupcaps[group].uses + local maxlevel = def.tool_capabilities.groupcaps[group].maxlevel local uses = base_uses * math.pow(3, maxlevel) local wear = math.ceil(65535 / uses) itemstack:add_wear(wear)