TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ FinishSetup()

static void Terraria.ModLoader.PlantLoader.FinishSetup ( )
inlinestaticpackage

Definition at line 17 of file PlantLoader.cs.

18 {
19 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
20 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
21 //IL_00d6: Unknown result type (might be due to invalid IL or missing references)
22 //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
23 Vector2 id = default(Vector2);
24 foreach (IPlant plant in plantList)
25 {
26 plant.SetStaticDefaults();
27 for (int i = 0; i < plant.GrowsOnTileId.Length; i++)
28 {
29 ((Vector2)(ref id))._002Ector((float)plant.PlantTileId, (float)plant.GrowsOnTileId[i]);
30 if (plantLookup.TryGetValue(id, out var existing))
31 {
32 Logging.tML.Error((object)$"The new plant {plant.GetType()} conflicts with the existing plant {existing.GetType()}. New plant not added");
33 }
34 else
35 {
36 if (!plantIdToStyleLimit.ContainsKey((int)id.X))
37 {
38 plantIdToStyleLimit.Add((int)id.X, plant.VanillaCount);
39 }
40 plantLookup.Add(id, plant);
41 }
42 }
43 }
44 }
static Dictionary< int, int > plantIdToStyleLimit
static List< IPlant > plantList
static Dictionary< Vector2, IPlant > plantLookup

References Terraria.ModLoader.PlantLoader.plantIdToStyleLimit, Terraria.ModLoader.PlantLoader.plantList, Terraria.ModLoader.PlantLoader.plantLookup, and Terraria.ModLoader.Logging.tML.

Referenced by Terraria.ModLoader.ModContent.Load().

+ Here is the caller graph for this function: