forked from nalc/technic_armor
Various changes and improvements (#1)
* Use mod.conf for (soft) dependencies and description. * Deletes deprecated `depends.txt` and `description.txt`. * Add GitHub workflow to LuaCheck the code * Fix minor LuaCheck warnings
This commit is contained in:
parent
513569cd42
commit
388f1c2853
16
.github/workflows/build.yml
vendored
Normal file
16
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: apt
|
||||
run: sudo apt-get install -y luarocks
|
||||
- name: luacheck install
|
||||
run: luarocks install --local luacheck
|
||||
- name: luacheck run
|
||||
run: $HOME/.luarocks/bin/luacheck ./
|
@ -1,4 +1,4 @@
|
||||
|
||||
allow_defined_top = true
|
||||
unused_args = false
|
||||
|
||||
globals = {
|
||||
|
@ -1,3 +0,0 @@
|
||||
3d_armor
|
||||
technic_worldgen?
|
||||
moreores?
|
@ -1 +0,0 @@
|
||||
Adds tin, silver and technic materials to 3d_armor.
|
11
init.lua
11
init.lua
@ -11,7 +11,8 @@ local stats = {
|
||||
brass = { name=S("Brass"), material="technic:brass_ingot", armor=1.8, heal=0, use=650, radiation=43 },
|
||||
cast = { name=S("Cast Iron"), material="technic:cast_iron_ingot", armor=2.5, heal=8, use=200, radiation=40 },
|
||||
carbon = { name=S("Carbon Steel"), material="technic:carbon_steel_ingot", armor=2.7, heal=10, use=100, radiation=40 },
|
||||
stainless = { name=S("Stainless Steel"), material="technic:stainless_steel_ingot", armor=2.7, heal=10, use=75, radiation=40 },
|
||||
stainless = { name=S("Stainless Steel"), material="technic:" ..
|
||||
"stainless_steel_ingot", armor=2.7, heal=10, use=75, radiation=40 },
|
||||
}
|
||||
if minetest.get_modpath("moreores") then
|
||||
stats.tin = { name=S("Tin"), material="moreores:tin_ingot", armor=1.6, heal=0, use=750, radiation=37 }
|
||||
@ -51,10 +52,14 @@ for key, armor in pairs(stats) do
|
||||
for partkey, part in pairs(parts) do
|
||||
local partname = "technic_armor:"..partkey.."_"..key
|
||||
minetest.register_tool(partname, {
|
||||
-- Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
|
||||
-- Translators: @1 stands for material and @2 for part of the armor
|
||||
-- so that you could use a conjunction if in your language part name
|
||||
-- comes first then material (e.g. in french 'Silver Boots'
|
||||
-- is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
|
||||
description = S("@1 @2", armor.name, part.name),
|
||||
inventory_image = "technic_armor_inv_"..partkey.."_"..key..".png",
|
||||
groups = {["armor_"..part.place]=math.floor(part.level*armor.armor), armor_heal=armor.heal, armor_use=armor.use, armor_radiation=math.floor(part.radlevel*armor.radiation)},
|
||||
groups = {["armor_"..part.place]=math.floor(part.level*armor.armor), armor_heal=armor.heal,
|
||||
armor_use=armor.use, armor_radiation=math.floor(part.radlevel*armor.radiation)},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_craft({
|
||||
|
Loading…
Reference in New Issue
Block a user