Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RecipeGroup.cs
Go to the documentation of this file.
1using System;
3
4namespace Terraria;
5
6public class RecipeGroup
7{
9
11
12 public int IconicItemId;
13
14 public int RegisteredId;
15
17
19
20 public static int nextRecipeGroupIndex;
21
28
29 public static int RegisterGroup(string name, RecipeGroup rec)
30 {
31 int num = (rec.RegisteredId = nextRecipeGroupIndex++);
32 recipeGroups.Add(num, rec);
33 recipeGroupIDs.Add(name, num);
34 return num;
35 }
36
38 {
39 int num = 0;
40 foreach (int validItem in ValidItems)
41 {
43 {
44 num += value;
45 }
46 }
47 return num;
48 }
49
50 public int GetGroupFakeItemId()
51 {
52 return RegisteredId + 1000000;
53 }
54}
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
static int nextRecipeGroupIndex
int CountUsableItems(Dictionary< int, int > itemStacksAvailable)
HashSet< int > ValidItems
static Dictionary< int, RecipeGroup > recipeGroups
static Dictionary< string, int > recipeGroupIDs
Func< string > GetText
Definition RecipeGroup.cs:8
static int RegisterGroup(string name, RecipeGroup rec)
RecipeGroup(Func< string > getName, params int[] validItems)