-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecipes.lua
More file actions
55 lines (52 loc) · 1.55 KB
/
recipes.lua
File metadata and controls
55 lines (52 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--This is where we define the recipes for the alchemy system.
local raw = {
["Air+Earth"] = "Dust",
["Air+Earth+Fire"] = "Ash",
["Air+Earth+Water"] = "Volcanic Rock",
["Air+Fire"] = "Heatwave",
["Air+Fire+Water"] = "Steam Cloud",
["Air+Water"] = "Rain",
["Earth+Fire"] = "Glass",
["Earth+Fire+Water"] = "Magma",
["Earth+Water"] = "Mud",
["Fire+Water"] = "Steam",
["Magma+Mud"] = "Volcano",
-- More unique recipes:
["Air+Mud"] = "Clay",
["Earth+Rain"] = "Plant",
["Fire+Mud"] = "Brick",
["Air+Glass"] = "Lens",
["Fire+Glass"] = "Lightbulb",
["Earth+Steam"] = "Geyser",
["Air+Steam"] = "Cloud",
["Fire+Rain"] = "Rainbow",
["Earth+Plant"] = "Tree",
["Tree+Fire"] = "Charcoal",
["Tree+Water"] = "Paper",
["Plant+Mud"] = "Swamp",
["Swamp+Energy"] = "Life",
["Air+Life"] = "Bird",
["Earth+Life"] = "Beast",
["Water+Life"] = "Fish",
["Fire+Life"] = "Phoenix",
["Mud+Plant"] = "Moss",
["Steam+Energy"] = "Engine",
["Lens+Lightbulb"] = "Projector",
["Cloud+Energy"] = "Storm",
["Storm+Earth"] = "Tornado",
["Geyser+Mud"] = "Hot Spring"
}
local function normalizeRecipeKeys(recipes)
local normalized = {}
for key, value in pairs(recipes) do
local names = {}
for name in string.gmatch(key, "([^+]+)") do
table.insert(names, name)
end
table.sort(names)
local sortedKey = table.concat(names, "+")
normalized[sortedKey] = value
end
return normalized
end
return normalizeRecipeKeys(raw)