public void setNPCType(NPC npc) { npcType = SoulOfNPC.NPCToTag(npc); if (npc.type == NPCID.SkeletonMerchant) { item.SetNameOverride("Soul of the Skeleton Merchant"); Tooltip.SetDefault("The essence of the Skeleton Merchant"); } else { item.SetNameOverride("Soul of the " + Lang.GetNPCNameValue(npc.netID)); Tooltip.SetDefault("The essence of the " + Lang.GetNPCNameValue(npc.netID)); } }
public void setNPCType(NPC npc) { npcType = SoulOfNPC.NPCToTag(npc); hasShop = false; if (npc == null || npc.type == 0) { item.SetNameOverride("Vending Machine (Empty)"); Tooltip.SetDefault("Sells no items."); } else if (npc.type == NPCID.SkeletonMerchant) { item.SetNameOverride("Vending Machine (Skeleton Merchant)"); Tooltip.SetDefault("Sells the items the Skeleton Merchant would sell."); } else { item.SetNameOverride("Vending Machine (" + Lang.GetNPCNameValue(npc.netID) + ")"); Tooltip.SetDefault("Sells the items " + Lang.GetNPCNameValue(npc.netID) + " would sell."); } }