Skip to content

Commit

Permalink
Fix #3668 (#3671)
Browse files Browse the repository at this point in the history
* Fix

* Use a different approach, keep the option open for the dictionaries to work for vanilla tiles/walls later.

---------

Co-authored-by: JavidPack <javidpack@gmail.com>
  • Loading branch information
Destructor-Ben and JavidPack committed Aug 1, 2023
1 parent 835f07a commit 331c5fa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions patches/tModLoader/Terraria/ModLoader/WallLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,14 @@ public static bool Drop(int i, int j, int type, ref int dropType)
return false;
}
}
if (wallTypeToItemType.TryGetValue(type, out int value)) {
dropType = value;
}
ModWall modWall = GetWall(type);
return modWall?.Drop(i, j, ref dropType) ?? true;
if (modWall != null) {
if (wallTypeToItemType.TryGetValue(type, out int value)) {
dropType = value;
}
return modWall.Drop(i, j, ref dropType);
}
return true;
}
//in Terraria.WorldGen.KillWall after if statements setting fail to true call
// WallLoader.KillWall(i, j, tile.wall, ref fail);
Expand Down

0 comments on commit 331c5fa

Please sign in to comment.