forked from JavidPack/AllTheWalls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewWall.cs
35 lines (31 loc) · 1.17 KB
/
NewWall.cs
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
using Terraria.ID;
namespace AllTheWalls
{
class NewWall
{
public int wallID; // id of wall that drops this item
public string displayName; // name displayed to player
public string itemName; // name for records, don't change between releases
public string textureName; // texture name
public NewWall(ushort wallID, string itemName, string displayName, string textureName) {
this.wallID = wallID;
this.itemName = itemName;
this.displayName = displayName;
this.textureName = textureName;
if (!textureName.StartsWith("Terraria"))
this.textureName = "AllTheWalls/ItemImages/" + textureName;
}
public NewWall(ushort wallID, string itemName, string displayName, int textureItemID) {
this.wallID = wallID;
this.itemName = itemName;
this.displayName = displayName;
this.textureName = $"Terraria/Images/Item_{textureItemID}";
}
public NewWall(ushort wallID, string itemName, int textureItemID) {
this.wallID = wallID;
this.itemName = itemName;
this.displayName = $"{{$ItemName.{ItemID.Search.GetName(textureItemID)}}} {{$Mods.AllTheWalls.UnsafeInParenthesis}}";
this.textureName = $"Terraria/Images/Item_{textureItemID}";
}
}
}