Vanessa Ezekowitz
2015-09-12 1b1780946edebfbf1e8ec2cf095b56fa76733e2b
commit | author | age
be2f30 1
S 2 local S = technic.getter
3
4 minetest.register_craftitem("technic:silicon_wafer", {
5     description = S("Silicon Wafer"),
82cba9 6     inventory_image = "technic_silicon_wafer.png",
R 7 })
8
9 minetest.register_craftitem( "technic:doped_silicon_wafer", {
be2f30 10     description = S("Doped Silicon Wafer"),
82cba9 11     inventory_image = "technic_doped_silicon_wafer.png",
R 12 })
13
ee0765 14 minetest.register_craftitem("technic:uranium_fuel", {
be2f30 15     description = S("Uranium Fuel"),
ee0765 16     inventory_image = "technic_uranium_fuel.png",
4411ba 17 })
R 18
82cba9 19 minetest.register_craftitem( "technic:diamond_drill_head", {
be2f30 20     description = S("Diamond Drill Head"),
82cba9 21     inventory_image = "technic_diamond_drill_head.png",
R 22 })
23
ee0765 24 minetest.register_tool("technic:blue_energy_crystal", {
be2f30 25     description = S("Blue Energy Crystal"),
ee0765 26     inventory_image = minetest.inventorycube(
S 27         "technic_diamond_block_blue.png",
28         "technic_diamond_block_blue.png",
29         "technic_diamond_block_blue.png"),
99fd5d 30     wear_represents = "technic_RE_charge",
00d7c9 31     on_refill = technic.refill_RE_charge,
ee0765 32     tool_capabilities = {
S 33         max_drop_level = 0,
34         groupcaps = {
35             fleshy = {times={}, uses=10000, maxlevel=0}
36         }
82cba9 37     }
ee0765 38 }) 
82cba9 39
ee0765 40 minetest.register_tool("technic:green_energy_crystal", {
be2f30 41     description = S("Green Energy Crystal"),
ee0765 42     inventory_image = minetest.inventorycube(
S 43         "technic_diamond_block_green.png",
44         "technic_diamond_block_green.png",
45         "technic_diamond_block_green.png"),
99fd5d 46     wear_represents = "technic_RE_charge",
00d7c9 47     on_refill = technic.refill_RE_charge,
ee0765 48     tool_capabilities = {
S 49         max_drop_level = 0,
50         groupcaps = {
51             fleshy = {times={}, uses=10000, maxlevel=0}
52         }
82cba9 53     }
ee0765 54 }) 
82cba9 55
ee0765 56 minetest.register_tool("technic:red_energy_crystal", {
be2f30 57     description = S("Red Energy Crystal"),
ee0765 58     inventory_image = minetest.inventorycube(
S 59         "technic_diamond_block_red.png",
60         "technic_diamond_block_red.png",
61         "technic_diamond_block_red.png"),
99fd5d 62     wear_represents = "technic_RE_charge",
00d7c9 63     on_refill = technic.refill_RE_charge,
ee0765 64     tool_capabilities = {
S 65         max_drop_level = 0,
66         groupcaps = {
67             fleshy = {times={}, uses=10000, maxlevel=0}
68         }
82cba9 69     }
ee0765 70 }) 
82cba9 71
R 72
be2f30 73 minetest.register_craftitem("technic:fine_copper_wire", {
S 74     description = S("Fine Copper Wire"),
82cba9 75     inventory_image = "technic_fine_copper_wire.png",
R 76 })
77
3f717c 78 minetest.register_craftitem("technic:fine_gold_wire", {
Z 79     description = S("Fine Gold Wire"),
80     inventory_image = "technic_fine_gold_wire.png",
81 })
82
83 minetest.register_craftitem("technic:fine_silver_wire", {
84     description = S("Fine Silver Wire"),
85     inventory_image = "technic_fine_silver_wire.png",
86 })
87
be2f30 88 minetest.register_craftitem("technic:copper_coil", {
S 89     description = S("Copper Coil"),
82cba9 90     inventory_image = "technic_copper_coil.png",
R 91 })
92
be2f30 93 minetest.register_craftitem("technic:motor", {
S 94     description = S("Electric Motor"),
82cba9 95     inventory_image = "technic_motor.png",
R 96 })
97
be2f30 98 minetest.register_craftitem("technic:lv_transformer", {
S 99     description = S("Low Voltage Transformer"),
ee0765 100     inventory_image = "technic_lv_transformer.png",
82cba9 101 })
R 102
be2f30 103 minetest.register_craftitem("technic:mv_transformer", {
S 104     description = S("Medium Voltage Transformer"),
82cba9 105     inventory_image = "technic_mv_transformer.png",
R 106 })
107
8e03d7 108 minetest.register_craftitem( "technic:hv_transformer", {
be2f30 109     description = S("High Voltage Transformer"),
8e03d7 110     inventory_image = "technic_hv_transformer.png",
R 111 })
112
3b5e6c 113 minetest.register_craftitem( "technic:control_logic_unit", {
be2f30 114     description = S("Control Logic Unit"),
3b5e6c 115     inventory_image = "technic_control_logic_unit.png",
R 116 })
117
58ae29 118 minetest.register_craftitem("technic:mixed_metal_ingot", {
be2f30 119     description = S("Mixed Metal Ingot"),
58ae29 120     inventory_image = "technic_mixed_metal_ingot.png",
R 121 })
122
123 minetest.register_craftitem("technic:composite_plate", {
be2f30 124     description = S("Composite Plate"),
58ae29 125     inventory_image = "technic_composite_plate.png",
R 126 })
127
128 minetest.register_craftitem("technic:copper_plate", {
be2f30 129     description = S("Copper Plate"),
58ae29 130     inventory_image = "technic_copper_plate.png",
R 131 })
132
133 minetest.register_craftitem("technic:carbon_plate", {
be2f30 134     description = S("Carbon Plate"),
58ae29 135     inventory_image = "technic_carbon_plate.png",
R 136 })
137
138 minetest.register_craftitem("technic:graphite", {
be2f30 139     description = S("Graphite"),
58ae29 140     inventory_image = "technic_graphite.png",
R 141 })
142
143 minetest.register_craftitem("technic:carbon_cloth", {
be2f30 144     description = S("Carbon Cloth"),
58ae29 145     inventory_image = "technic_carbon_cloth.png",
R 146 })
147
430b31 148 minetest.register_node("technic:machine_casing", {
Z 149     description = S("Machine Casing"),
150     groups = {cracky=2},
151     sunlight_propagates = true,
152     paramtype = "light",
153     drawtype = "allfaces",
154     tiles = {"technic_machine_casing.png"},
155     sounds = default.node_sound_stone_defaults(),
156 })
b0faa7 157
Z 158 for p = 0, 35 do
159     local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
160     local psuffix = p == 7 and "" or p
161     local ingot = "technic:uranium"..psuffix.."_ingot"
162     local block = "technic:uranium"..psuffix.."_block"
163     local ov = p == 7 and minetest.override_item or nil;
164     (ov or minetest.register_craftitem)(ingot, {
165         description = string.format(S("%.1f%%-Fissile Uranium Ingot"), p/10),
166         inventory_image = "technic_uranium_ingot.png",
167         groups = {uranium_ingot=1, not_in_creative_inventory=nici},
168     });
a2d1fe 169     -- Note on radioactivity of blocks:
Z 170     -- Source: <http://www.wise-uranium.org/rup.html>
171     -- The baseline radioactivity of an isotope is not especially
172     -- correlated with whether it's fissile (i.e., suitable as
173     -- reactor fuel).  Natural uranium consists mainly of fissile
174     -- U-235 and non-fissile U-238, and both U-235 and U-238 are
175     -- significantly radioactive.  U-235's massic activity is
176     -- about 80.0 MBq/kg, and U-238's is about 12.4 MBq/kg, which
177     -- superficially suggests that 3.5%-fissile uranium should have
178     -- only 1.19 times the activity of fully-depleted uranium.
179     -- But a third isotope affects the result hugely: U-234 has
180     -- massic activity of 231 GBq/kg.  Natural uranium has massic
181     -- composition of 99.2837% U-238, 0.711% U-235, and 0.0053% U-234,
182     -- so its activity comes roughly 49% each from U-234 and U-238
183     -- and only 2% from U-235.  During enrichment via centrifuge,
184     -- the U-234 fraction is concentrated along with the U-235, with
185     -- the U-234:U-235 ratio remaining close to its original value.
186     -- (Actually the U-234 gets separated from U-238 slightly more
187     -- than the U-235 is, so the U-234:U-235 ratio is slightly
188     -- higher in enriched uranium.)  A typical massic composition
189     -- for 3.5%-fissile uranium is 96.47116% U-238, 3.5% U-235, and
190     -- 0.02884% U-234.  This gives 3.5%-fissile uranium about 6.55
191     -- times the activity of fully-depleted uranium.  The values we
192     -- compute here for the "radioactive" group value are based on
193     -- linear interpolation of activity along that scale, rooted at
194     -- a natural (0.7%-fissile) uranium block having the activity of
195     -- 9 uranium ore blocks (due to 9 ingots per block).  The group
7a9d2f 196     -- value is proportional to the square root of the activity, and
Z 197     -- uranium ore has radioactive=1000.  This yields radioactive=2065
198     -- for a fully-depleted uranium block and radioactive=5286 for
199     -- a 3.5%-fissile uranium block.
b0faa7 200     (ov or minetest.register_node)(block, {
Z 201         description = string.format(S("%.1f%%-Fissile Uranium Block"), p/10),
202         tiles = {"technic_uranium_block.png"},
203         is_ground_content = true,
7a9d2f 204         groups = {uranium_block=1, not_in_creative_inventory=nici, cracky=1, level=2, radioactive=math.floor(1000*math.sqrt((1+5.55*p/35) * 9 / (1+5.55*7/35)) + 0.5)},
b0faa7 205         sounds = default.node_sound_stone_defaults(),
Z 206     });
207     if not ov then
208         minetest.register_craft({
209             output = block,
210             recipe = {
211                 {ingot, ingot, ingot},
212                 {ingot, ingot, ingot},
213                 {ingot, ingot, ingot},
214             },
215         })
216         minetest.register_craft({
217             output = ingot.." 9",
218             recipe = {{block}},
219         })
220     end
221 end