Skip to content

Commit

Permalink
Allow market and cyclopedia IDs to be updated along with object ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Arch-Mina committed Dec 1, 2024
1 parent b698359 commit bd5f777
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Assets Editor/DatEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2321,6 +2321,16 @@ private void ImportObject_PreviewMouseLeftButtonDown(object sender, MouseButtonE
{
appearance.SpriteData.Clear();
appearance.Id = (uint)MainWindow.appearances.Object[^1].Id + 1;

if (appearance.Flags.Market != null && appearance.Flags.Market.HasTradeAsObjectId)
appearance.Flags.Market.TradeAsObjectId = appearance.Id;

if (appearance.Flags.Market != null && appearance.Flags.Market.HasShowAsObjectId)
appearance.Flags.Market.ShowAsObjectId = appearance.Id;

if(appearance.Flags.Cyclopediaitem != null && appearance.Flags.Cyclopediaitem.HasCyclopediaType)
appearance.Flags.Cyclopediaitem.CyclopediaType = appearance.Id;

MainWindow.appearances.Object.Add(appearance.Clone());
ThingsItem.Add(new ShowList() { Id = appearance.Id });
}
Expand Down

0 comments on commit bd5f777

Please sign in to comment.