1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-05 01:40:30 +01:00
homedecor_modpack/homedecor/clocks.lua

100 lines
2.6 KiB
Lua
Raw Normal View History

2015-02-28 10:14:46 +01:00
local clock_sbox = {
type = "fixed",
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
}
local clock_materials = {
{ "plastic", "homedecor_generic_plastic.png" },
{ "wood", "default_wood.png" }
}
2015-02-28 10:14:46 +01:00
for i in ipairs(clock_materials) do
local m1 = clock_materials[i][1]
local m2 = clock_materials[i][2]
homedecor.register("analog_clock_"..m1, {
description = "Analog clock ("..m1..")",
2015-02-28 10:14:46 +01:00
mesh = "homedecor_analog_clock.obj",
tiles = {
"homedecor_analog_clock_face.png",
m2,
"homedecor_analog_clock_back.png"
},
inventory_image = "homedecor_analog_clock_"..m1.."_inv.png",
2015-04-29 14:14:36 +02:00
walkable = false,
2015-02-28 10:14:46 +01:00
selection_box = clock_sbox,
groups = {snappy=3},
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_wood_defaults(),
2015-02-28 10:14:46 +01:00
})
end
homedecor.register("digital_clock", {
description = "Digital clock",
tiles = {
"homedecor_digital_clock_edges.png",
"homedecor_digital_clock_edges.png",
"homedecor_digital_clock_edges.png",
"homedecor_digital_clock_edges.png",
"homedecor_digital_clock_back.png",
"homedecor_digital_clock_front.png"
},
inventory_image = "homedecor_digital_clock_inv.png",
node_box = {
type = "fixed",
fixed = {
{-0.28125, -0.25, 0.4375, 0.3125, 0.25, 0.5},
}
},
2015-04-29 14:14:36 +02:00
walkable = false,
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3},
})
homedecor.register("alarm_clock", {
description = "Alarm clock",
tiles = {
"homedecor_alarm_clock_top.png",
"homedecor_alarm_clock_bottom.png",
"homedecor_alarm_clock_sides.png",
"homedecor_alarm_clock_sides.png^[transformFX",
"homedecor_alarm_clock_back.png",
"homedecor_alarm_clock_front.png"
},
inventory_image = "homedecor_alarm_clock_inv.png",
node_box = {
type = "fixed",
fixed = {
{ -9/32, -16/32, 7/32, 10/32, -5/32, 16/32 },
}
},
2015-04-29 14:14:36 +02:00
walkable = false,
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3},
})
2015-03-31 03:06:07 +02:00
local gf_cbox = {
type = "fixed",
fixed = { -7/16, -8/16, -7/16, 7/16, 24/16, 7/16 }
}
homedecor.register("grandfather_clock", {
description = "Grandfather Clock",
mesh = "homedecor_grandfather_clock.obj",
tiles = {
2015-04-06 16:55:56 +02:00
"default_glass.png",
2015-03-31 03:06:07 +02:00
"homedecor_grandfather_clock_face.png",
homedecor.lux_wood,
2015-04-06 16:55:56 +02:00
"homedecor_grandfather_clock_face_edge.png",
"homedecor_generic_metal_brass.png"
2015-03-31 03:06:07 +02:00
},
inventory_image = "homedecor_grandfather_clock_inv.png",
groups = { snappy = 3 },
selection_box = gf_cbox,
collision_box = gf_cbox,
2015-04-06 16:55:56 +02:00
sounds = default.node_sound_wood_defaults(),
expand = { top="placeholder" },
on_rotate = screwdriver.rotate_simple
2015-03-31 03:06:07 +02:00
})
minetest.register_alias("homedecor:grandfather_clock_bottom", "homedecor:grandfather_clock")
minetest.register_alias("homedecor:grandfather_clock_top", "air")