diff --git a/README.md b/README.md index 9104d681..3f1287d1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m * [3d_armor_gloves][] ([LGPL][lic.lgpl2.1]) -- version: [f099d76 Git][ver.3d_armor_gloves] *2021-02-27* * [airtanks][] ([MIT][lic.airtanks]) -- version: [b686694 Git][ver.airtanks] *2021-03-13* ([patched][patch.airtanks]) * [equip_wear][] ([MIT][lic.equip_wear]) -- version: [0.1][ver.equip_wear] *2021-07-14* - * [lighted_helmets][] ([MIT][lic.lighted_helmets]) -- version: [1.0][ver.lighted_helmets] *2021-07-18* + * [lighted_helmets][] ([MIT][lic.lighted_helmets]) -- version: [1.1][ver.lighted_helmets] *2021-08-03* * [slingshot][] ([MIT][lic.slingshot] / [CC0][lic.cc0]) -- version [0.3][ver.slingshot] *2021-06-10* * [throwing][] ([WTFPL][lic.wtfpl]) -- version: [90bcf43 Git][ver.throwing] *2013-09-27* ([patched][patch.throwing]) * [xtraarmor][] ([CC BY-SA][lic.ccbysa3.0]) -- version: 0.3 @@ -630,7 +630,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m [ver.intllib]: https://github.com/minetest-mods/intllib/tree/6ebdc53 [ver.invisibility]: https://notabug.org/TenPlus1/invisibility/src/65c0823d6a28b62046cdadc67ff1e462d37e3643 [ver.jukebox]: https://github.com/minetest-mods/jukebox/tree/0d871f2 -[ver.lighted_helmets]: https://github.com/AntumMT/mod-lighted_helmets/releases/tag/v1.0 +[ver.lighted_helmets]: https://github.com/AntumMT/mod-lighted_helmets/releases/tag/v1.1 [ver.listitems]: https://github.com/AntumMT/mod-listitems/releases/tag/v1.1 [ver.mese_monster]: https://github.com/AntumMT/mod-mob_mese_monster/tree/cd02839 [ver.mesecons]: https://github.com/minetest-mods/mesecons/tree/6579351 diff --git a/mods/equipment/lighted_helmets/README.md b/mods/equipment/lighted_helmets/README.md index 4d36d752..32d7d4e9 100644 --- a/mods/equipment/lighted_helmets/README.md +++ b/mods/equipment/lighted_helmets/README.md @@ -11,13 +11,13 @@ Supports helmets from the following mods: - [amber](https://forum.minetest.net/viewtopic.php?t=18186) - [rainbow_ore](https://forum.minetest.net/viewtopic.php?id=13519) -![icon](screenshot.png) +![screenshot](screenshot.png) ### Licensing: - Code: [MIT](LICENSE.txt) - Textures: CC0 -- Screenshot/Icon: [CC0](https://openclipart.org/detail/201890) +- Icon: [CC0](https://openclipart.org/detail/201890) ### Usage: @@ -37,10 +37,18 @@ Supports helmets from the following mods: +#### Settings: + +``` +lighted_helmets.exclude +- List of mods or helmets to exclude. +- Example: lighted_helmets.exclude = xtraarmor,amber:helmet +``` + ### Requirements: ``` -Minimum Minetest verserion: 0.4 +Minimum Minetest version: 5.0 Depends: - 3d_armor @@ -52,15 +60,11 @@ Optional depends: - xtraarmor - amber - rainbow_ore - -Settings: -- lighted_helmets.exclude - - List of mods or helmets to exclude. - - Example: lighted_helmets.exclude = xtraarmor,amber:helmet ``` ### Links: +- [![ContentDB](https://img.shields.io/static/v1?label=ContentDB&message=lighted_helmets&color=%23375a7f&logo=minetest)](https://content.minetest.net/packages/AntumDeluge/lighted_helmets/) - [Forum](https://forum.minetest.net/viewtopic.php?t=27035) - [Git repo](https://github.com/AntumMT/mod-lighted_helmets) - [Changelog](changelog.txt) diff --git a/mods/equipment/lighted_helmets/TODO.txt b/mods/equipment/lighted_helmets/TODO.txt index 1065a181..0810866c 100644 --- a/mods/equipment/lighted_helmets/TODO.txt +++ b/mods/equipment/lighted_helmets/TODO.txt @@ -1,3 +1,2 @@ TODO: -- check if helmet is already registered & add suffix diff --git a/mods/equipment/lighted_helmets/changelog.txt b/mods/equipment/lighted_helmets/changelog.txt index c0ad1127..6cbce118 100644 --- a/mods/equipment/lighted_helmets/changelog.txt +++ b/mods/equipment/lighted_helmets/changelog.txt @@ -1,4 +1,11 @@ +v1.1 +---- +- added localization support +- added Spanish translation +- doesn't overwrite helmets if different mods use the same material + + v1.0 ---- - initial release diff --git a/mods/equipment/lighted_helmets/icon.png b/mods/equipment/lighted_helmets/icon.png new file mode 100644 index 00000000..6ef40d01 Binary files /dev/null and b/mods/equipment/lighted_helmets/icon.png differ diff --git a/mods/equipment/lighted_helmets/init.lua b/mods/equipment/lighted_helmets/init.lua index 0ee2b39d..4eb1839e 100644 --- a/mods/equipment/lighted_helmets/init.lua +++ b/mods/equipment/lighted_helmets/init.lua @@ -1,4 +1,6 @@ +local S = core.get_translator("lighted_helmets") + local excluded = {} local to_exclude = core.settings:get("lighted_helmets.exclude") @@ -87,7 +89,7 @@ if core.global_exists("armor") then if orig_def then local def = table.copy(orig_def) - def.description = def.description .. " with light" + def.description = S("@1 with light", def.description) def.inventory_image = "lighted_helmets_inv_underlay.png^" .. orig_def.inventory_image if not def.texture then if modname == "rainbow_ore" then @@ -114,7 +116,12 @@ if core.global_exists("armor") then helmet_name = helmet_name .. material end - armor:register_armor(":" .. helmet_name, def) + if core.registered_tools[helmet_name] then + -- in the event two mods use the same material + helmet_name = helmet_name .. "_from_" .. modname + end + + armor:register_armor(helmet_name, def) armor_light.register(helmet_name, lvalue) if core.registered_items["default:mese_crystal"] and core.registered_items["default:torch"] then diff --git a/mods/equipment/lighted_helmets/locale/lighted_helmets.es.tr b/mods/equipment/lighted_helmets/locale/lighted_helmets.es.tr new file mode 100644 index 00000000..fa30e08a --- /dev/null +++ b/mods/equipment/lighted_helmets/locale/lighted_helmets.es.tr @@ -0,0 +1,6 @@ +# textdomain:lighted_helmets + +# Translators: Jordan Irwin (AntumDeluge) + + +@1 with light=@1 con luz diff --git a/mods/equipment/lighted_helmets/locale/template.txt b/mods/equipment/lighted_helmets/locale/template.txt new file mode 100644 index 00000000..660bfe31 --- /dev/null +++ b/mods/equipment/lighted_helmets/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain:lighted_helmets + +# Translators: + + +@1 with light= diff --git a/mods/equipment/lighted_helmets/mod.conf b/mods/equipment/lighted_helmets/mod.conf index 29e3fe89..4b0e4093 100644 --- a/mods/equipment/lighted_helmets/mod.conf +++ b/mods/equipment/lighted_helmets/mod.conf @@ -1,8 +1,8 @@ name = lighted_helmets title = Lighted Helmets description = Light-emitting helmets. -version = 1.0 -min_minetest_version = 0.4 +version = 1.1 +min_minetest_version = 5.0 author = Jordan Irwin (AntumDeluge) license = MIT depends = 3d_armor_light, 3d_armor diff --git a/mods/equipment/lighted_helmets/screenshot.png b/mods/equipment/lighted_helmets/screenshot.png index 6ef40d01..3f553d7a 100644 Binary files a/mods/equipment/lighted_helmets/screenshot.png and b/mods/equipment/lighted_helmets/screenshot.png differ