add armor specs to rainbow armor, add technic armor mod, add redef mod, add technic recycle mod
10
mods/technic_armor/.github/workflows/luacheck.yml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
name: luacheck
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
- name: Luacheck
|
||||
uses: lunarmodules/luacheck@master
|
4
mods/technic_armor/.luacheckrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
globals = {
|
||||
"armor",
|
||||
"minetest",
|
||||
}
|
4
mods/technic_armor/LICENSE.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1
|
||||
|
||||
License Textures: poet-nohit and numberZero - 2015-2018 WTFPL
|
||||
|
14
mods/technic_armor/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Technic Armor [technic_armor]
|
||||
|
||||
[](https://github.com/mt-mods/technic_armor/actions)
|
||||
[](https://content.minetest.net/packages/mt-mods/technic_armor/)
|
||||
|
||||
Adds armor made from lead, brass, cast iron, carbon steel, stainless steel, tin and silver.
|
||||
|
||||

|
||||
|
||||
## License
|
||||
|
||||
Code: LGPL v2.1
|
||||
|
||||
Textures: WTFPL (by poet-nohit and numberZero)
|
142
mods/technic_armor/init.lua
Normal file
|
@ -0,0 +1,142 @@
|
|||
|
||||
-- Use 3d_armor translator to take advantage of existing translations for armor parts
|
||||
local S = minetest.get_translator("3d_armor")
|
||||
|
||||
local materials = {}
|
||||
|
||||
if minetest.get_modpath("technic_worldgen") then
|
||||
materials.lead = {
|
||||
name = S("Lead"),
|
||||
craft_item = "technic:lead_ingot",
|
||||
armor = 1.6,
|
||||
heal = 0,
|
||||
use = 500,
|
||||
radiation = 88
|
||||
}
|
||||
materials.brass = {
|
||||
name = S("Brass"),
|
||||
craft_item = "technic:brass_ingot",
|
||||
armor = 1.8,
|
||||
heal = 0,
|
||||
use = 650,
|
||||
radiation = 43
|
||||
}
|
||||
materials.cast = {
|
||||
name = S("Cast Iron"),
|
||||
craft_item = "technic:cast_iron_ingot",
|
||||
armor = 2.5,
|
||||
heal = 8,
|
||||
use = 200,
|
||||
radiation = 40
|
||||
}
|
||||
materials.carbon = {
|
||||
name = S("Carbon Steel"),
|
||||
craft_item = "technic:carbon_steel_ingot",
|
||||
armor = 2.7,
|
||||
heal = 10,
|
||||
use = 100,
|
||||
radiation = 40
|
||||
}
|
||||
materials.stainless = {
|
||||
name = S("Stainless Steel"),
|
||||
craft_item = "technic:stainless_steel_ingot",
|
||||
armor = 2.7,
|
||||
heal = 10,
|
||||
use = 75,
|
||||
radiation = 40
|
||||
}
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreores") then
|
||||
materials.silver = {
|
||||
name = S("Silver"),
|
||||
craft_item = "moreores:silver_ingot",
|
||||
armor = 1.8,
|
||||
heal = 6,
|
||||
use = 650,
|
||||
radiation = 53
|
||||
}
|
||||
end
|
||||
|
||||
if minetest.get_modpath("default") then
|
||||
materials.tin = {
|
||||
name = S("Tin"),
|
||||
craft_item = "default:tin_ingot",
|
||||
armor = 1.6,
|
||||
heal = 0,
|
||||
use = 750,
|
||||
radiation = 37
|
||||
}
|
||||
end
|
||||
|
||||
local parts = {
|
||||
helmet = {
|
||||
name = S("Helmet"),
|
||||
place = "head",
|
||||
level = 5,
|
||||
radlevel = 0.10,
|
||||
craft = {{1, 1, 1}, {1, 0, 1}}
|
||||
},
|
||||
chestplate = {
|
||||
name = S("Chestplate"),
|
||||
place = "torso",
|
||||
level = 8,
|
||||
radlevel = 0.35,
|
||||
craft = {{1, 0, 1}, {1, 1, 1}, {1, 1, 1}}
|
||||
},
|
||||
leggings = {
|
||||
name = S("Leggings"),
|
||||
place = "legs",
|
||||
level = 7,
|
||||
radlevel = 0.15,
|
||||
craft = {{1, 1, 1}, {1, 0, 1}, {1, 0, 1}}
|
||||
},
|
||||
boots = {
|
||||
name = S("Boots"),
|
||||
place = "feet",
|
||||
level = 4,
|
||||
radlevel = 0.10,
|
||||
craft = {{1, 0, 1}, {1, 0, 1}}
|
||||
}
|
||||
}
|
||||
|
||||
if minetest.get_modpath("shields") then
|
||||
parts.shield = {
|
||||
name = S("Shield"),
|
||||
place = "shield",
|
||||
level = 5,
|
||||
radlevel = 0.00,
|
||||
craft = {{1, 1, 1}, {1, 1, 1}, {0, 1, 0}}
|
||||
}
|
||||
end
|
||||
|
||||
local function make_recipe(template, material)
|
||||
local recipe = {}
|
||||
for i, row in ipairs(template) do
|
||||
recipe[i] = {}
|
||||
for j, item in ipairs(row) do
|
||||
recipe[i][j] = item == 0 and "" or material
|
||||
end
|
||||
end
|
||||
return recipe
|
||||
end
|
||||
|
||||
for material, m in pairs(materials) do
|
||||
for part, p in pairs(parts) do
|
||||
local name = "technic_armor:"..part.."_"..material
|
||||
armor:register_armor(name, {
|
||||
description = S("@1 @2", m.name, p.name),
|
||||
inventory_image = "technic_armor_inv_"..part.."_"..material..".png",
|
||||
groups = {
|
||||
["armor_"..p.place] = math.floor(p.level * m.armor),
|
||||
armor_heal = m.heal,
|
||||
armor_use = m.use,
|
||||
armor_radiation = math.floor(p.radlevel * m.radiation)
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = name,
|
||||
recipe = make_recipe(p.craft, m.craft_item),
|
||||
})
|
||||
end
|
||||
end
|
7
mods/technic_armor/mod.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
name = technic_armor
|
||||
description = Adds armor made from lead, brass, cast iron, carbon steel, stainless steel, tin and silver
|
||||
depends = 3d_armor
|
||||
optional_depends = default, moreores, technic_worldgen
|
||||
release = 24351
|
||||
author = mt-mods
|
||||
title = Technic Armor
|
BIN
mods/technic_armor/screenshot.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
mods/technic_armor/textures/technic_armor_boots_brass.png
Normal file
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 238 B |
BIN
mods/technic_armor/textures/technic_armor_boots_carbon.png
Normal file
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 153 B |
BIN
mods/technic_armor/textures/technic_armor_boots_cast.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
mods/technic_armor/textures/technic_armor_boots_cast_preview.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
mods/technic_armor/textures/technic_armor_boots_lead.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
mods/technic_armor/textures/technic_armor_boots_lead_preview.png
Normal file
After Width: | Height: | Size: 190 B |
BIN
mods/technic_armor/textures/technic_armor_boots_silver.png
Normal file
After Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 181 B |
BIN
mods/technic_armor/textures/technic_armor_boots_stainless.png
Normal file
After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 190 B |
BIN
mods/technic_armor/textures/technic_armor_boots_tin.png
Normal file
After Width: | Height: | Size: 297 B |
BIN
mods/technic_armor/textures/technic_armor_boots_tin_preview.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_brass.png
Normal file
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 344 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_carbon.png
Normal file
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 281 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_cast.png
Normal file
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 344 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_lead.png
Normal file
After Width: | Height: | Size: 545 B |
After Width: | Height: | Size: 316 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_silver.png
Normal file
After Width: | Height: | Size: 479 B |
After Width: | Height: | Size: 273 B |
After Width: | Height: | Size: 539 B |
After Width: | Height: | Size: 299 B |
BIN
mods/technic_armor/textures/technic_armor_chestplate_tin.png
Normal file
After Width: | Height: | Size: 477 B |
After Width: | Height: | Size: 327 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_brass.png
Normal file
After Width: | Height: | Size: 455 B |
After Width: | Height: | Size: 211 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_carbon.png
Normal file
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 136 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_cast.png
Normal file
After Width: | Height: | Size: 455 B |
After Width: | Height: | Size: 211 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_lead.png
Normal file
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 146 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_silver.png
Normal file
After Width: | Height: | Size: 299 B |
After Width: | Height: | Size: 148 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_stainless.png
Normal file
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 152 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_tin.png
Normal file
After Width: | Height: | Size: 430 B |
BIN
mods/technic_armor/textures/technic_armor_helmet_tin_preview.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_brass.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_carbon.png
Normal file
After Width: | Height: | Size: 139 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_cast.png
Normal file
After Width: | Height: | Size: 139 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_lead.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_silver.png
Normal file
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 163 B |
BIN
mods/technic_armor/textures/technic_armor_inv_boots_tin.png
Normal file
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 152 B |
After Width: | Height: | Size: 152 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 176 B |
BIN
mods/technic_armor/textures/technic_armor_inv_chestplate_tin.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_brass.png
Normal file
After Width: | Height: | Size: 140 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_carbon.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_cast.png
Normal file
After Width: | Height: | Size: 145 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_lead.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_silver.png
Normal file
After Width: | Height: | Size: 140 B |
After Width: | Height: | Size: 161 B |
BIN
mods/technic_armor/textures/technic_armor_inv_helmet_tin.png
Normal file
After Width: | Height: | Size: 140 B |
BIN
mods/technic_armor/textures/technic_armor_inv_leggings_brass.png
Normal file
After Width: | Height: | Size: 137 B |
After Width: | Height: | Size: 141 B |
BIN
mods/technic_armor/textures/technic_armor_inv_leggings_cast.png
Normal file
After Width: | Height: | Size: 141 B |
BIN
mods/technic_armor/textures/technic_armor_inv_leggings_lead.png
Normal file
After Width: | Height: | Size: 170 B |
After Width: | Height: | Size: 137 B |
After Width: | Height: | Size: 163 B |
BIN
mods/technic_armor/textures/technic_armor_inv_leggings_tin.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_brass.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_carbon.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_cast.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_lead.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_silver.png
Normal file
After Width: | Height: | Size: 521 B |
After Width: | Height: | Size: 535 B |
BIN
mods/technic_armor/textures/technic_armor_inv_shield_tin.png
Normal file
After Width: | Height: | Size: 466 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_brass.png
Normal file
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 258 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_carbon.png
Normal file
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 163 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_cast.png
Normal file
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 258 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_lead.png
Normal file
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 216 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_silver.png
Normal file
After Width: | Height: | Size: 290 B |
After Width: | Height: | Size: 189 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_stainless.png
Normal file
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 201 B |
BIN
mods/technic_armor/textures/technic_armor_leggings_tin.png
Normal file
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 258 B |
BIN
mods/technic_armor/textures/technic_armor_shield_brass.png
Normal file
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 481 B |