Refactor armors to be mods rather than hardcoded into API (#78)
* Begin work on "armors as modpack" refactor letting anyone to enable/disable any armors they want as mods rather than obscure settings * Fix some steel armor mishaps, remove pointless dependency on "default" * Move admin armor into mod * Make wood armor into a mod * More consistent steel description text etc. * remove wood references from 3d_armor api locale * remove admin armor reference from 3d_armor locale template.txt * Remove steel textures from api * Bronze armor as mod * Fix admin, wood armor missing local S translator var Fix wood locale missing template.txt * Fix bronze missing locale * Cactus as mod * Crystal into mod * Diamond into mod * Mithril and Gold as mods * Register armor fix * Nether as mod * Clean-up, add optional depends for mod armors, remove armor.lua from 3d_armor * Fix badly named mod.conf for admin, gold, nether armors Fix attempt to register crafting recipe even though the armor is disabled via setting * Fix steel and wood having bad globals for crafting section, turned them to locals * Fix brazilian translation getting deleted Fix cactus armor locales being incorrectly named
26
armor_cactus/LICENSE.txt
Normal file
@ -0,0 +1,26 @@
|
||||
[mod] 3d Armor [3d_armor]
|
||||
=========================
|
||||
|
||||
License Source Code
|
||||
-------------------
|
||||
|
||||
Copyright (C) 2012-2019 stujones11, Stuart Jones <stujones111@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
License Textures
|
||||
----------------
|
||||
|
||||
Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0
|
1
armor_cactus/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
3d_armor
|
1
armor_cactus/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds craftable cactus armor.
|
183
armor_cactus/init.lua
Normal file
@ -0,0 +1,183 @@
|
||||
|
||||
--- Registered armors.
|
||||
--
|
||||
-- @topic armor
|
||||
|
||||
|
||||
-- support for i18n
|
||||
local S = armor.get_translator
|
||||
|
||||
--- Cactus
|
||||
--
|
||||
-- Requires setting `armor_material_cactus`.
|
||||
--
|
||||
-- @section cactus
|
||||
|
||||
if armor.materials.cactus then
|
||||
--- Cactus Helmet
|
||||
--
|
||||
-- @helmet 3d_armor:helmet_cactus
|
||||
-- @img 3d_armor_inv_helmet_cactus.png
|
||||
-- @grp armor_head 1
|
||||
-- @grp armor_heal 0
|
||||
-- @grp armor_use 1000
|
||||
-- @armorgrp fleshy 5
|
||||
-- @damagegrp cracky 3
|
||||
-- @damagegrp snappy 3
|
||||
-- @damagegrp choppy 2
|
||||
-- @damagegrp crumbly 2
|
||||
-- @damagegrp level 1
|
||||
armor:register_armor(":3d_armor:helmet_cactus", {
|
||||
description = S("Cactus Helmet"),
|
||||
inventory_image = "3d_armor_inv_helmet_cactus.png",
|
||||
groups = {armor_head=1, armor_heal=0, armor_use=1000},
|
||||
armor_groups = {fleshy=5},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
|
||||
})
|
||||
--- Cactus Chestplate
|
||||
--
|
||||
-- @chestplate 3d_armor:chestplate_cactus
|
||||
-- @img 3d_armor_inv_chestplate_cactus.png
|
||||
-- @grp armor_torso 1
|
||||
-- @grp armor_heal 0
|
||||
-- @grp armor_use 1000
|
||||
-- @armorgrp fleshy 10
|
||||
-- @damagegrp cracky 3
|
||||
-- @damagegrp snappy 3
|
||||
-- @damagegrp choppy 2
|
||||
-- @damagegrp crumbly 2
|
||||
-- @damagegrp level 1
|
||||
armor:register_armor(":3d_armor:chestplate_cactus", {
|
||||
description = S("Cactus Chestplate"),
|
||||
inventory_image = "3d_armor_inv_chestplate_cactus.png",
|
||||
groups = {armor_torso=1, armor_heal=0, armor_use=1000},
|
||||
armor_groups = {fleshy=10},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
|
||||
})
|
||||
--- Cactus Leggings
|
||||
--
|
||||
-- @leggings 3d_armor:leggings_cactus
|
||||
-- @img 3d_armor_inv_leggings_cactus.png
|
||||
-- @grp armor_legs 1
|
||||
-- @grp armor_heal 0
|
||||
-- @grp armor_use 1000
|
||||
-- @armorgrp fleshy 10
|
||||
-- @damagegrp cracky 3
|
||||
-- @damagegrp snappy 3
|
||||
-- @damagegrp choppy 2
|
||||
-- @damagegrp crumbly 2
|
||||
-- @damagegrp level 1
|
||||
armor:register_armor(":3d_armor:leggings_cactus", {
|
||||
description = S("Cactus Leggings"),
|
||||
inventory_image = "3d_armor_inv_leggings_cactus.png",
|
||||
groups = {armor_legs=1, armor_heal=0, armor_use=1000},
|
||||
armor_groups = {fleshy=10},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
|
||||
})
|
||||
--- Cactus Boots
|
||||
--
|
||||
-- @boots 3d_armor:boots_cactus
|
||||
-- @img 3d_armor_inv_boots_cactus.png
|
||||
-- @grp armor_feet 1
|
||||
-- @grp armor_heal 0
|
||||
-- @grp armor_use 1000
|
||||
-- @armorgrp fleshy 5
|
||||
-- @damagegrp cracky 3
|
||||
-- @damagegrp snappy 3
|
||||
-- @damagegrp choppy 2
|
||||
-- @damagegrp crumbly 2
|
||||
-- @damagegrp level 1
|
||||
armor:register_armor(":3d_armor:boots_cactus", {
|
||||
description = S("Cactus Boots"),
|
||||
inventory_image = "3d_armor_inv_boots_cactus.png",
|
||||
groups = {armor_feet=1, armor_heal=0, armor_use=1000},
|
||||
armor_groups = {fleshy=5},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
|
||||
})
|
||||
local cactus_armor_fuel = {
|
||||
helmet = 14,
|
||||
chestplate = 16,
|
||||
leggings = 15,
|
||||
boots = 13
|
||||
}
|
||||
for armor, burn in pairs(cactus_armor_fuel) do
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "3d_armor:" .. armor .. "_cactus",
|
||||
burntime = burn,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
--- Crafting
|
||||
--
|
||||
-- @section craft
|
||||
|
||||
--- Craft recipes for helmets, chestplates, leggings, boots, & shields.
|
||||
--
|
||||
-- @craft armor
|
||||
-- @usage
|
||||
-- Key:
|
||||
-- - m: material
|
||||
-- - wood: group:wood
|
||||
-- - cactus: default:cactus
|
||||
-- - steel: default:steel_ingot
|
||||
-- - bronze: default:bronze_ingot
|
||||
-- - diamond: default:diamond
|
||||
-- - gold: default:gold_ingot
|
||||
-- - mithril: moreores:mithril_ingot
|
||||
-- - crystal: ethereal:crystal_ingot
|
||||
-- - nether: nether:nether_ingot
|
||||
--
|
||||
-- helmet: chestplate: leggings:
|
||||
-- ┌───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┐
|
||||
-- │ m │ m │ m │ │ m │ │ m │ │ m │ m │ m │
|
||||
-- ├───┼───┼───┤ ├───┼───┼───┤ ├───┼───┼───┤
|
||||
-- │ m │ │ m │ │ m │ m │ m │ │ m │ │ m │
|
||||
-- ├───┼───┼───┤ ├───┼───┼───┤ ├───┼───┼───┤
|
||||
-- │ │ │ │ │ m │ m │ m │ │ m │ │ m │
|
||||
-- └───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┘
|
||||
--
|
||||
-- boots: shield:
|
||||
-- ┌───┬───┬───┐ ┌───┬───┬───┐
|
||||
-- │ │ │ │ │ m │ m │ m │
|
||||
-- ├───┼───┼───┤ ├───┼───┼───┤
|
||||
-- │ m │ │ m │ │ m │ m │ m │
|
||||
-- ├───┼───┼───┤ ├───┼───┼───┤
|
||||
-- │ m │ │ m │ │ │ m │ │
|
||||
-- └───┴───┴───┘ └───┴───┴───┘
|
||||
|
||||
local s = "cactus"
|
||||
local m = armor.materials.cactus
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:helmet_"..s,
|
||||
recipe = {
|
||||
{m, m, m},
|
||||
{m, "", m},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:chestplate_"..s,
|
||||
recipe = {
|
||||
{m, "", m},
|
||||
{m, m, m},
|
||||
{m, m, m},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:leggings_"..s,
|
||||
recipe = {
|
||||
{m, m, m},
|
||||
{m, "", m},
|
||||
{m, "", m},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "3d_armor:boots_"..s,
|
||||
recipe = {
|
||||
{m, "", m},
|
||||
{m, "", m},
|
||||
},
|
||||
})
|
||||
end
|
9
armor_cactus/locale/armor_cactus.de.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Kaktusstiefel
|
||||
Cactus Chestplate=Kaktusbrustplatte
|
||||
Cactus Helmet=Kaktushelm
|
||||
Cactus Leggings=Kaktushose
|
9
armor_cactus/locale/armor_cactus.es.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Botas de cactus
|
||||
Cactus Chestplate=Peto de cactus
|
||||
Cactus Helmet=Casco de cactus
|
||||
Cactus Leggings=Grebas de cactus
|
9
armor_cactus/locale/armor_cactus.fr.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Bottes en cactus
|
||||
Cactus Chestplate=Cuirasse en cactus
|
||||
Cactus Helmet=Casque en cactus
|
||||
Cactus Leggings=Jambières en cactus
|
9
armor_cactus/locale/armor_cactus.it.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Stivali di cactus
|
||||
Cactus Chestplate=Corazza di cactus
|
||||
Cactus Helmet=Elmo di cactus
|
||||
Cactus Leggings=Gambali di cactus
|
9
armor_cactus/locale/armor_cactus.ms.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=But Kaktus
|
||||
Cactus Chestplate=Perisai Dada Kaktus
|
||||
Cactus Helmet=Helmet Kaktus
|
||||
Cactus Leggings=Perisai Kaki Kaktus
|
9
armor_cactus/locale/armor_cactus.pt.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Botas de Madeira
|
||||
Cactus Chestplate=Peitoral de Cacto
|
||||
Cactus Helmet=Capacete de Cacto
|
||||
Cactus Leggings=Calças de Cacto
|
9
armor_cactus/locale/armor_cactus.pt_BR.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=Botas de Madeira
|
||||
Cactus Chestplate=Peitoral de Cacto
|
||||
Cactus Helmet=Capacete de Cacto
|
||||
Cactus Leggings=Calças de Cacto
|
9
armor_cactus/locale/armor_cactus.ru.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=кактусовые ботинки
|
||||
Cactus Chestplate=кактусовый бронежилет
|
||||
Cactus Helmet=кактусовый шлем
|
||||
Cactus Leggings=кактусовые гамаши
|
9
armor_cactus/locale/template.txt
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: armor_cactus
|
||||
|
||||
|
||||
### init.lua ###
|
||||
|
||||
Cactus Boots=
|
||||
Cactus Chestplate=
|
||||
Cactus Helmet=
|
||||
Cactus Leggings=
|
3
armor_cactus/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = armor_cactus
|
||||
depends = 3d_armor
|
||||
description = Adds craftable cactus armor.
|
BIN
armor_cactus/textures/3d_armor_boots_cactus.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
armor_cactus/textures/3d_armor_boots_cactus_preview.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
armor_cactus/textures/3d_armor_chestplate_cactus.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
armor_cactus/textures/3d_armor_chestplate_cactus_preview.png
Normal file
After Width: | Height: | Size: 286 B |
BIN
armor_cactus/textures/3d_armor_helmet_cactus.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
armor_cactus/textures/3d_armor_helmet_cactus_preview.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
armor_cactus/textures/3d_armor_inv_boots_cactus.png
Normal file
After Width: | Height: | Size: 194 B |
BIN
armor_cactus/textures/3d_armor_inv_chestplate_cactus.png
Normal file
After Width: | Height: | Size: 246 B |
BIN
armor_cactus/textures/3d_armor_inv_helmet_cactus.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
armor_cactus/textures/3d_armor_inv_leggings_cactus.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
armor_cactus/textures/3d_armor_leggings_cactus.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
armor_cactus/textures/3d_armor_leggings_cactus_preview.png
Normal file
After Width: | Height: | Size: 261 B |