public void AddNPC(string name, ModNPC npc, string texture) { int id = NPCLoader.ReserveNPCID(); npc.npc.name = name; npc.npc.type = id; npcs[name] = npc; NPCLoader.npcs[id] = npc; npc.texture = texture; npc.mod = this; }
public void AddNPC(string name, ModNPC npc, string texture, string[] altTextures = null) { int id = NPCLoader.ReserveNPCID(); npc.npc.name = name; npc.npc.type = id; npcs[name] = npc; NPCLoader.npcs.Add(npc); npc.texture = texture; npc.altTextures = altTextures; npc.mod = this; }