Skip to content

Commit

Permalink
Fix for NPC rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryConstruct committed Oct 27, 2022
1 parent c948f91 commit 290476f
Show file tree
Hide file tree
Showing 11 changed files with 7,166 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/SettingsFileUpdater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void Main(string[] args)

var bestiaryNpcs = wrapper.GetBestiaryData().ToList();

using (var stream = new FileStream("bestiaryData.json", FileMode.Create, FileAccess.Write))
using (var stream = new FileStream("..\\..\\..\\..\\bestiaryData.json", FileMode.Create, FileAccess.Write))
{
JsonSerializer.Serialize(stream, bestiaryNpcs, new JsonSerializerOptions { WriteIndented = true});
}
Expand Down
1 change: 1 addition & 0 deletions src/SettingsFileUpdater/TerrariaHost/NpcData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class NpcData
public bool CanTalk { get; set; }
public bool IsCritter { get; set; }
public bool IsKillCredit { get; set; }
public bool IsTownNpc { get; set; }
public int BestiaryDisplayIndex { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/SettingsFileUpdater/TerrariaHost/TerrariaWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ public IEnumerable<NpcData> GetNPCData()
{
Id = npc.netID,
BannerId = killId,
IsTownNpc = npc.townNPC,
FullName = npc.FullName,
Name = Localize(npc.FullName),
BestiaryId = npc.GetBestiaryCreditId(),
Expand Down Expand Up @@ -449,6 +450,7 @@ public IEnumerable<NpcData> GetBestiaryData()
{
Id = npc.netID,
BannerId = killId,
IsTownNpc = npc.townNPC,
BestiaryDisplayIndex = info.BestiaryDisplayIndex,
FullName = npc.FullName,
Name = Localize(npc.FullName),
Expand Down
Loading

0 comments on commit 290476f

Please sign in to comment.