More mods!
@ -98,3 +98,11 @@ __[Item Drop](https://github.com/jordan4ibanez/item_drop)__: There's items every
|
||||
|
||||
__[More Plants](https://forum.minetest.net/viewtopic.php?f=9&t=14470)__: Adds more plants!
|
||||
|
||||
__[Real Clocks](https://forum.minetest.net/viewtopic.php?t=11385)__: Analog clocks!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
91
mods/realclocks/init.lua
Normal file
@ -0,0 +1,91 @@
|
||||
local clock_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -8/32, -3/32, 14/32, 8/32, 3/32, 16/32 },
|
||||
{ -7/32, -5/32, 14/32, 7/32, 5/32, 16/32 },
|
||||
{ -6/32, -6/32, 14/32, 6/32, 6/32, 16/32 },
|
||||
{ -5/32, -7/32, 14/32, 5/32, 7/32, 16/32 },
|
||||
{ -3/32, -8/32, 14/32, 3/32, 8/32, 16/32 }
|
||||
}
|
||||
}
|
||||
|
||||
local clock_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
|
||||
}
|
||||
|
||||
local materials = {"plastic", "wood"}
|
||||
|
||||
for _,m in ipairs(materials) do
|
||||
|
||||
minetest.register_node("realclocks:analog_clock_"..m.."_12", {
|
||||
drawtype = "mesh",
|
||||
description = "Analog "..m.." clock",
|
||||
mesh = "realclocks_analog_clock.obj",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
tiles = { "realclocks_analog_clock_"..m..".png^clock_12.png" },
|
||||
inventory_image = "realclocks_analog_clock_"..m.."_inv.png",
|
||||
wield_image = "realclocks_analog_clock_"..m.."_inv.png",
|
||||
collision_box = clock_cbox,
|
||||
selection_box = clock_sbox,
|
||||
groups = {snappy=3},
|
||||
})
|
||||
--allow both to be crafted
|
||||
local realclocks_material_thing = "default:stick"
|
||||
if m == "plastic" then
|
||||
realclocks_material_thing = "homedecor:plastic_sheeting"
|
||||
end
|
||||
minetest.register_craft({
|
||||
output = "realclocks:analog_clock_"..m.."_12",
|
||||
recipe = {
|
||||
{ "", "dye:black", "" },
|
||||
{ "", realclocks_material_thing, "" },
|
||||
{ "", "dye:black", "" },
|
||||
},
|
||||
})
|
||||
|
||||
for i = 1,11 do
|
||||
|
||||
minetest.register_node("realclocks:analog_clock_"..m.."_"..i, {
|
||||
drawtype = "mesh",
|
||||
mesh = "realclocks_analog_clock.obj",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
tiles = { "realclocks_analog_clock_"..m..".png^clock_"..i..".png" },
|
||||
collision_box = clock_cbox,
|
||||
selection_box = clock_sbox,
|
||||
groups = {snappy=3, not_in_creative_inventory=1},
|
||||
drop = "realclocks:analog_clock_"..m.."_12",
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
for n = 1,12 do
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "realclocks:analog_clock_"..m.."_"..n },
|
||||
interval = math.min(60, (3600 / (tonumber(minetest.setting_get("time_speed")))) / 3),
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local hour = minetest.get_timeofday() * 24
|
||||
if hour > 12 then
|
||||
hour = hour - 12
|
||||
end
|
||||
hour = math.ceil(hour)
|
||||
if hour < 1 then
|
||||
hour = 1
|
||||
elseif hour > 12 then
|
||||
hour = 12
|
||||
end
|
||||
if node.name ~= "realclocks:analog_clock_"..m.."_"..hour then
|
||||
local fdir = minetest.get_node(pos).param2
|
||||
minetest.set_node(pos, {name="realclocks:analog_clock_"..m.."_"..hour, param2=fdir})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
end
|
240
mods/realclocks/models/realclocks_analog_clock.obj
Normal file
@ -0,0 +1,240 @@
|
||||
# Blender v2.69 (sub 0) OBJ File: 'analog_clock.blend'
|
||||
# www.blender.org
|
||||
mtllib homedecor_analog_clock.mtl
|
||||
o Cylinder
|
||||
v 0.000000 -0.250000 0.500000
|
||||
v 0.000000 -0.250000 0.437500
|
||||
v 0.048773 -0.245196 0.500000
|
||||
v 0.048773 -0.245196 0.437500
|
||||
v 0.095671 -0.230970 0.500000
|
||||
v 0.095671 -0.230970 0.437500
|
||||
v 0.138893 -0.207867 0.500000
|
||||
v 0.138893 -0.207867 0.437500
|
||||
v 0.176777 -0.176777 0.500000
|
||||
v 0.176777 -0.176777 0.437500
|
||||
v 0.207867 -0.138893 0.500000
|
||||
v 0.207867 -0.138893 0.437500
|
||||
v 0.230970 -0.095671 0.500000
|
||||
v 0.230970 -0.095671 0.437500
|
||||
v 0.245196 -0.048773 0.500000
|
||||
v 0.245196 -0.048773 0.437500
|
||||
v 0.250000 -0.000000 0.500000
|
||||
v 0.250000 -0.000000 0.437500
|
||||
v 0.245196 0.048773 0.500000
|
||||
v 0.245196 0.048773 0.437500
|
||||
v 0.230970 0.095671 0.500000
|
||||
v 0.230970 0.095671 0.437500
|
||||
v 0.207867 0.138893 0.500000
|
||||
v 0.207867 0.138893 0.437500
|
||||
v 0.176777 0.176777 0.500000
|
||||
v 0.176777 0.176777 0.437500
|
||||
v 0.138893 0.207867 0.500000
|
||||
v 0.138893 0.207867 0.437500
|
||||
v 0.095671 0.230970 0.500000
|
||||
v 0.095671 0.230970 0.437500
|
||||
v 0.048773 0.245196 0.500000
|
||||
v 0.048773 0.245196 0.437500
|
||||
v -0.000000 0.250000 0.500000
|
||||
v -0.000000 0.250000 0.437500
|
||||
v -0.048773 0.245196 0.500000
|
||||
v -0.048773 0.245196 0.437500
|
||||
v -0.095671 0.230970 0.500000
|
||||
v -0.095671 0.230970 0.437500
|
||||
v -0.138893 0.207867 0.500000
|
||||
v -0.138893 0.207867 0.437500
|
||||
v -0.176777 0.176777 0.500000
|
||||
v -0.176777 0.176777 0.437500
|
||||
v -0.207868 0.138892 0.500000
|
||||
v -0.207868 0.138892 0.437500
|
||||
v -0.230970 0.095671 0.500000
|
||||
v -0.230970 0.095671 0.437500
|
||||
v -0.245196 0.048772 0.500000
|
||||
v -0.245196 0.048772 0.437500
|
||||
v -0.250000 -0.000000 0.500000
|
||||
v -0.250000 -0.000000 0.437500
|
||||
v -0.245196 -0.048773 0.500000
|
||||
v -0.245196 -0.048773 0.437500
|
||||
v -0.230970 -0.095671 0.500000
|
||||
v -0.230970 -0.095671 0.437500
|
||||
v -0.207867 -0.138893 0.500000
|
||||
v -0.207867 -0.138893 0.437500
|
||||
v -0.176776 -0.176777 0.500000
|
||||
v -0.176776 -0.176777 0.437500
|
||||
v -0.138892 -0.207868 0.500000
|
||||
v -0.138892 -0.207868 0.437500
|
||||
v -0.095671 -0.230970 0.500000
|
||||
v -0.095671 -0.230970 0.437500
|
||||
v -0.048772 -0.245196 0.500000
|
||||
v -0.048772 -0.245196 0.437500
|
||||
vt 0.277778 0.194444
|
||||
vt 0.277778 0.166667
|
||||
vt 0.333333 0.166667
|
||||
vt 0.333333 0.194444
|
||||
vt 0.388889 0.166667
|
||||
vt 0.388889 0.194444
|
||||
vt 0.444444 0.166667
|
||||
vt 0.444444 0.194444
|
||||
vt 0.500000 0.166667
|
||||
vt 0.500000 0.194444
|
||||
vt 0.555556 0.166667
|
||||
vt 0.555556 0.194444
|
||||
vt 0.611111 0.166667
|
||||
vt 0.611111 0.194444
|
||||
vt 0.666667 0.166667
|
||||
vt 0.666667 0.194444
|
||||
vt 0.722222 0.166667
|
||||
vt 0.722222 0.194444
|
||||
vt 0.277778 0.444444
|
||||
vt 0.277778 0.416667
|
||||
vt 0.333333 0.416667
|
||||
vt 0.333333 0.444444
|
||||
vt 0.388889 0.416667
|
||||
vt 0.388889 0.444444
|
||||
vt 0.444444 0.416667
|
||||
vt 0.444444 0.444444
|
||||
vt 0.500000 0.416667
|
||||
vt 0.500000 0.444444
|
||||
vt 0.555556 0.416667
|
||||
vt 0.555556 0.444444
|
||||
vt 0.611111 0.416667
|
||||
vt 0.611111 0.444444
|
||||
vt 0.666667 0.416667
|
||||
vt 0.666667 0.444444
|
||||
vt 0.722222 0.416667
|
||||
vt 0.722222 0.444444
|
||||
vt 0.277778 0.361111
|
||||
vt 0.277778 0.333333
|
||||
vt 0.333333 0.333333
|
||||
vt 0.333333 0.361111
|
||||
vt 0.388889 0.333333
|
||||
vt 0.388889 0.361111
|
||||
vt 0.444444 0.333333
|
||||
vt 0.444444 0.361111
|
||||
vt 0.500000 0.333333
|
||||
vt 0.500000 0.361111
|
||||
vt 0.555556 0.333333
|
||||
vt 0.555556 0.361111
|
||||
vt 0.611111 0.333333
|
||||
vt 0.611111 0.361111
|
||||
vt 0.666667 0.333333
|
||||
vt 0.666667 0.361111
|
||||
vt 0.722222 0.333333
|
||||
vt 0.722222 0.361111
|
||||
vt 0.277778 0.277778
|
||||
vt 0.277778 0.250000
|
||||
vt 0.333333 0.250000
|
||||
vt 0.333333 0.277778
|
||||
vt 0.388889 0.250000
|
||||
vt 0.388889 0.277778
|
||||
vt 0.444444 0.250000
|
||||
vt 0.444444 0.277778
|
||||
vt 0.500000 0.250000
|
||||
vt 0.500000 0.277778
|
||||
vt 0.555556 0.250000
|
||||
vt 0.555556 0.277778
|
||||
vt 0.611111 0.250000
|
||||
vt 0.611111 0.277778
|
||||
vt 0.205810 0.528444
|
||||
vt 0.249900 0.524101
|
||||
vt 0.293990 0.528444
|
||||
vt 0.336386 0.541304
|
||||
vt 0.375457 0.562189
|
||||
vt 0.409704 0.590294
|
||||
vt 0.437811 0.624542
|
||||
vt 0.458695 0.663614
|
||||
vt 0.471556 0.706010
|
||||
vt 0.475898 0.750100
|
||||
vt 0.471556 0.794190
|
||||
vt 0.458695 0.836585
|
||||
vt 0.437811 0.875658
|
||||
vt 0.409705 0.909905
|
||||
vt 0.375458 0.938011
|
||||
vt 0.336386 0.958895
|
||||
vt 0.293990 0.971756
|
||||
vt 0.249900 0.976098
|
||||
vt 0.205810 0.971756
|
||||
vt 0.163414 0.958895
|
||||
vt 0.124342 0.938010
|
||||
vt 0.090095 0.909905
|
||||
vt 0.061989 0.875658
|
||||
vt 0.041105 0.836586
|
||||
vt 0.028244 0.794190
|
||||
vt 0.023902 0.750100
|
||||
vt 0.028244 0.706010
|
||||
vt 0.041105 0.663614
|
||||
vt 0.061989 0.624542
|
||||
vt 0.090095 0.590295
|
||||
vt 0.124342 0.562189
|
||||
vt 0.163414 0.541304
|
||||
vt 0.666667 0.277778
|
||||
vt 0.666667 0.250000
|
||||
vt 0.722222 0.250000
|
||||
vt 0.722222 0.277778
|
||||
vt 0.750099 0.524102
|
||||
vt 0.794189 0.528444
|
||||
vt 0.836585 0.541305
|
||||
vt 0.875658 0.562189
|
||||
vt 0.909904 0.590295
|
||||
vt 0.938010 0.624542
|
||||
vt 0.958895 0.663614
|
||||
vt 0.971756 0.706010
|
||||
vt 0.976098 0.750100
|
||||
vt 0.971756 0.794190
|
||||
vt 0.958895 0.836586
|
||||
vt 0.938011 0.875658
|
||||
vt 0.909905 0.909905
|
||||
vt 0.875658 0.938011
|
||||
vt 0.836586 0.958895
|
||||
vt 0.794190 0.971755
|
||||
vt 0.750100 0.976098
|
||||
vt 0.706009 0.971755
|
||||
vt 0.663613 0.958894
|
||||
vt 0.624541 0.938010
|
||||
vt 0.590294 0.909904
|
||||
vt 0.562188 0.875656
|
||||
vt 0.541304 0.836583
|
||||
vt 0.528444 0.794188
|
||||
vt 0.524101 0.750098
|
||||
vt 0.528444 0.706008
|
||||
vt 0.541305 0.663613
|
||||
vt 0.562189 0.624541
|
||||
vt 0.590295 0.590295
|
||||
vt 0.624542 0.562189
|
||||
vt 0.663614 0.541305
|
||||
vt 0.706010 0.528444
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1 2/2 4/3 3/4
|
||||
f 3/4 4/3 6/5 5/6
|
||||
f 5/6 6/5 8/7 7/8
|
||||
f 7/8 8/7 10/9 9/10
|
||||
f 9/10 10/9 12/11 11/12
|
||||
f 11/12 12/11 14/13 13/14
|
||||
f 13/14 14/13 16/15 15/16
|
||||
f 15/16 16/15 18/17 17/18
|
||||
f 17/19 18/20 20/21 19/22
|
||||
f 19/22 20/21 22/23 21/24
|
||||
f 21/24 22/23 24/25 23/26
|
||||
f 23/26 24/25 26/27 25/28
|
||||
f 25/28 26/27 28/29 27/30
|
||||
f 27/30 28/29 30/31 29/32
|
||||
f 29/32 30/31 32/33 31/34
|
||||
f 31/34 32/33 34/35 33/36
|
||||
f 33/37 34/38 36/39 35/40
|
||||
f 35/40 36/39 38/41 37/42
|
||||
f 37/42 38/41 40/43 39/44
|
||||
f 39/44 40/43 42/45 41/46
|
||||
f 41/46 42/45 44/47 43/48
|
||||
f 43/48 44/47 46/49 45/50
|
||||
f 45/50 46/49 48/51 47/52
|
||||
f 47/52 48/51 50/53 49/54
|
||||
f 49/55 50/56 52/57 51/58
|
||||
f 51/58 52/57 54/59 53/60
|
||||
f 53/60 54/59 56/61 55/62
|
||||
f 55/62 56/61 58/63 57/64
|
||||
f 57/64 58/63 60/65 59/66
|
||||
f 59/66 60/65 62/67 61/68
|
||||
f 4/69 2/70 64/71 62/72 60/73 58/74 56/75 54/76 52/77 50/78 48/79 46/80 44/81 42/82 40/83 38/84 36/85 34/86 32/87 30/88 28/89 26/90 24/91 22/92 20/93 18/94 16/95 14/96 12/97 10/98 8/99 6/100
|
||||
f 63/101 64/102 2/103 1/104
|
||||
f 61/68 62/67 64/102 63/101
|
||||
f 1/105 3/106 5/107 7/108 9/109 11/110 13/111 15/112 17/113 19/114 21/115 23/116 25/117 27/118 29/119 31/120 33/121 35/122 37/123 39/124 41/125 43/126 45/127 47/128 49/129 51/130 53/131 55/132 57/133 59/134 61/135 63/136
|
BIN
mods/realclocks/textures/clock_1.png
Normal file
After Width: | Height: | Size: 118 B |
BIN
mods/realclocks/textures/clock_10.png
Normal file
After Width: | Height: | Size: 116 B |
BIN
mods/realclocks/textures/clock_11.png
Normal file
After Width: | Height: | Size: 112 B |
BIN
mods/realclocks/textures/clock_12.png
Normal file
After Width: | Height: | Size: 113 B |
BIN
mods/realclocks/textures/clock_2.png
Normal file
After Width: | Height: | Size: 116 B |
BIN
mods/realclocks/textures/clock_3.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
mods/realclocks/textures/clock_4.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
mods/realclocks/textures/clock_5.png
Normal file
After Width: | Height: | Size: 117 B |
BIN
mods/realclocks/textures/clock_6.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
mods/realclocks/textures/clock_7.png
Normal file
After Width: | Height: | Size: 115 B |
BIN
mods/realclocks/textures/clock_8.png
Normal file
After Width: | Height: | Size: 115 B |
BIN
mods/realclocks/textures/clock_9.png
Normal file
After Width: | Height: | Size: 112 B |
BIN
mods/realclocks/textures/realclocks_analog_clock_plastic.png
Normal file
After Width: | Height: | Size: 354 B |
BIN
mods/realclocks/textures/realclocks_analog_clock_plastic_inv.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
mods/realclocks/textures/realclocks_analog_clock_wood.png
Normal file
After Width: | Height: | Size: 481 B |
BIN
mods/realclocks/textures/realclocks_analog_clock_wood_inv.png
Normal file
After Width: | Height: | Size: 5.2 KiB |