replace HV nuke reactor nodeboxes with comparable mesh model

model includes a flat extension on one "side" to fix #342

rotate the reactor with the screwdriver with shift-right-click before filling, to
line up the flat side with your cabling.  Note that the reactor doesn't actually
care which side the cable comes from.
This commit is contained in:
Vanessa Ezekowitz 2017-04-12 21:52:06 -04:00
parent 7c11ff1876
commit 1d20af1bcb
2 changed files with 378 additions and 34 deletions

View File

@ -15,8 +15,8 @@ local fuel_type = "technic:uranium_fuel" -- The reactor burns this
local S = technic.getter
local reactor_desc = S("@1 Nuclear Reactor Core", S("HV")),
local reactor_desc = S("@1 Nuclear Reactor Core", S("HV"))
local cable_entry = "^technic_cable_connection_overlay.png"
-- FIXME: Recipe should make more sense like a rod recepticle, steam chamber, HV generator?
minetest.register_craft({
@ -35,26 +35,6 @@ local reactor_formspec =
"list[current_player;main;0,5;8,4;]"..
"listring[]"
-- "Boxy sphere"
local node_box = {
{-0.353, -0.353, -0.353, 0.353, 0.353, 0.353}, -- Box
{-0.495, -0.064, -0.064, 0.495, 0.064, 0.064}, -- Circle +-x
{-0.483, -0.128, -0.128, 0.483, 0.128, 0.128},
{-0.462, -0.191, -0.191, 0.462, 0.191, 0.191},
{-0.433, -0.249, -0.249, 0.433, 0.249, 0.249},
{-0.397, -0.303, -0.303, 0.397, 0.303, 0.303},
{-0.305, -0.396, -0.305, 0.305, 0.396, 0.305}, -- Circle +-y
{-0.250, -0.432, -0.250, 0.250, 0.432, 0.250},
{-0.191, -0.461, -0.191, 0.191, 0.461, 0.191},
{-0.130, -0.482, -0.130, 0.130, 0.482, 0.130},
{-0.066, -0.495, -0.066, 0.066, 0.495, 0.066},
{-0.064, -0.064, -0.495, 0.064, 0.064, 0.495}, -- Circle +-z
{-0.128, -0.128, -0.483, 0.128, 0.128, 0.483},
{-0.191, -0.191, -0.462, 0.191, 0.191, 0.462},
{-0.249, -0.249, -0.433, 0.249, 0.249, 0.433},
{-0.303, -0.303, -0.397, 0.303, 0.303, 0.397},
}
local SS_OFF = 0
local SS_DANGER = 1
local SS_CLEAR = 2
@ -290,17 +270,18 @@ end
minetest.register_node("technic:hv_nuclear_reactor_core", {
description = reactor_desc,
tiles = {"technic_hv_nuclear_reactor_core.png"},
tiles = {
"technic_hv_nuclear_reactor_core.png",
"technic_hv_nuclear_reactor_core.png"..cable_entry
},
drawtype = "mesh",
mesh = "technic_reactor.obj",
groups = {cracky=1, technic_machine=1, technic_hv=1},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
stack_max = 1,
node_box = {
type = "fixed",
fixed = node_box
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", reactor_desc)
@ -317,19 +298,20 @@ minetest.register_node("technic:hv_nuclear_reactor_core", {
})
minetest.register_node("technic:hv_nuclear_reactor_core_active", {
tiles = {"technic_hv_nuclear_reactor_core.png"},
tiles = {
"technic_hv_nuclear_reactor_core.png",
"technic_hv_nuclear_reactor_core.png"..cable_entry
},
drawtype = "mesh",
mesh = "technic_reactor.obj",
groups = {cracky=1, technic_machine=1, technic_hv=1,
radioactive=4, not_in_creative_inventory=1},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
drop = "technic:hv_nuclear_reactor_core",
drawtype = "nodebox",
light_source = 14,
paramtype = "light",
node_box = {
type = "fixed",
fixed = node_box
},
paramtype2 = "facedir",
can_dig = technic.machine_can_dig,
after_dig_node = melt_down_reactor,
on_destruct = function(pos) siren_set_state(pos, SS_OFF) end,

View File

@ -0,0 +1,362 @@
# Blender v2.78 (sub 0) OBJ File: 'technic-reactor.blend'
# www.blender.org
o Cube.002
v 0.249998 -0.500500 -0.249998
v 0.249998 -0.500500 0.249998
v -0.249999 -0.500500 -0.249998
v -0.249999 -0.500500 0.249998
v 0.283224 0.283132 0.423876
v 0.283224 -0.283316 0.423876
v -0.283224 0.283132 0.423875
v -0.283224 -0.283316 0.423875
v 0.195088 -0.195188 0.470985
v 0.195088 0.194988 0.470985
v -0.195088 -0.195188 0.470985
v -0.195088 0.194988 0.470985
v 0.099454 -0.099560 0.499495
v 0.099454 0.099349 0.499495
v -0.099455 -0.099560 0.499495
v -0.099455 0.099349 0.499495
v -0.360476 -0.360431 -0.360476
v -0.195088 -0.195024 -0.470985
v -0.195088 0.195153 -0.470985
v 0.195089 -0.195024 -0.470985
v 0.195089 0.195153 -0.470985
v 0.283225 -0.283168 -0.423875
v 0.283225 0.283281 -0.423875
v -0.283224 -0.283168 -0.423875
v -0.283224 0.283281 -0.423875
v 0.099455 -0.099386 -0.499495
v 0.099455 0.099525 -0.499495
v -0.099455 -0.099386 -0.499495
v -0.099455 0.099525 -0.499495
v -0.360492 0.360411 0.360457
v -0.099717 0.499491 0.099455
v 0.099194 0.499491 0.099456
v -0.195335 0.470933 0.195089
v 0.195097 0.470933 0.195089
v 0.194842 0.471069 0.194640
v -0.283446 0.423808 0.283224
v 0.283003 0.424005 0.282855
v 0.360288 0.360647 0.360170
v -0.099717 0.499526 -0.099455
v 0.099194 0.499526 -0.099455
v -0.194886 0.471001 -0.195088
v 0.194842 0.471001 -0.195088
v -0.195335 0.470865 -0.195343
v -0.283076 0.423907 -0.283224
v 0.283003 0.423907 -0.283224
v -0.360358 0.360522 -0.360476
v 0.360429 0.360474 -0.360515
v 0.360664 -0.360306 -0.360247
v -0.423875 -0.283187 0.283224
v -0.423875 0.283165 0.283224
v -0.423727 -0.283464 -0.283405
v -0.423875 0.283165 -0.283224
v 0.283446 -0.423844 -0.283224
v -0.283244 -0.423843 -0.283224
v -0.470985 0.195015 -0.195088
v -0.470985 -0.195016 -0.195088
v -0.360287 -0.360683 0.360323
v 0.283446 -0.423745 0.283465
v -0.283002 -0.423942 0.283224
v 0.360664 -0.360306 0.360247
v 0.423875 0.283152 0.283225
v 0.423727 0.283428 -0.283405
v 0.424023 -0.283021 0.282947
v -0.470985 -0.195017 0.195088
v 0.470985 0.195317 0.195089
v 0.424023 -0.283021 -0.282948
v 0.470985 -0.194860 -0.195088
v 0.470883 0.195317 -0.195279
v 0.471087 -0.194860 0.194752
v -0.471087 0.194824 0.194751
v -0.499495 0.099176 0.099455
v -0.499495 -0.099735 0.099455
v -0.499495 0.099175 -0.099455
v -0.499495 -0.099735 -0.099455
v 0.499495 -0.099212 0.099456
v 0.499495 0.099699 0.099456
v 0.499495 -0.099212 -0.099455
v 0.499495 0.099699 -0.099455
v 0.254894 -0.439053 0.254894
v 0.254894 -0.438992 -0.254894
v -0.254894 -0.439019 -0.254894
v -0.254664 -0.439081 0.254894
vt 0.2500 0.0000
vt 0.2451 0.0610
vt 0.7549 0.0609
vt 0.7500 0.0000
vt 0.2500 0.0000
vt 0.2451 0.0609
vt 0.7547 0.0609
vt 0.7500 0.0000
vt 0.2500 0.0000
vt 0.2451 0.0609
vt 0.7549 0.0610
vt 0.7500 0.0000
vt 0.2498 0.0000
vt 0.2449 0.0610
vt 0.7547 0.0610
vt 0.7498 0.0000
vt 0.2168 0.2167
vt 0.1393 0.1397
vt 0.1397 0.8606
vt 0.2168 0.7831
vt 0.4004 0.4006
vt 0.3047 0.3050
vt 0.3047 0.6952
vt 0.4004 0.5995
vt 0.7830 0.2168
vt 0.8605 0.1397
vt 0.1393 0.1396
vt 0.2166 0.2168
vt 0.3049 0.3048
vt 0.3049 0.6950
vt 0.6949 0.3050
vt 0.5993 0.4006
vt 0.5993 0.5995
vt 0.6949 0.6952
vt 0.7830 0.7833
vt 0.2166 0.7833
vt 0.7832 0.7831
vt 0.6951 0.6950
vt 0.8602 0.8605
vt 0.1395 0.8605
vt 0.4005 0.5993
vt 0.5995 0.5993
vt 0.6951 0.3048
vt 0.7832 0.2167
vt 0.5995 0.4004
vt 0.8605 0.1396
vt 0.7834 0.2165
vt 0.7832 0.7832
vt 0.8605 0.8605
vt 0.4005 0.4004
vt 0.8605 0.8604
vt 0.1396 0.1395
vt 0.2170 0.2168
vt 0.2170 0.7829
vt 0.1397 0.8602
vt 0.2168 0.2168
vt 0.1397 0.1393
vt 0.1396 0.8604
vt 0.2168 0.7832
vt 0.6951 0.6950
vt 0.3053 0.6948
vt 0.6953 0.3047
vt 0.7831 0.2168
vt 0.7834 0.7832
vt 0.6953 0.6951
vt 0.8604 0.1395
vt 0.3052 0.3049
vt 0.6949 0.3049
vt 0.8602 0.1397
vt 0.7829 0.2170
vt 0.7832 0.7832
vt 0.8602 0.8606
vt 0.3052 0.6946
vt 0.3049 0.6951
vt 0.2171 0.2170
vt 0.1398 0.1397
vt 0.1395 0.8605
vt 0.2166 0.7834
vt 0.4005 0.4008
vt 0.3049 0.3051
vt 0.3047 0.6953
vt 0.4005 0.5997
vt 0.6951 0.6953
vt 0.4006 0.4003
vt 0.4006 0.5992
vt 0.5995 0.5992
vt 0.5995 0.4003
vt 0.6948 0.3051
vt 0.5995 0.4008
vt 0.5995 0.5997
vt 0.5997 0.4005
vt 0.5997 0.5995
vt 0.6951 0.3050
vt 0.3049 0.3050
vt 0.4008 0.4005
vt 0.4008 0.5995
vt 0.8603 0.1393
vt 0.2169 0.2168
vt 0.1397 0.1395
vt 0.1395 0.8605
vt 0.2166 0.7832
vt 0.8605 0.8605
vt 0.1393 0.1398
vt 0.2166 0.2168
vt 0.7832 0.2168
vt 0.8605 0.1395
vt 0.1393 0.8602
vt 0.2166 0.7835
vt 0.7830 0.7832
vt 0.8603 0.8603
vt 0.2451 0.2451
vt 0.7549 0.2451
vt 0.7547 0.7549
vt 0.2451 0.7549
vt 0.2500 0.7500
vt 0.7500 0.7500
vt 0.7500 0.2500
vt 0.2500 0.2500
vn 0.9968 -0.0794 -0.0000
vn 0.0000 -0.0794 0.9968
vn -0.9970 -0.0776 0.0002
vn 0.0000 -0.0794 -0.9968
vn 0.6360 0.0002 0.7717
vn -0.2857 0.0000 -0.9583
vn 0.0002 -0.6353 -0.7722
vn 0.4714 -0.0000 0.8819
vn 0.2857 0.0000 -0.9583
vn 0.0000 -0.2857 -0.9583
vn 0.0000 0.4714 -0.8819
vn -0.0000 0.4714 0.8819
vn 0.6346 -0.0000 -0.7728
vn -0.6347 0.0001 -0.7728
vn -0.0000 0.2857 0.9583
vn -0.0000 -0.4714 0.8819
vn -0.2857 -0.0000 0.9583
vn -0.7727 0.0001 -0.6347
vn -0.0000 -0.2857 0.9583
vn -0.4714 0.0000 -0.8819
vn 0.2857 -0.0000 0.9583
vn -0.4714 -0.0000 0.8819
vn 0.4714 0.0000 -0.8819
vn 0.0001 0.6347 0.7728
vn 0.0000 -0.4714 -0.8819
vn 0.0000 0.2857 -0.9583
vn 0.6339 0.7734 -0.0001
vn -0.7722 -0.0002 0.6353
vn -0.8820 0.4713 0.0000
vn -0.4717 0.8817 -0.0002
vn 0.0000 0.7730 -0.6344
vn 0.0000 0.8820 -0.4713
vn 0.7721 0.0002 0.6355
vn 0.4711 0.8821 -0.0002
vn 0.0000 0.0000 -1.0000
vn 0.7732 -0.0000 -0.6342
vn -0.0000 -0.0000 1.0000
vn 0.9583 0.0001 -0.2859
vn -0.7730 0.6345 -0.0000
vn 0.8815 0.4723 -0.0001
vn -1.0000 -0.0000 0.0000
vn 0.9583 0.0000 0.2857
vn 0.0000 0.6344 -0.7730
vn -0.2867 0.9580 -0.0001
vn -0.9580 -0.2867 0.0000
vn 0.0000 0.9583 -0.2858
vn 0.7733 -0.6340 0.0000
vn 1.0000 0.0000 0.0000
vn -0.8818 -0.0000 -0.4716
vn 0.9585 -0.2852 -0.0002
vn 0.2853 0.9584 -0.0001
vn 0.9582 0.2862 -0.0002
vn -0.0000 0.8819 0.4715
vn 0.0002 -0.6359 0.7718
vn -0.7728 -0.6346 0.0000
vn -0.9586 0.2849 -0.0001
vn -0.6353 -0.0002 0.7722
vn -0.0000 0.9582 0.2861
vn -0.9583 0.0000 -0.2857
vn 0.8821 -0.0001 0.4711
vn -0.6348 0.7727 -0.0001
vn -0.8821 0.0001 0.4711
vn 0.8818 0.0000 -0.4716
vn -0.9583 -0.0000 0.2857
vn -0.8820 -0.4713 -0.0000
vn 0.0000 1.0000 0.0002
vn 0.8824 -0.4705 -0.0001
vn 0.7729 0.6346 0.0000
vn 0.0001 0.7732 0.6342
vn 0.0002 -0.7722 -0.6354
vn 0.6351 -0.7724 0.0001
vn -0.6340 -0.7733 0.0000
vn 0.0000 -0.8817 -0.4719
vn -0.4716 -0.8818 0.0001
vn 0.0003 -0.7720 0.6356
vn 0.4706 -0.8823 0.0000
vn 0.0001 -0.8817 0.4718
vn 0.0000 -1.0000 0.0000
g Cube.002_Cube.002_allsides
s off
f 1/1/1 80/2/1 79/3/1 2/4/1
f 2/5/2 79/6/2 82/7/2 4/8/2
f 4/9/3 82/10/3 81/11/3 3/12/3
f 3/13/4 81/14/4 80/15/4 1/16/4
f 6/17/5 60/18/5 38/19/5 5/20/5
f 28/21/6 18/22/6 19/23/6 29/24/6
f 22/25/7 48/26/7 17/27/7 24/28/7
f 9/29/8 6/17/8 5/20/8 10/30/8
f 20/31/9 26/32/9 27/33/9 21/34/9
f 26/32/10 20/31/10 18/22/10 28/21/10
f 23/35/11 21/34/11 19/23/11 25/36/11
f 10/30/12 5/20/12 7/37/12 12/38/12
f 48/26/13 22/25/13 23/35/13 47/39/13
f 24/28/14 17/27/14 46/40/14 25/36/14
f 14/41/15 10/30/15 12/38/15 16/42/15
f 6/17/16 9/29/16 11/43/16 8/44/16
f 11/43/17 15/45/17 16/42/17 12/38/17
f 17/46/18 51/47/18 52/48/18 46/49/18
f 9/29/19 13/50/19 15/45/19 11/43/19
f 18/22/20 24/28/20 25/36/20 19/23/20
f 13/50/21 9/29/21 10/30/21 14/41/21
f 8/44/22 11/43/22 12/38/22 7/37/22
f 22/25/23 20/31/23 21/34/23 23/35/23
f 5/20/24 38/19/24 30/51/24 7/37/24
f 20/31/25 22/25/25 24/28/25 18/22/25
f 21/34/26 27/33/26 29/24/26 19/23/26
f 47/52/27 45/53/27 37/54/27 38/55/27
f 49/56/28 57/57/28 30/58/28 50/59/28
f 52/48/29 55/60/29 70/61/29 50/59/29
f 43/62/30 44/63/30 36/64/30 33/65/30
f 45/53/31 47/52/31 46/66/31 44/63/31
f 42/67/32 45/53/32 44/63/32 43/62/32 41/68/32
f 60/69/33 63/70/33 61/71/33 38/72/33
f 45/53/34 42/67/34 35/73/34 34/74/34 37/54/34
f 28/21/35 29/24/35 27/33/35 26/32/35
f 66/75/36 48/76/36 47/77/36 62/78/36
f 13/50/37 14/41/37 16/42/37 15/45/37
f 77/79/38 67/80/38 68/81/38 78/82/38
f 46/49/39 52/48/39 50/59/39 30/58/39
f 68/81/40 62/78/40 61/71/40 65/83/40
f 72/84/41 71/85/41 73/86/41 74/87/41
f 69/88/42 75/89/42 76/90/42 65/83/42
f 47/39/43 23/35/43 25/36/43 46/40/43
f 39/91/44 41/68/44 43/62/44 33/65/44 31/92/44
f 74/87/45 56/93/45 64/94/45 72/84/45
f 40/95/46 42/67/46 41/68/46 39/91/46
f 48/76/47 66/75/47 63/70/47 60/69/47
f 77/79/48 78/82/48 76/90/48 75/89/48
f 51/47/49 56/93/49 55/60/49 52/48/49
f 67/80/50 77/79/50 75/89/50 69/88/50
f 42/67/51 40/95/51 32/96/51 35/73/51
f 78/82/52 68/81/52 65/83/52 76/90/52
f 37/54/53 34/74/53 33/65/53 36/64/53
f 60/18/54 6/17/54 8/44/54 57/97/54
f 51/47/55 17/46/55 57/57/55 49/56/55
f 55/60/56 73/86/56 71/85/56 70/61/56
f 57/97/57 8/44/57 7/37/57 30/51/57
f 34/74/58 35/73/58 32/96/58 31/92/58 33/65/58
f 56/93/59 74/87/59 73/86/59 55/60/59
f 63/70/60 69/88/60 65/83/60 61/71/60
f 44/98/61 46/99/61 30/100/61 36/101/61
f 64/94/62 49/56/62 50/59/62 70/61/62
f 67/80/63 66/75/63 62/78/63 68/81/63
f 72/84/64 64/94/64 70/61/64 71/85/64
f 56/93/65 51/47/65 49/56/65 64/94/65
f 40/95/66 39/91/66 31/92/66 32/96/66
f 66/75/67 67/80/67 69/88/67 63/70/67
f 62/78/68 47/77/68 38/72/68 61/71/68
f 30/102/69 38/55/69 37/54/69 36/64/69
g Cube.002_Cube.002_bottom
f 48/103/70 53/104/70 54/105/70 17/106/70
f 53/104/71 48/103/71 60/107/71 58/108/71
f 17/106/72 54/105/72 59/109/72 57/110/72
f 53/104/73 80/111/73 81/112/73 54/105/73
f 54/105/74 81/112/74 82/113/74 59/109/74
f 58/108/75 60/107/75 57/110/75 59/109/75
f 79/114/76 80/111/76 53/104/76 58/108/76
f 82/113/77 79/114/77 58/108/77 59/109/77
f 2/115/78 4/116/78 3/117/78 1/118/78