diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..55879b0 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,30 @@ +std = "lua51+minetest" +unused_args = false +allow_defined_top = true +max_line_length = 999 + +stds.minetest = { + read_globals = { + "DIR_DELIM", + "minetest", + "core", + "dump", + "vector", + "nodeupdate", + "VoxelManip", + "VoxelArea", + "PseudoRandom", + "ItemStack", + "default", + table = { + fields = { + "copy", + }, + }, + } +} + +read_globals = { + "default", + "moreores", +} diff --git a/init.lua b/init.lua index 32873a1..348c059 100644 --- a/init.lua +++ b/init.lua @@ -7,6 +7,7 @@ local modpath = minetest.get_modpath("basic_materials") basic_materials = {} +basic_materials.mod = { author = "Vanessa Dannenberg" } dofile(modpath.."/metals.lua") dofile(modpath.."/plastics.lua") diff --git a/metals.lua b/metals.lua index 37685f8..0a3243b 100644 --- a/metals.lua +++ b/metals.lua @@ -5,31 +5,37 @@ local S = minetest.get_translator("basic_materials") minetest.register_craftitem("basic_materials:steel_wire", { description = S("Spool of steel wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_steel_wire.png" }) minetest.register_craftitem("basic_materials:copper_wire", { description = S("Spool of copper wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_copper_wire.png" }) minetest.register_craftitem("basic_materials:silver_wire", { description = S("Spool of silver wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_silver_wire.png" }) minetest.register_craftitem("basic_materials:gold_wire", { description = S("Spool of gold wire"), + groups = { wire = 1 }, inventory_image = "basic_materials_gold_wire.png" }) minetest.register_craftitem("basic_materials:steel_strip", { description = S("Steel Strip"), + groups = { strip = 1 }, inventory_image = "basic_materials_steel_strip.png" }) minetest.register_craftitem("basic_materials:copper_strip", { description = S("Copper Strip"), + groups = { strip = 1 }, inventory_image = "basic_materials_copper_strip.png" }) @@ -40,11 +46,13 @@ minetest.register_craftitem("basic_materials:steel_bar", { minetest.register_craftitem("basic_materials:chainlink_brass", { description = S("Chainlinks (brass)"), + groups = { chainlinks = 1 }, inventory_image = "basic_materials_chainlink_brass.png" }) minetest.register_craftitem("basic_materials:chainlink_steel", { description = S("Chainlinks (steel)"), + groups = { chainlinks = 1 }, inventory_image = "basic_materials_chainlink_steel.png" }) @@ -70,14 +78,6 @@ local chains_sbox = { fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 } } -local topchains_sbox = { - type = "fixed", - fixed = { - { -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 }, - { -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 } - } -} - minetest.register_node("basic_materials:chain_steel", { description = S("Chain (steel, hanging)"), drawtype = "mesh", diff --git a/plastics.lua b/plastics.lua index 3ac0f98..e29af53 100644 --- a/plastics.lua +++ b/plastics.lua @@ -10,6 +10,7 @@ minetest.register_craftitem("basic_materials:plastic_sheet", { minetest.register_craftitem("basic_materials:plastic_strip", { description = S("Plastic strips"), + groups = { strip = 1 }, inventory_image = "basic_materials_plastic_strip.png", })