diff --git a/mods/christmas/init.lua b/mods/christmas/init.lua index 8867729e..7eafc2d2 100644 --- a/mods/christmas/init.lua +++ b/mods/christmas/init.lua @@ -54,10 +54,7 @@ minetest.register_node("christmas:eggnog", { }) minetest.register_node("christmas:present", { description = "Christmas present", - tiles = { - "christmas_present.png", - "christmas_present_top.png" - }, + tiles = {"christmas_present.png"}, drawtype = "mesh", paramtype = "light", mesh = "christmas_present.obj", diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua index 21d435b2..b7dcfd97 100644 --- a/mods/farming/hoes.lua +++ b/mods/farming/hoes.lua @@ -481,7 +481,7 @@ if minetest.get_modpath("moreores") then {"", "", "group:stick"} } }) - +--[[ farming.register_hoe(":moreores:hoe_silver", { description = S("%s Hoe"):format(S("Silver")), inventory_image = "moreores_tool_silverhoe.png", @@ -510,5 +510,5 @@ if minetest.get_modpath("moreores") then minetest.override_item("moreores:hoe_mithril", { original_description = desc, description = toolranks.create_description(desc)}) - end + end]] end diff --git a/mods/farming/license.txt b/mods/farming/license.txt index aa8a40ea..6f5bf4a4 100644 --- a/mods/farming/license.txt +++ b/mods/farming/license.txt @@ -149,7 +149,7 @@ Created by OgelGames (CC BY-SA 4.0) farming_cactus_juice.png farming_salad.png -Created by Felfa +Created by Felfa (CC0) farming_blackberry*.png farming_lettuce*.png farming_burger.png diff --git a/mods/farming/mod.conf b/mods/farming/mod.conf index 80ab8b0b..bc6a919b 100644 --- a/mods/farming/mod.conf +++ b/mods/farming/mod.conf @@ -1 +1,4 @@ -name = farming \ No newline at end of file +name = farming +depends = default +optional_depends = stairs, intllib, lucky_block, toolranks +description = Adds many plants and food to Minetest diff --git a/mods/mobs_redo/api.lua b/mods/mobs_redo/api.lua index d2198509..a00b16ef 100644 --- a/mods/mobs_redo/api.lua +++ b/mods/mobs_redo/api.lua @@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20201206", + version = "20210102", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -4503,10 +4503,10 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, minetest.add_item(clicker:get_pos(), new_stack) end - remove_mob(self, true) - self:mob_sound("default_place_node_hard") + remove_mob(self, true) + return new_stack -- when chance above fails or set to 0, miss! diff --git a/mods/moreblocks/CHANGELOG.md b/mods/moreblocks/CHANGELOG.md index 900b7231..e050101b 100644 --- a/mods/moreblocks/CHANGELOG.md +++ b/mods/moreblocks/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed + +- Refactored recipe override mechanism to avoid re-coding recipes + when we only want to change the amount produced. +- [Realigned rail recipe to the changes made in Minetest Game.](https://github.com/minetest-mods/moreblocks/pull/169) + - All rail recipes (standard, power, break) were boosted by 50%. + ### Fixed - [Fixed strange placement behavior for non-default Stairs+ nodes.](https://github.com/minetest-mods/moreblocks/pull/168) diff --git a/mods/moreblocks/redefinitions.lua b/mods/moreblocks/redefinitions.lua index 1856c989..e9c5ff7e 100644 --- a/mods/moreblocks/redefinitions.lua +++ b/mods/moreblocks/redefinitions.lua @@ -5,64 +5,78 @@ Copyright © 2011-2020 Hugo Locurcio and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] --- Redefinitions of some default crafting recipes: +local modname = minetest.get_current_modname() --- Signs: +1 -minetest.clear_craft({ - recipe = { - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', 'group:stick', ''}, +-- Redefine some of the default crafting recipes to be more productive + +-- Auxiliary function: take a recipe as returned by get_all_craft_recipes +-- and turn it into a table that can be used to clear a craft or declare a new one +local reconstruct_internal_craft = function(recipe) + local recp = { + { "", "", "" }, + { "", "", "" }, + { "", "", "" }, } -}) + for idx, item in pairs(recipe.items) do + local row = math.ceil(idx / recipe.width) + local col = idx - (row-1)*recipe.width + recp[row][col] = item + end + return recp +end -minetest.clear_craft({ - recipe = { - {'group:wood', 'group:wood', 'group:wood'}, - {'group:wood', 'group:wood', 'group:wood'}, - {'', 'group:stick', ''}, - } -}) +-- Change the amount produced by recipe by apply func to the old amount +local change_recipe_amount = function(product, recipe, func) + local recp = reconstruct_internal_craft(recipe) -minetest.register_craft({ - output = 'default:sign_wall_steel 4', - recipe = { - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', 'group:stick', ''}, - } -}) + local oldamount = tonumber(recipe.output:match(" [0-9]+$") or "1") -minetest.register_craft({ - output = 'default:sign_wall_wood 4', - recipe = { - {'group:wood', 'group:wood', 'group:wood'}, - {'group:wood', 'group:wood', 'group:wood'}, - {'', 'group:stick', ''}, - } -}) + local newamount = func(oldamount) + -- remove old crafting recipe + local redo = { recipe = recp } + minetest.clear_craft(redo) -minetest.clear_craft({ - recipe = { - {"default:papyrus", "default:papyrus", "default:papyrus"} - } -}) -minetest.register_craft({ - output = "default:paper 4", - recipe = { - {"default:papyrus", "default:papyrus", "default:papyrus"}, - } -}) + -- new output + redo.output = ("%s %d"):format(product, newamount) + minetest.register_craft(redo) + minetest.log("action", ("[MOD]%s: recipe for %s production: %d => %d"):format(modname, product, oldamount, newamount)) +end -minetest.register_craft({ - output = "default:rail 24", - recipe = { - {"default:steel_ingot", "", "default:steel_ingot"}, - {"default:steel_ingot", "default:stick", "default:steel_ingot"}, - {"default:steel_ingot", "", "default:steel_ingot"}, - } +local increase_craft_production = function(product, func) + local recipes = minetest.get_all_craft_recipes(product) + for _, r in pairs(recipes) do + if r.type == "normal" or r.method == "normal" then + change_recipe_amount(product, r, func) + end + end +end + +-- Increase the crafting production according to the rules from the table, which is in the form: +-- { +-- { detector, amount changing function } +-- { detector, amount changing function } +-- } +-- TODO: consider exporting this function to other mods +local increase_craft_production_table = function(map_table) + for product, _ in pairs(minetest.registered_items) do + for _, tab in pairs(map_table) do + local detector = tab[1] + local func = tab[2] + if detector(product) then + increase_craft_production(product, func) + -- only apply one boost + break + end + end + end +end + +increase_craft_production_table({ + { function(n) return n:match('^default:sign_wall') end, function(old) return old + 1 end }, + { function(n) return n == 'default:paper' end, function(old) return old*4 end }, + { function(n) return n:match('^carts:.*rail$') or n:match('^default:.*rail$') end, function(old) return old + old/2 end }, }) minetest.register_craft({ diff --git a/mods/skinsdb/meta/character_1938.txt b/mods/skinsdb/meta/character_1938.txt new file mode 100644 index 00000000..41c3d376 --- /dev/null +++ b/mods/skinsdb/meta/character_1938.txt @@ -0,0 +1,3 @@ +MUD +Mihin Dissanayake +CC BY-SA 3.0 diff --git a/mods/skinsdb/meta/character_1939.txt b/mods/skinsdb/meta/character_1939.txt new file mode 100644 index 00000000..41c3d376 --- /dev/null +++ b/mods/skinsdb/meta/character_1939.txt @@ -0,0 +1,3 @@ +MUD +Mihin Dissanayake +CC BY-SA 3.0 diff --git a/mods/skinsdb/textures/character_1938.png b/mods/skinsdb/textures/character_1938.png new file mode 100644 index 00000000..ea57ed13 Binary files /dev/null and b/mods/skinsdb/textures/character_1938.png differ diff --git a/mods/skinsdb/textures/character_1939.png b/mods/skinsdb/textures/character_1939.png new file mode 100644 index 00000000..d0ce8f50 Binary files /dev/null and b/mods/skinsdb/textures/character_1939.png differ diff --git a/mods/stamina/init.lua b/mods/stamina/init.lua index 0b068db1..4231e0d8 100644 --- a/mods/stamina/init.lua +++ b/mods/stamina/init.lua @@ -45,10 +45,12 @@ local function get_int_attribute(player) end +local stamina_enabled = minetest.settings:get_bool("enable_stamina") ~= false + local function stamina_update_level(player, level) -- pipeworks fake player check - if not player.get_attribute then + if not player.get_attribute or not stamina_enabled then return nil end @@ -129,8 +131,8 @@ end -- Sprint settings and function -local enable_sprint = minetest.setting_getbool("sprint") ~= false -local enable_sprint_particles = minetest.setting_getbool("sprint_particles") ~= false +local enable_sprint = minetest.settings:get_bool("sprint") ~= false +local enable_sprint_particles = minetest.settings:get_bool("sprint_particles") ~= false local monoids = minetest.get_modpath("player_monoids") local pova_mod = minetest.get_modpath("pova") @@ -567,8 +569,8 @@ end -- stamina is disabled if damage is disabled -if minetest.setting_getbool("enable_damage") -and minetest.setting_get("enable_stamina") ~= false then +if minetest.settings:get_bool("enable_damage") +and minetest.settings:get_bool("enable_stamina") ~= false then minetest.register_on_joinplayer(function(player) diff --git a/mods/stamina/settingtypes.txt b/mods/stamina/settingtypes.txt new file mode 100644 index 00000000..62ac5894 --- /dev/null +++ b/mods/stamina/settingtypes.txt @@ -0,0 +1,5 @@ +sprint (Enable sprint) bool true + +sprint_particles (Enable sprint particles) bool true + +enable_stamina (Enable stamina/hunger) bool true