123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- minetest.register_node("uranium:ore", {
- description = "Uranium Ore",
- tiles = {"default_stone.png^technic_uranium_mineral.png"},
- groups = utility.dig_groups("mineral", {melts = 1, ore = 1}),
- drop = "uranium:lump",
- sounds = default.node_sound_stone_defaults(),
- silverpick_drop = true,
- place_param2 = 10,
-
- -- Uranium in stone reacts badly to lava.
- on_melt = function(pos, other)
- minetest.after(0, function()
- tnt.boom(pos, {
- radius = 4,
- ignore_protection = false,
- ignore_on_blast = false,
- damage_radius = 6,
- disable_drops = true,
- })
- end)
- end,
- })
- minetest.register_node("uranium:block", {
- description = "Uranium Block (Not Radioactive)",
- tiles = {"technic_uranium_block.png"},
- groups = utility.dig_groups("block"),
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_craftitem("uranium:lump", {
- description = "Uranium Lump",
- inventory_image = "technic_uranium_lump.png",
- })
- minetest.register_craftitem("uranium:ingot", {
- description = "Uranium Ingot",
- inventory_image = "technic_uranium_ingot.png",
- groups = {ingot = 1},
- })
- minetest.register_craftitem("uranium:ingot_enriched", {
- description = "Enriched Uranium Ingot",
- inventory_image = "technic_uranium_ingot.png",
- groups = {ingot = 1},
- })
- minetest.register_craftitem("uranium:ingot_waste", {
- description = "Uranium Ingot (Waste)",
- inventory_image = "technic_uranium_ingot.png",
- groups = {ingot = 1},
- })
- minetest.register_craftitem("uranium:dust", {
- description = "Uranium Dust",
- inventory_image = "technic_uranium_dust.png",
- })
- minetest.register_craftitem("uranium:dust_enriched", {
- description = "Enriched Uranium Dust",
- inventory_image = "technic_uranium_dust.png",
- })
- minetest.register_craftitem("uranium:dust_waste", {
- description = "Uranium Dust (Waste)",
- inventory_image = "technic_uranium_dust.png",
- })
- minetest.register_craft({
- type = "cooking",
- output = "uranium:ingot",
- recipe = "uranium:lump",
- })
- minetest.register_craft({
- type = "cooking",
- output = "uranium:ingot",
- recipe = "uranium:dust",
- })
- minetest.register_craft({
- type = "cooking",
- output = "uranium:ingot_waste",
- recipe = "uranium:dust_waste",
- })
- minetest.register_craft({
- type = "cooking",
- output = "uranium:ingot_enriched",
- recipe = "uranium:dust_enriched",
- })
- minetest.register_craft({
- type = "grinding",
- output = 'uranium:dust 2',
- recipe = 'uranium:lump',
- time = 6,
- })
- minetest.register_craft({
- type = "grinding",
- output = 'uranium:dust',
- recipe = 'uranium:ingot',
- time = 20,
- })
- minetest.register_craft({
- type = "grinding",
- output = 'uranium:dust_waste',
- recipe = 'uranium:ingot_waste',
- time = 20,
- })
- minetest.register_craft({
- type = "grinding",
- output = 'uranium:dust_enriched',
- recipe = 'uranium:ingot_enriched',
- time = 20,
- })
- minetest.register_craft({
- output = "uranium:block",
- recipe = {
- {"uranium:ingot_waste", "uranium:ingot_waste", "uranium:ingot_waste"},
- {"uranium:ingot_waste", "uranium:ingot_waste", "uranium:ingot_waste"},
- {"uranium:ingot_waste", "uranium:ingot_waste", "uranium:ingot_waste"},
- },
- })
- minetest.register_craft({
- type = "shapeless",
- output = "uranium:ingot_waste 9",
- recipe = {"uranium:block"},
- })
- oregen.register_ore({
- ore_type = "scatter",
- ore = "uranium:ore",
- wherein = "default:stone",
- clust_scarcity = 8*8*8,
- clust_num_ores = 2,
- clust_size = 3,
- y_min = -800,
- y_max = -500,
- })
- oregen.register_ore({
- ore_type = "scatter",
- ore = "uranium:ore",
- wherein = "default:stone",
- clust_scarcity = 6*6*6,
- clust_num_ores = 2,
- clust_size = 3,
- y_min = -900,
- y_max = -700,
- })
- -- Refining uranium takes a lot of material and produces mostly waste.
- minetest.register_craft({
- type = "separating",
- output = {"uranium:dust_waste 7", "uranium:dust_enriched"},
- recipe = "uranium:dust 8",
- })
- minetest.register_craftitem("uranium:rod", {
- description = "Fission Reactor Fuel Rod",
- inventory_image = "technic_uranium_fuel.png",
- stack_max = 1,
- })
- minetest.register_craft({
- type = "compressing",
- output = "uranium:rod",
- recipe = "uranium:ingot_enriched 12",
- time = 60,
- })
- -- Get rid of uranium blocks.
- -- Having uranium blocks in the world means the heat-damage code has to worry about them,
- -- which increases CPU demand.
- for i = 0, 35, 1 do
- local newname = "default:stone"
- local oldname = "uranium:block_" .. i
- minetest.register_alias(oldname, newname)
- end
- -- Get rid of those multiple fissile levels. Players say it feels like punishment.
- for i = 0, 35, 1 do
- local ingotname = "uranium:ingot_" .. i
- local dustname = "uranium:dust_" .. i
- minetest.register_alias(ingotname, "uranium:ingot")
- minetest.register_alias(dustname, "uranium:dust")
- end
- -- Remove corium.
- minetest.register_alias("corium:chernobylite", "default:stone")
- minetest.register_alias("corium:flowing", "default:lava_flowing")
- minetest.register_alias("corium:source", "default:lava_source")
|