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

◆ Drop()

static bool Terraria.ModLoader.WallLoader.Drop ( int i,
int j,
int type,
ref int dropType )
inlinestatic

Definition at line 215 of file WallLoader.cs.

216 {
218 for (int k = 0; k < hookDrop.Length; k++)
219 {
220 if (!hookDrop[k](i, j, type, ref dropType))
221 {
222 return false;
223 }
224 }
225 ModWall modWall = GetWall(type);
226 if (modWall != null)
227 {
228 if (wallTypeToItemType.TryGetValue(type, out var value))
229 {
230 dropType = value;
231 }
232 return modWall.Drop(i, j, ref dropType);
233 }
234 return true;
235 }
static DelegateDrop[] HookDrop
Definition WallLoader.cs:47
delegate bool DelegateDrop(int i, int j, int type, ref int dropType)
static ModWall GetWall(int type)
Gets the ModWall instance with the given type. If no ModWall with the given type exists,...
Definition WallLoader.cs:83
static readonly Dictionary< int, int > wallTypeToItemType
Maps Wall type to the Item type that places the wall.
Definition WallLoader.cs:37

References Terraria.ModLoader.WallLoader.DelegateDrop(), Terraria.ModLoader.WallLoader.GetWall(), Terraria.ModLoader.WallLoader.HookDrop, and Terraria.ModLoader.WallLoader.wallTypeToItemType.

Referenced by Terraria.WorldGen.KillWall_DropItems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: