commit | author | age
|
39c41a
|
1 |
|
X |
2 |
local S = technic.worldgen.gettext |
|
3 |
|
279776
|
4 |
minetest.register_node( ":technic:mineral_uranium", { |
39c41a
|
5 |
description = S("Uranium Ore"), |
279776
|
6 |
tiles = { "default_stone.png^technic_mineral_uranium.png" }, |
R |
7 |
is_ground_content = true, |
26de2f
|
8 |
groups = {cracky=3, radioactive=1}, |
279776
|
9 |
sounds = default.node_sound_stone_defaults(), |
3eefa2
|
10 |
drop = "technic:uranium_lump", |
279776
|
11 |
}) |
R |
12 |
|
|
13 |
minetest.register_node( ":technic:mineral_chromium", { |
39c41a
|
14 |
description = S("Chromium Ore"), |
279776
|
15 |
tiles = { "default_stone.png^technic_mineral_chromium.png" }, |
R |
16 |
is_ground_content = true, |
|
17 |
groups = {cracky=3}, |
|
18 |
sounds = default.node_sound_stone_defaults(), |
3eefa2
|
19 |
drop = "technic:chromium_lump", |
279776
|
20 |
}) |
R |
21 |
|
|
22 |
minetest.register_node( ":technic:mineral_zinc", { |
39c41a
|
23 |
description = S("Zinc Ore"), |
71b13a
|
24 |
tiles = { "default_stone.png^technic_mineral_zinc.png" }, |
279776
|
25 |
is_ground_content = true, |
R |
26 |
groups = {cracky=3}, |
|
27 |
sounds = default.node_sound_stone_defaults(), |
3eefa2
|
28 |
drop = "technic:zinc_lump", |
N |
29 |
}) |
|
30 |
|
|
31 |
minetest.register_node( ":technic:mineral_lead", { |
|
32 |
description = S("Lead Ore"), |
71b13a
|
33 |
tiles = { "default_stone.png^technic_mineral_lead.png" }, |
3eefa2
|
34 |
is_ground_content = true, |
N |
35 |
groups = {cracky=3}, |
|
36 |
sounds = default.node_sound_stone_defaults(), |
|
37 |
drop = "technic:lead_lump", |
|
38 |
}) |
|
39 |
|
|
40 |
minetest.register_node( ":technic:mineral_sulfur", { |
|
41 |
description = S("Sulfur Ore"), |
71b13a
|
42 |
tiles = { "default_stone.png^technic_mineral_sulfur.png" }, |
3eefa2
|
43 |
is_ground_content = true, |
N |
44 |
groups = {cracky=3}, |
|
45 |
sounds = default.node_sound_stone_defaults(), |
|
46 |
drop = "technic:sulfur_lump", |
279776
|
47 |
}) |
R |
48 |
|
|
49 |
minetest.register_node( ":technic:granite", { |
39c41a
|
50 |
description = S("Granite"), |
279776
|
51 |
tiles = { "technic_granite.png" }, |
R |
52 |
is_ground_content = true, |
0dfac3
|
53 |
groups = {cracky=1}, |
279776
|
54 |
sounds = default.node_sound_stone_defaults(), |
R |
55 |
}) |
|
56 |
|
|
57 |
minetest.register_node( ":technic:marble", { |
39c41a
|
58 |
description = S("Marble"), |
279776
|
59 |
tiles = { "technic_marble.png" }, |
R |
60 |
is_ground_content = true, |
4cf1e6
|
61 |
groups = {cracky=3, marble=1}, |
279776
|
62 |
sounds = default.node_sound_stone_defaults(), |
R |
63 |
}) |
|
64 |
|
|
65 |
minetest.register_node( ":technic:marble_bricks", { |
39c41a
|
66 |
description = S("Marble Bricks"), |
279776
|
67 |
tiles = { "technic_marble_bricks.png" }, |
R |
68 |
is_ground_content = true, |
|
69 |
groups = {cracky=3}, |
|
70 |
sounds = default.node_sound_stone_defaults(), |
|
71 |
}) |
|
72 |
|
9de141
|
73 |
minetest.register_node(":technic:uranium_block", { |
39c41a
|
74 |
description = S("Uranium Block"), |
9de141
|
75 |
tiles = { "technic_uranium_block.png" }, |
KO |
76 |
is_ground_content = true, |
26de2f
|
77 |
groups = {uranium_block=1, cracky=1, level=2, radioactive=2}, |
9de141
|
78 |
sounds = default.node_sound_stone_defaults() |
KO |
79 |
}) |
|
80 |
|
|
81 |
minetest.register_node(":technic:chromium_block", { |
39c41a
|
82 |
description = S("Chromium Block"), |
9de141
|
83 |
tiles = { "technic_chromium_block.png" }, |
KO |
84 |
is_ground_content = true, |
|
85 |
groups = {cracky=1, level=2}, |
|
86 |
sounds = default.node_sound_stone_defaults() |
|
87 |
}) |
|
88 |
|
|
89 |
minetest.register_node(":technic:zinc_block", { |
39c41a
|
90 |
description = S("Zinc Block"), |
9de141
|
91 |
tiles = { "technic_zinc_block.png" }, |
KO |
92 |
is_ground_content = true, |
|
93 |
groups = {cracky=1, level=2}, |
|
94 |
sounds = default.node_sound_stone_defaults() |
|
95 |
}) |
|
96 |
|
3eefa2
|
97 |
minetest.register_node(":technic:lead_block", { |
N |
98 |
description = S("Lead Block"), |
|
99 |
tiles = { "technic_lead_block.png" }, |
|
100 |
is_ground_content = true, |
|
101 |
groups = {cracky=1, level=2}, |
|
102 |
sounds = default.node_sound_stone_defaults() |
|
103 |
}) |
|
104 |
|
68b7bc
|
105 |
minetest.register_alias("technic:wrought_iron_block", "default:steelblock") |
Z |
106 |
|
|
107 |
minetest.override_item("default:steelblock", { |
|
108 |
description = S("Wrought Iron Block"), |
|
109 |
tiles = { "technic_wrought_iron_block.png" }, |
|
110 |
}) |
|
111 |
|
|
112 |
minetest.register_node(":technic:cast_iron_block", { |
|
113 |
description = S("Cast Iron Block"), |
|
114 |
tiles = { "technic_cast_iron_block.png" }, |
|
115 |
is_ground_content = true, |
|
116 |
groups = {cracky=1, level=2}, |
|
117 |
sounds = default.node_sound_stone_defaults() |
|
118 |
}) |
|
119 |
|
|
120 |
minetest.register_node(":technic:carbon_steel_block", { |
|
121 |
description = S("Carbon Steel Block"), |
|
122 |
tiles = { "technic_carbon_steel_block.png" }, |
|
123 |
is_ground_content = true, |
|
124 |
groups = {cracky=1, level=2}, |
|
125 |
sounds = default.node_sound_stone_defaults() |
|
126 |
}) |
|
127 |
|
9de141
|
128 |
minetest.register_node(":technic:stainless_steel_block", { |
39c41a
|
129 |
description = S("Stainless Steel Block"), |
9de141
|
130 |
tiles = { "technic_stainless_steel_block.png" }, |
KO |
131 |
is_ground_content = true, |
|
132 |
groups = {cracky=1, level=2}, |
|
133 |
sounds = default.node_sound_stone_defaults() |
|
134 |
}) |
|
135 |
|
279776
|
136 |
minetest.register_craft({ |
R |
137 |
output = 'technic:marble_bricks 4', |
|
138 |
recipe = { |
|
139 |
{'technic:marble','technic:marble'}, |
|
140 |
{'technic:marble','technic:marble'} |
|
141 |
} |
|
142 |
}) |
05131f
|
143 |
|
VE |
144 |
minetest.register_alias("technic:diamond_block", "default:diamondblock") |
0294fc
|
145 |
minetest.register_alias("technic:diamond", "default:diamond") |
Z |
146 |
minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond") |
39c41a
|
147 |
|
68b7bc
|
148 |
local function for_each_registered_node(action) |
Z |
149 |
local really_register_node = minetest.register_node |
|
150 |
minetest.register_node = function(name, def) |
|
151 |
really_register_node(name, def) |
f13570
|
152 |
action(name:gsub("^:", ""), def) |
68b7bc
|
153 |
end |
f13570
|
154 |
for name, def in pairs(minetest.registered_nodes) do |
S |
155 |
action(name, def) |
68b7bc
|
156 |
end |
Z |
157 |
end |
|
158 |
|
f13570
|
159 |
for_each_registered_node(function(node_name, node_def) |
S |
160 |
if node_name ~= "default:steelblock" and |
|
161 |
node_name:find("steelblock", 1, true) and |
|
162 |
node_def.description:find("Steel", 1, true) then |
|
163 |
minetest.override_item(node_name, { |
|
164 |
description = node_def.description:gsub("Steel", S("Wrought Iron")), |
|
165 |
}) |
68b7bc
|
166 |
end |
f13570
|
167 |
local tiles = node_def.tiles or node_def.tile_images |
S |
168 |
if tiles then |
|
169 |
local new_tiles = {} |
|
170 |
local do_override = false |
|
171 |
if type(tiles) == "string" then |
|
172 |
tiles = {tiles} |
|
173 |
end |
|
174 |
for i, t in ipairs(tiles) do |
68b7bc
|
175 |
if type(t) == "string" and t == "default_steel_block.png" then |
f13570
|
176 |
do_override = true |
68b7bc
|
177 |
t = "technic_wrought_iron_block.png" |
Z |
178 |
end |
f13570
|
179 |
table.insert(new_tiles, t) |
68b7bc
|
180 |
end |
f13570
|
181 |
if do_override then |
S |
182 |
minetest.override_item(node_name, { |
|
183 |
tiles = new_tiles |
|
184 |
}) |
|
185 |
end |
68b7bc
|
186 |
end |
Z |
187 |
end) |
f13570
|
188 |
|