From 9c92d77cb867fb2d89d49a9758e9911d21d64e72 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sun, 5 May 2024 20:53:38 -0400 Subject: [PATCH] fix moreores loading of tin ingot vs default tin ingot with backguard compat * real fix for https://github.com/mt-mods/technic_armor/pull/7 * update information --- README.md | 12 ++++++++++-- init.lua | 18 ++++++++---------- mod.conf | 2 ++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 10eb091..3f19ceb 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ Technical information This mod is named `3d_armor_technic` and is(was) part of the `3d_armor`, it was slited since version 0.4.11 of `3d_armor` now in minenux flavor merged again +Currently the mod was updated at https://git.minetest.io/minenux/minetest-mod-3d_armor_technic +but this one already track the updates! + #### Depends * default @@ -25,7 +28,12 @@ it was slited since version 0.4.11 of `3d_armor` now in minenux flavor merged ag ## LICENSE -Textures by @poet-nohit and @numberZero +Textures -Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 +* Copyright @poet-nohit and @numberZero + +Source code and features + +* Copyright (C) 2023-2024 PICCORO Lenz Mckay @mckaygerhard - LGPL v2.1 +* Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 diff --git a/init.lua b/init.lua index 809b27a..3e697a8 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,9 @@ -- Use 3d_armor translator to take advantage of existing translations for armor parts local S = armor_i18n.gettext -local F = armor_i18n.fgettext if not minetest.get_modpath("technic_worldgen") then - minetest.log("warning", S("[3d_armor_technic]: Mod loaded but unused.")) + minetest.log("warning", "[3d_armor_technic]: Mod loaded but unused.") return end @@ -38,7 +37,7 @@ if minetest.get_modpath("technic_worldgen") then materials.carbon = { name = S("Carbon Steel"), craft_item = "technic:carbon_steel_ingot", - armor = 2.7, +- armor = 2.7, heal = 10, use = 100, radiation = 40 @@ -55,11 +54,7 @@ end local tin_ingot -if minetest.registered_items["default:tin_ingot"] then - tin_ingot = "default:tin_ingot" -end - -if minetest.get_modpath("moreores") then +if minetest.get_modpath("moreores") and minetest.registered_items["moreores:tin_ingot"] then tin_ingot = "moreores:tin_ingot" materials.silver = { name = S("Silver"), @@ -70,8 +65,8 @@ if minetest.get_modpath("moreores") then radiation = 53 } end - -if tin_ingot then +if minetest.get_modpath("default") and minetest.registered_items["default:tin_ingot"] then + tin_ingot = "default:tin_ingot" materials.tin = { name = S("Tin"), craft_item = tin_ingot, @@ -153,3 +148,6 @@ for material, m in pairs(materials) do }) end end + +minetest.log("[3d_armor_technic]: Mod loaded successfully.") + diff --git a/mod.conf b/mod.conf index fdd3c0a..383ea4a 100644 --- a/mod.conf +++ b/mod.conf @@ -3,3 +3,5 @@ name = technic_armor description = ARMOR TECH made from lead, brass, cast iron, carbon steel, stainless steel, tin and silver depends = 3d_armor optional_depends = default, moreores, technic_worldgen +author = mckaygerhard +license = LGPL \ No newline at end of file