1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-24 16:10:16 +02:00

Version MFF.

This commit is contained in:
sys4-fr
2018-09-07 22:32:38 +02:00
parent 2d0363f3ac
commit a11527ed63
1027 changed files with 8090 additions and 37753 deletions

47
homedecor/tables.lua Normal file → Executable file
View File

@ -1,19 +1,10 @@
local S = homedecor_i18n.gettext
-- Various kinds of tables
local S = homedecor.gettext
local materials = {
{ "glass",
S("Small square glass table"),
S("Small round glass table"),
S("Large glass table piece"),
},
{ "wood",
S("Small square wooden table"),
S("Small round wooden table"),
S("Large wooden table piece"),
}
{"glass","Glass"},
{"wood","Wood"}
}
local tables_cbox = {
@ -21,9 +12,10 @@ local tables_cbox = {
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
}
for i, mat in ipairs(materials) do
local m, small_s, small_r, large = unpack(mat)
local s
for i in ipairs(materials) do
local m = materials[i][1]
local d = materials[i][2]
local s = nil
if m == "glass" then
s = default.node_sound_glass_defaults()
@ -34,7 +26,7 @@ for i, mat in ipairs(materials) do
-- small square tables
homedecor.register(m.."_table_small_square", {
description = small_s,
description = S(d.." Table (Small, Square)"),
mesh = "homedecor_table_small_square.obj",
tiles = { 'homedecor_'..m..'_table_small_square.png' },
wield_image = 'homedecor_'..m..'_table_small_square_inv.png',
@ -49,7 +41,7 @@ for i, mat in ipairs(materials) do
-- small round tables
homedecor.register(m..'_table_small_round', {
description = small_r,
description = S(d.." Table (Small, Round)"),
mesh = "homedecor_table_small_round.obj",
tiles = { "homedecor_"..m.."_table_small_round.png" },
wield_image = 'homedecor_'..m..'_table_small_round_inv.png',
@ -64,7 +56,7 @@ for i, mat in ipairs(materials) do
-- Large square table pieces
homedecor.register(m..'_table_large', {
description = large,
description = S(d.." Table Piece (large)"),
tiles = {
'homedecor_'..m..'_table_large_tb.png',
'homedecor_'..m..'_table_large_tb.png',
@ -162,20 +154,15 @@ homedecor.register("utility_table_top", {
-- Various kinds of table legs
-- local above
materials = {
{ "brass", S("brass") },
{ "wrought_iron", S("wrought iron") },
}
local materials = {"brass", "wrought_iron"}
for _, t in ipairs(materials) do
local name, desc = unpack(t)
homedecor.register("table_legs_"..name, {
description = S("Table Legs (@1)", desc),
homedecor.register("table_legs_"..t, {
description = S("Table Legs ("..t..")"),
drawtype = "plantlike",
tiles = {"homedecor_table_legs_"..name..".png"},
inventory_image = "homedecor_table_legs_"..name..".png",
wield_image = "homedecor_table_legs_"..name..".png",
tiles = {"homedecor_table_legs_"..t..".png"},
inventory_image = "homedecor_table_legs_"..t..".png",
wield_image = "homedecor_table_legs_"..t..".png",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),