make homedecor game agnostic (#28)

* make materials.lua with hades, minetest game, farlands items

* make textures file for central handling

* make mods game agnostic

* take out the trash

* handle multiple seats in sofas

* add github luacheck workflow and various luacheck fixes

* add fluxionary scope creep

* fix devtest breaking right to a name policy

Co-authored-by: wsor4035 <24964441+wsor4035@users.noreply.github.com>
Co-authored-by: SFENCE <sfence.software@gmail.com>
This commit is contained in:
wsor4035
2022-05-03 15:21:14 -04:00
committed by GitHub
parent 3ba59dc2d5
commit 546cd7110f
124 changed files with 2584 additions and 2597 deletions

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"stairsplus",
"default",
"stairs",
}
globals = {
}

View File

@ -40,8 +40,10 @@ if not minetest.get_modpath("technic") then
description = S("Granite"),
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=1, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
minetest.register_craft({
output = "technic:granite 9",

View File

@ -1,3 +1,3 @@
name = building_blocks
depends = default
optional_depends = moreblocks, gloopblocks, stairs
depends = homedecor_common
optional_depends = moreblocks, gloopblocks, stairs, default

View File

@ -21,8 +21,10 @@ building_blocks_stairs("building_blocks:grate", {
sunlight_propagates = true,
is_ground_content = true,
use_texture_alpha = "clip",
groups = {cracky=1},
sounds = default.node_sound_metal_defaults(),
groups = {cracky=1, dig_generic=3},
_sound_def = {
key = "node_sound_metal_defaults",
},
})
building_blocks_stairs("building_blocks:smoothglass", {
drawtype = "glasslike",
@ -33,7 +35,9 @@ building_blocks_stairs("building_blocks:smoothglass", {
is_ground_content = true,
use_texture_alpha = "clip",
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
})
building_blocks_stairs("building_blocks:woodglass", {
drawtype = "glasslike",
@ -44,52 +48,68 @@ building_blocks_stairs("building_blocks:woodglass", {
is_ground_content = true,
use_texture_alpha = "clip",
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
})
building_blocks_stairs("building_blocks:Adobe", {
tiles = {"building_blocks_Adobe.png"},
description = S("Adobe"),
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_stone_defaults(),
groups = {crumbly=3, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
local grasstex = {"[combine:16x16^[noalpha^[colorize:#006400"}
if minetest.get_modpath("default") then
grasstex = minetest.registered_nodes["default:dirt_with_grass"].tiles
end
building_blocks_stairs("building_blocks:fakegrass", {
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
tiles = grasstex,
description = S("Fake Grass"),
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
groups = {crumbly=3, dig_sand=3},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
building_blocks_stairs("building_blocks:hardwood", {
tiles = {"building_blocks_hardwood.png"},
is_ground_content = true,
description = S("Hardwood"),
groups = {choppy=1,flammable=1},
sounds = default.node_sound_wood_defaults(),
groups = {choppy=1,flammable=1, dig_tree=1},
_sound_def = {
key = "node_sound_wood_defaults",
},
})
building_blocks_stairs("building_blocks:Roofing", {
tiles = {"building_blocks_Roofing.png"},
is_ground_content = true,
description = S("Roof block"),
groups = {snappy=3},
sounds = default.node_sound_stone_defaults(),
groups = {snappy=3, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
building_blocks_stairs("building_blocks:Tar", {
description = S("Tar"),
tiles = {"building_blocks_tar.png"},
is_ground_content = true,
groups = {crumbly=1, tar_block = 1},
sounds = default.node_sound_stone_defaults(),
groups = {crumbly=1, tar_block = 1, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
building_blocks_stairs("building_blocks:Marble", {
description = S("Marble"),
tiles = {"building_blocks_marble.png"},
is_ground_content = true,
groups = {cracky=3, marble = 1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, marble = 1, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
minetest.register_node("building_blocks:brobble_spread", {
@ -103,34 +123,37 @@ minetest.register_node("building_blocks:brobble_spread", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
local graveltex = "[combine:16x16^[noalpha^[colorize:#3a3b3c"
if minetest.get_modpath("default") then
graveltex = "default_gravel.png"
end
minetest.register_node("building_blocks:gravel_spread", {
drawtype = "raillike",
description = S("Gravel Spread"),
tiles = {"default_gravel.png"},
tiles = {graveltex},
inventory_image = "building_blocks_gravel_spread_inv.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=2},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
groups = {crumbly=2, dig_generic=4},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
end
@ -143,13 +166,15 @@ minetest.register_node("building_blocks:Tarmac_spread", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_dirt_defaults(),
groups = {cracky=3, dig_generic=4},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
minetest.register_node("building_blocks:terrycloth_towel", {
drawtype = "raillike",
@ -160,12 +185,12 @@ minetest.register_node("building_blocks:terrycloth_towel", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
minetest.register_node("building_blocks:BWtile", {
@ -188,7 +213,7 @@ minetest.register_node("building_blocks:BWtile", {
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
minetest.register_node("building_blocks:Fireplace", {
@ -201,9 +226,11 @@ minetest.register_node("building_blocks:Fireplace", {
},
paramtype = "light",
paramtype2 = "facedir",
light_source = default.LIGHT_MAX,
light_source = minetest.LIGHT_MAX,
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=2, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})

View File

@ -1,3 +1,5 @@
local materials = homedecor.materials
if minetest.get_modpath("moreblocks") then
minetest.register_craft({
output = 'building_blocks:sticks 2',
@ -20,15 +22,15 @@ end
minetest.register_craft({
output = 'building_blocks:Adobe 3',
recipe = {
{"default:sand"},
{"default:clay"},
{materials.sand},
{materials.clay_lump},
{"group:stick"},
}
})
minetest.register_craft({
output = 'building_blocks:brobble_spread 4',
recipe = {
{"default:brick", "default:cobble", "default:brick"},
{materials.brick, materials.cobble, materials.brick},
}
})
minetest.register_craft({
@ -42,20 +44,20 @@ minetest.register_craft({
output = 'building_blocks:fakegrass 2',
recipe = {
{'group:leaves'},
{"default:dirt"},
{materials.dirt},
}
})
minetest.register_craft({
output = 'building_blocks:Fireplace 1',
recipe = {
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
{materials.steel_ingot, "building_blocks:sticks", materials.steel_ingot},
}
})
minetest.register_craft({
output = 'building_blocks:grate 1',
recipe = {
{"default:steel_ingot", "default:steel_ingot"},
{"default:glass", "default:glass"},
{materials.steel_ingot, materials.steel_ingot},
{materials.glass_block, materials.glass_block},
}
})
@ -63,25 +65,27 @@ if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopbloc
minetest.register_craft({
output = 'building_blocks:gravel_spread 4',
recipe = {
{"default:gravel", "default:gravel", "default:gravel"},
{materials.gravel, materials.gravel, materials.gravel},
}
})
end
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})
if minetest.get_modpath("default") then
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})
end
minetest.register_craft({
output = 'building_blocks:knife 1',
recipe = {
@ -92,9 +96,9 @@ minetest.register_craft({
minetest.register_craft({
output = "building_blocks:Marble 9",
recipe = {
{"default:clay", "group:tar_block", "default:clay"},
{"group:tar_block","default:clay", "group:tar_block"},
{"default:clay", "group:tar_block","default:clay"},
{materials.clay_lump, "group:tar_block", materials.clay_lump},
{"group:tar_block",materials.clay_lump, "group:tar_block"},
{materials.clay_lump, "group:tar_block",materials.clay_lump},
}
})
minetest.register_craft({
@ -113,15 +117,15 @@ minetest.register_craft({
minetest.register_craft({
output = 'building_blocks:tar_base 4',
recipe = {
{"default:coal_lump", "default:gravel"},
{"default:gravel", "default:coal_lump"}
{materials.coal_lump, materials.gravel},
{materials.gravel, materials.coal_lump}
}
})
minetest.register_craft({
output = 'building_blocks:tar_base 4',
recipe = {
{"default:gravel", "default:coal_lump"},
{"default:coal_lump", "default:gravel"}
{materials.gravel, materials.coal_lump},
{materials.coal_lump, materials.gravel}
}
})
minetest.register_craft({
@ -140,14 +144,14 @@ minetest.register_craft({
output = 'building_blocks:woodglass 1',
recipe = {
{"group:wood"},
{"default:glass"},
{materials.glass_block},
}
})
minetest.register_craft({
type = "cooking",
output = "building_blocks:smoothglass",
recipe = "default:glass"
recipe = materials.glass_block
})
minetest.register_craft({
type = "cooking",