mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-20 03:33:43 +01:00
9444afd722
* 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
183 lines
5.3 KiB
Lua
183 lines
5.3 KiB
Lua
|
|
--- Registered armors.
|
|
--
|
|
-- @topic armor
|
|
|
|
|
|
-- support for i18n
|
|
local S = armor.get_translator
|
|
|
|
|
|
--- Gold
|
|
--
|
|
-- Requires `armor_material_gold`.
|
|
--
|
|
-- @section gold
|
|
|
|
if armor.materials.gold then
|
|
--- Gold Helmet
|
|
--
|
|
-- @helmet 3d_armor:helmet_gold
|
|
-- @img 3d_armor_inv_helmet_gold.png
|
|
-- @grp armor_head 1
|
|
-- @grp armor_heal 6
|
|
-- @grp armor_use 300
|
|
-- @grp physics_speed -0.02
|
|
-- @grp physics_gravity 0.02
|
|
-- @armorgrp fleshy 10
|
|
-- @damagegrp cracky 1
|
|
-- @damagegrp snappy 2
|
|
-- @damagegrp choppy 2
|
|
-- @damagegrp crumbly 3
|
|
-- @damagegrp level 2
|
|
armor:register_armor(":3d_armor:helmet_gold", {
|
|
description = S("Gold Helmet"),
|
|
inventory_image = "3d_armor_inv_helmet_gold.png",
|
|
groups = {armor_head=1, armor_heal=6, armor_use=300,
|
|
physics_speed=-0.02, physics_gravity=0.02},
|
|
armor_groups = {fleshy=10},
|
|
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
|
|
})
|
|
--- Gold Chestplate
|
|
--
|
|
-- @chestplate 3d_armor:chestplate_gold
|
|
-- @img 3d_armor_inv_chestplate_gold.png
|
|
-- @grp armor_torso 1
|
|
-- @grp armor_heal 6
|
|
-- @grp armor_use 300
|
|
-- @grp physics_speed -0.05
|
|
-- @grp physics_gravity 0.05
|
|
-- @armorgrp fleshy 15
|
|
-- @damagegrp cracky 1
|
|
-- @damagegrp snappy 2
|
|
-- @damagegrp choppy 2
|
|
-- @damagegrp crumbly 3
|
|
-- @damagegrp level 2
|
|
armor:register_armor(":3d_armor:chestplate_gold", {
|
|
description = S("Gold Chestplate"),
|
|
inventory_image = "3d_armor_inv_chestplate_gold.png",
|
|
groups = {armor_torso=1, armor_heal=6, armor_use=300,
|
|
physics_speed=-0.05, physics_gravity=0.05},
|
|
armor_groups = {fleshy=15},
|
|
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
|
|
})
|
|
--- Gold Leggings
|
|
--
|
|
-- @leggings 3d_armor:leggings_gold
|
|
-- @img 3d_armor_inv_leggings_gold.png
|
|
-- @grp armor_legs 1
|
|
-- @grp armor_heal 6
|
|
-- @grp armor_use 300
|
|
-- @grp physics_speed -0.04
|
|
-- @grp physics_gravity 0.04
|
|
-- @armorgrp fleshy 15
|
|
-- @damagegrp cracky 1
|
|
-- @damagegrp snappy 2
|
|
-- @damagegrp choppy 2
|
|
-- @damagegrp crumbly 3
|
|
-- @damagegrp level 2
|
|
armor:register_armor(":3d_armor:leggings_gold", {
|
|
description = S("Gold Leggings"),
|
|
inventory_image = "3d_armor_inv_leggings_gold.png",
|
|
groups = {armor_legs=1, armor_heal=6, armor_use=300,
|
|
physics_speed=-0.04, physics_gravity=0.04},
|
|
armor_groups = {fleshy=15},
|
|
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
|
|
})
|
|
--- Gold Boots
|
|
--
|
|
-- @boots 3d_armor:boots_gold
|
|
-- @img 3d_armor_inv_boots_gold.png
|
|
-- @grp armor_feet 1
|
|
-- @grp armor_heal 6
|
|
-- @grp armor_use 300
|
|
-- @grp physics_speed -0.02
|
|
-- @grp physics_gravity 0.02
|
|
-- @armorgrp fleshy 10
|
|
-- @damagegrp cracky 1
|
|
-- @damagegrp snappy 2
|
|
-- @damagegrp choppy 2
|
|
-- @damagegrp crumbly 3
|
|
-- @damagegrp level 2
|
|
armor:register_armor(":3d_armor:boots_gold", {
|
|
description = S("Gold Boots"),
|
|
inventory_image = "3d_armor_inv_boots_gold.png",
|
|
groups = {armor_feet=1, armor_heal=6, armor_use=300,
|
|
physics_speed=-0.02, physics_gravity=0.02},
|
|
armor_groups = {fleshy=10},
|
|
damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
|
|
})
|
|
|
|
|
|
--- 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 = "gold"
|
|
local m = armor.materials.gold
|
|
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 |