commit | author | age
|
ee0765
|
1 |
|
be2f30
|
2 |
local S = technic.getter |
S |
3 |
|
dd65a6
|
4 |
technic.register_recipe_type("grinding", { description = S("Grinding") }) |
ee0765
|
5 |
|
S |
6 |
function technic.register_grinder_recipe(data) |
|
7 |
data.time = data.time or 3 |
aa8af0
|
8 |
technic.register_recipe("grinding", data) |
ee0765
|
9 |
end |
S |
10 |
|
|
11 |
local recipes = { |
aa8af0
|
12 |
-- Dusts |
ee0765
|
13 |
{"default:coal_lump", "technic:coal_dust 2"}, |
S |
14 |
{"default:copper_lump", "technic:copper_dust 2"}, |
|
15 |
{"default:desert_stone", "default:desert_sand"}, |
|
16 |
{"default:gold_lump", "technic:gold_dust 2"}, |
68b7bc
|
17 |
{"default:iron_lump", "technic:wrought_iron_dust 2"}, |
ee0765
|
18 |
{"technic:chromium_lump", "technic:chromium_dust 2"}, |
b0faa7
|
19 |
{"technic:uranium_lump", "technic:uranium_dust 2"}, |
ee0765
|
20 |
{"technic:zinc_lump", "technic:zinc_dust 2"}, |
aa8af0
|
21 |
|
N |
22 |
-- Other |
|
23 |
{"default:cobble", "default:gravel"}, |
|
24 |
{"default:gravel", "default:dirt"}, |
|
25 |
{"default:stone", "default:sand"}, |
ee0765
|
26 |
} |
29429f
|
27 |
|
22a4bc
|
28 |
if minetest.get_modpath("moreores") then |
S |
29 |
table.insert(recipes, {"moreores:mithril_lump", "technic:mithril_dust 2"}) |
|
30 |
table.insert(recipes, {"moreores:silver_lump", "technic:silver_dust 2"}) |
|
31 |
table.insert(recipes, {"moreores:tin_lump", "technic:tin_dust 2"}) |
|
32 |
end |
|
33 |
|
23603e
|
34 |
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then |
29429f
|
35 |
table.insert(recipes, {"gloopores:alatro_lump", "technic:alatro_dust 2"}) |
Z |
36 |
table.insert(recipes, {"gloopores:kalite_lump", "technic:kalite_dust 2"}) |
|
37 |
table.insert(recipes, {"gloopores:arol_lump", "technic:arol_dust 2"}) |
|
38 |
table.insert(recipes, {"gloopores:talinite_lump", "technic:talinite_dust 2"}) |
|
39 |
table.insert(recipes, {"gloopores:akalin_lump", "technic:akalin_dust 2"}) |
|
40 |
end |
ee0765
|
41 |
|
S |
42 |
if minetest.get_modpath("homedecor") then |
|
43 |
table.insert(recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"}) |
|
44 |
end |
|
45 |
|
|
46 |
for _, data in pairs(recipes) do |
d55ecc
|
47 |
technic.register_grinder_recipe({input = {data[1]}, output = data[2]}) |
ee0765
|
48 |
end |
S |
49 |
|
|
50 |
local function register_dust(name, ingot) |
|
51 |
local lname = string.lower(name) |
|
52 |
lname = string.gsub(lname, ' ', '_') |
|
53 |
minetest.register_craftitem("technic:"..lname.."_dust", { |
6d3196
|
54 |
description = S("%s Dust"):format(S(name)), |
ee0765
|
55 |
inventory_image = "technic_"..lname.."_dust.png", |
S |
56 |
on_place_on_ground = minetest.craftitem_place_item, |
|
57 |
}) |
|
58 |
if ingot then |
|
59 |
minetest.register_craft({ |
|
60 |
type = "cooking", |
|
61 |
recipe = "technic:"..lname.."_dust", |
|
62 |
output = ingot, |
|
63 |
}) |
d55ecc
|
64 |
technic.register_grinder_recipe({ input = {ingot}, output = "technic:"..lname.."_dust 1" }) |
ee0765
|
65 |
end |
S |
66 |
end |
|
67 |
|
|
68 |
-- Sorted alphibeticaly |
6d3196
|
69 |
register_dust("Brass", "technic:brass_ingot") |
N |
70 |
register_dust("Bronze", "default:bronze_ingot") |
68b7bc
|
71 |
register_dust("Carbon Steel", "technic:carbon_steel_ingot") |
Z |
72 |
register_dust("Cast Iron", "technic:cast_iron_ingot") |
6d3196
|
73 |
register_dust("Chromium", "technic:chromium_ingot") |
N |
74 |
register_dust("Coal", nil) |
|
75 |
register_dust("Copper", "default:copper_ingot") |
|
76 |
register_dust("Gold", "default:gold_ingot") |
|
77 |
register_dust("Mithril", "moreores:mithril_ingot") |
|
78 |
register_dust("Silver", "moreores:silver_ingot") |
|
79 |
register_dust("Stainless Steel", "technic:stainless_steel_ingot") |
|
80 |
register_dust("Tin", "moreores:tin_ingot") |
68b7bc
|
81 |
register_dust("Wrought Iron", "technic:wrought_iron_ingot") |
6d3196
|
82 |
register_dust("Zinc", "technic:zinc_ingot") |
23603e
|
83 |
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then |
29429f
|
84 |
register_dust("Akalin", "glooptest:akalin_ingot") |
Z |
85 |
register_dust("Alatro", "glooptest:alatro_ingot") |
|
86 |
register_dust("Arol", "glooptest:arol_ingot") |
23603e
|
87 |
register_dust("Kalite", nil) |
29429f
|
88 |
register_dust("Talinite", "glooptest:talinite_ingot") |
Z |
89 |
end |
be2f30
|
90 |
|
b0faa7
|
91 |
for p = 0, 35 do |
Z |
92 |
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil |
|
93 |
local psuffix = p == 7 and "" or p |
|
94 |
local ingot = "technic:uranium"..psuffix.."_ingot" |
|
95 |
local dust = "technic:uranium"..psuffix.."_dust" |
|
96 |
minetest.register_craftitem(dust, { |
|
97 |
description = S("%s Dust"):format(string.format(S("%.1f%%-Fissile Uranium"), p/10)), |
|
98 |
inventory_image = "technic_uranium_dust.png", |
|
99 |
on_place_on_ground = minetest.craftitem_place_item, |
|
100 |
groups = {uranium_dust=1, not_in_creative_inventory=nici}, |
|
101 |
}) |
|
102 |
minetest.register_craft({ |
|
103 |
type = "cooking", |
|
104 |
recipe = dust, |
|
105 |
output = ingot, |
|
106 |
}) |
|
107 |
technic.register_grinder_recipe({ input = {ingot}, output = dust }) |
|
108 |
end |
|
109 |
|
|
110 |
local function uranium_dust(p) |
|
111 |
return "technic:uranium"..(p == 7 and "" or p).."_dust" |
|
112 |
end |
|
113 |
for pa = 0, 34 do |
|
114 |
for pb = pa+1, 35 do |
|
115 |
local pc = (pa+pb)/2 |
|
116 |
if pc == math.floor(pc) then |
|
117 |
minetest.register_craft({ |
|
118 |
type = "shapeless", |
|
119 |
recipe = { uranium_dust(pa), uranium_dust(pb) }, |
|
120 |
output = uranium_dust(pc).." 2", |
|
121 |
}) |
|
122 |
end |
|
123 |
end |
|
124 |
end |
|
125 |
|
704925
|
126 |
minetest.register_craft({ |
P |
127 |
type = "fuel", |
|
128 |
recipe = "technic:coal_dust", |
|
129 |
burntime = 50, |
|
130 |
}) |
be2f30
|
131 |
|
2e0437
|
132 |
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then |
T |
133 |
minetest.register_craft({ |
|
134 |
type = "fuel", |
|
135 |
recipe = "technic:kalite_dust", |
|
136 |
burntime = 37.5, |
|
137 |
}) |
|
138 |
end |