From 5f5f3275273931f2707072815914dc5856c8eba0 Mon Sep 17 00:00:00 2001 From: Cam Sinclair Date: Mon, 28 Oct 2024 02:16:58 +1000 Subject: [PATCH] Refactor --- mods/Base/types.json | 8 +- src/Editor/CharacterAttributesEditor.cs | 2 +- src/Editor/CharacterEditor.cs | 2 +- src/Editor/CharacterMagicEditor.cs | 2 +- src/Editor/CharacterSkillsEditor.cs | 2 +- src/Editor/CombatAttributeEditor.cs | 2 +- src/Editor/InventoryEditor.cs | 2 +- src/Editor/ItemSlotEditor.cs | 2 +- .../Assets/{ => Inv}/AmmunitionType.cs | 2 +- src/Formats/Assets/{ => Inv}/IInventory.cs | 2 +- .../Assets/{ => Inv}/IReadOnlyItemSlot.cs | 2 +- src/Formats/Assets/{ => Inv}/Inventory.cs | 2 +- .../Assets/{ => Inv}/InventoryConverter.cs | 2 +- src/Formats/Assets/{ => Inv}/InventoryId.cs | 2 +- .../Assets/{ => Inv}/InventorySlotId.cs | 2 +- src/Formats/Assets/{ => Inv}/InventoryType.cs | 2 +- src/Formats/Assets/{ => Inv}/ItemData.cs | 3 +- src/Formats/Assets/{ => Inv}/ItemFlags.cs | 2 +- src/Formats/Assets/{ => Inv}/ItemSlot.cs | 2 +- src/Formats/Assets/{ => Inv}/ItemSlotFlags.cs | 2 +- src/Formats/Assets/{ => Inv}/ItemSlotId.cs | 2 +- src/Formats/Assets/{ => Inv}/ItemType.cs | 3 +- .../Assets/{ => Inv}/ReadOnlyItemSlot.cs | 2 +- src/Formats/Assets/{ => Inv}/SpecialItemId.cs | 2 +- src/Formats/Assets/Save/SavedGame.cs | 2 + .../Assets/{ => Sheets}/CharacterAttribute.cs | 2 +- .../{ => Sheets}/CharacterAttributes.cs | 2 +- .../Assets/{ => Sheets}/CharacterSheet.cs | 3 +- .../Assets/{ => Sheets}/CharacterSkills.cs | 2 +- .../Assets/{ => Sheets}/CharacterType.cs | 2 +- .../Assets/{ => Sheets}/CombatAnimationId.cs | 2 +- .../Assets/{ => Sheets}/CombatAttributes.cs | 2 +- .../{ => Sheets}/EffectiveCharacterSheet.cs | 2 +- src/Formats/Assets/{ => Sheets}/Gender.cs | 2 +- .../{ => Sheets}/ICharacterAttribute.cs | 2 +- .../{ => Sheets}/ICharacterAttributes.cs | 2 +- .../Assets/{ => Sheets}/ICharacterSheet.cs | 5 +- .../Assets/{ => Sheets}/ICharacterSkills.cs | 2 +- .../Assets/{ => Sheets}/ICombatAttributes.cs | 2 +- .../{ => Sheets}/IEffectiveCharacterSheet.cs | 2 +- .../Assets/{ => Sheets}/MagicSkills.cs | 2 +- .../Assets/{ => Sheets}/MonsterData.cs | 92 +++++++------------ .../Assets/{ => Sheets}/PartyMemberInfo.cs | 3 +- .../Assets/{ => Sheets}/PhysicalAttribute.cs | 2 +- .../Assets/{ => Sheets}/PlayerClass.cs | 2 +- .../Assets/{ => Sheets}/PlayerCondition.cs | 2 +- .../Assets/{ => Sheets}/PlayerConditions.cs | 2 +- .../Assets/{ => Sheets}/PlayerLanguages.cs | 2 +- src/Formats/Assets/{ => Sheets}/PlayerRace.cs | 2 +- src/Formats/Assets/{ => Sheets}/Skill.cs | 2 +- src/Formats/Containers/ItemListContainer.cs | 2 +- src/Formats/FormatJsonUtil.cs | 2 +- src/Formats/IAssetManager.cs | 2 + src/Formats/MapEvents/ChangeAttributeEvent.cs | 2 +- src/Formats/MapEvents/ChangeLanguageEvent.cs | 2 +- src/Formats/MapEvents/ChangeSkillEvent.cs | 2 +- src/Formats/MapEvents/ChangeStatusEvent.cs | 2 +- src/Formats/Parsers/CharacterSheetLoader.cs | 2 +- src/Formats/Parsers/ChestLoader.cs | 2 +- src/Formats/Parsers/ItemDataLoader.cs | 2 +- src/Formats/Parsers/MerchantLoader.cs | 2 +- src/Formats/StubAssetManager.cs | 2 + src/Game.Veldrid/Diag/AssetViewerWindow.cs | 19 ++-- src/Game/Assets/AssetManager.cs | 2 + src/Game/Assets/RawAssetManager.cs | 2 + src/Game/Combat/CombatDialog.cs | 2 +- src/Game/Combat/IReadOnlyMob.cs | 2 +- src/Game/Combat/LogicalCombatTile.cs | 3 +- src/Game/Combat/Mob.cs | 2 +- src/Game/Combat/Monster.cs | 2 +- src/Game/Combat/MonsterFactory.cs | 2 +- src/Game/Describe.cs | 3 +- src/Game/Events/AttributeChangedEvent.cs | 2 +- .../Events/Inventory/ActivateItemEvent.cs | 2 +- .../Inventory/ActivateItemSpellEvent.cs | 2 +- src/Game/Events/Inventory/DrinkItemEvent.cs | 2 +- src/Game/Events/Inventory/IInventoryEvent.cs | 2 +- .../Events/Inventory/InventoryChangedEvent.cs | 2 +- .../Events/Inventory/InventoryDiscardEvent.cs | 2 +- .../Events/Inventory/InventoryPickupEvent.cs | 2 +- .../Events/Inventory/InventorySellEvent.cs | 2 +- .../Events/Inventory/InventorySlotEvent.cs | 2 +- .../Events/Inventory/InventorySwapEvent.cs | 2 +- src/Game/Events/Inventory/ReadItemEvent.cs | 2 +- .../Events/Inventory/ReadSpellScrollEvent.cs | 2 +- .../SetInventorySlotUiPositionEvent.cs | 2 +- src/Game/Events/SkillChangedEvent.cs | 2 +- src/Game/Gui/Controls/VerticalStacker.cs | 5 +- src/Game/Gui/Dialogs/Conversation.cs | 1 + .../Dialogs/ConversationParticipantLabel.cs | 2 +- src/Game/Gui/Inventory/InventoryChestPane.cs | 2 +- .../Gui/Inventory/InventoryDetailsDialog.cs | 2 + src/Game/Gui/Inventory/InventoryLockPane.cs | 2 +- .../Gui/Inventory/InventoryMerchantPane.cs | 2 +- src/Game/Gui/Inventory/InventoryMidPane.cs | 2 +- src/Game/Gui/Inventory/InventoryRightPane.cs | 2 +- src/Game/Gui/Inventory/InventoryStatsPage.cs | 2 +- .../Inventory/LogicalCombatPositionSlot.cs | 2 +- .../Gui/Inventory/LogicalInventorySlot.cs | 2 +- .../Gui/Inventory/VisualCombatPositionSlot.cs | 2 +- src/Game/Gui/Inventory/VisualInventorySlot.cs | 2 +- src/Game/Querier.cs | 1 + src/Game/State/GameState.cs | 3 +- src/Game/State/ICombatParticipant.cs | 2 +- src/Game/State/IGameState.cs | 3 +- src/Game/State/IPlayer.cs | 2 +- src/Game/State/Party.cs | 3 +- src/Game/State/PartyInventory.cs | 2 +- .../State/Player/EffectiveSheetCalculator.cs | 6 +- src/Game/State/Player/IInventoryManager.cs | 2 +- .../State/Player/InterpolatedAttribute.cs | 2 +- .../State/Player/InterpolatedAttributes.cs | 2 +- .../Player/InterpolatedCharacterSheet.cs | 3 +- src/Game/State/Player/InterpolatedCombat.cs | 2 +- .../State/Player/InterpolatedInventory.cs | 2 +- src/Game/State/Player/InterpolatedItemSlot.cs | 2 +- .../State/Player/InterpolatedMagicSkills.cs | 1 + src/Game/State/Player/InterpolatedSkills.cs | 2 +- src/Game/State/Player/InventoryManager.cs | 2 + src/Game/State/Player/PartyMember.cs | 3 +- src/Game/State/SheetApplier.cs | 3 +- src/Game/Text/TextFormatter.cs | 2 + .../AssetConversionTests.cs | 2 + .../UAlbion.Base.Tests/AssetLoadTests.cs | 2 + .../UAlbion.Base.Tests/EventRoundTripTests.cs | 2 +- .../UAlbion.Base.Tests/RoundtripTests.cs | 2 + src/Tests/UAlbion.Formats.Tests/JsonTests.cs | 3 +- .../UAlbion.Game.Tests/InventoryTests.cs | 2 +- src/Tests/UAlbion.Game.Tests/ItemSlotTests.cs | 2 +- src/Tools/BuildTestingMaps/FlagTestMap.cs | 1 + src/UAlbion/DumpText.cs | 2 + 131 files changed, 209 insertions(+), 185 deletions(-) rename src/Formats/Assets/{ => Inv}/AmmunitionType.cs (82%) rename src/Formats/Assets/{ => Inv}/IInventory.cs (95%) rename src/Formats/Assets/{ => Inv}/IReadOnlyItemSlot.cs (87%) rename src/Formats/Assets/{ => Inv}/Inventory.cs (99%) rename src/Formats/Assets/{ => Inv}/InventoryConverter.cs (99%) rename src/Formats/Assets/{ => Inv}/InventoryId.cs (98%) rename src/Formats/Assets/{ => Inv}/InventorySlotId.cs (96%) rename src/Formats/Assets/{ => Inv}/InventoryType.cs (86%) rename src/Formats/Assets/{ => Inv}/ItemData.cs (99%) rename src/Formats/Assets/{ => Inv}/ItemFlags.cs (94%) rename src/Formats/Assets/{ => Inv}/ItemSlot.cs (99%) rename src/Formats/Assets/{ => Inv}/ItemSlotFlags.cs (84%) rename src/Formats/Assets/{ => Inv}/ItemSlotId.cs (99%) rename src/Formats/Assets/{ => Inv}/ItemType.cs (95%) rename src/Formats/Assets/{ => Inv}/ReadOnlyItemSlot.cs (92%) rename src/Formats/Assets/{ => Inv}/SpecialItemId.cs (68%) rename src/Formats/Assets/{ => Sheets}/CharacterAttribute.cs (97%) rename src/Formats/Assets/{ => Sheets}/CharacterAttributes.cs (98%) rename src/Formats/Assets/{ => Sheets}/CharacterSheet.cs (99%) rename src/Formats/Assets/{ => Sheets}/CharacterSkills.cs (97%) rename src/Formats/Assets/{ => Sheets}/CharacterType.cs (64%) rename src/Formats/Assets/{ => Sheets}/CombatAnimationId.cs (85%) rename src/Formats/Assets/{ => Sheets}/CombatAttributes.cs (97%) rename src/Formats/Assets/{ => Sheets}/EffectiveCharacterSheet.cs (89%) rename src/Formats/Assets/{ => Sheets}/Gender.cs (82%) rename src/Formats/Assets/{ => Sheets}/ICharacterAttribute.cs (80%) rename src/Formats/Assets/{ => Sheets}/ICharacterAttributes.cs (89%) rename src/Formats/Assets/{ => Sheets}/ICharacterSheet.cs (89%) rename src/Formats/Assets/{ => Sheets}/ICharacterSkills.cs (83%) rename src/Formats/Assets/{ => Sheets}/ICombatAttributes.cs (88%) rename src/Formats/Assets/{ => Sheets}/IEffectiveCharacterSheet.cs (80%) rename src/Formats/Assets/{ => Sheets}/MagicSkills.cs (98%) rename src/Formats/Assets/{ => Sheets}/MonsterData.cs (74%) rename src/Formats/Assets/{ => Sheets}/PartyMemberInfo.cs (71%) rename src/Formats/Assets/{ => Sheets}/PhysicalAttribute.cs (84%) rename src/Formats/Assets/{ => Sheets}/PlayerClass.cs (97%) rename src/Formats/Assets/{ => Sheets}/PlayerCondition.cs (96%) rename src/Formats/Assets/{ => Sheets}/PlayerConditions.cs (94%) rename src/Formats/Assets/{ => Sheets}/PlayerLanguages.cs (93%) rename src/Formats/Assets/{ => Sheets}/PlayerRace.cs (84%) rename src/Formats/Assets/{ => Sheets}/Skill.cs (70%) diff --git a/mods/Base/types.json b/mods/Base/types.json index 3a1c91d28..06c6f508e 100644 --- a/mods/Base/types.json +++ b/mods/Base/types.json @@ -79,13 +79,13 @@ "itemnameMeta": "UAlbion.Formats.Parsers.ItemNameMetaLoader, UAlbion.Formats", "json": "UAlbion.Formats.Parsers.JsonStringLoader, UAlbion.Formats", "jsonEventSet": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.EventSet, UAlbion.Formats]], UAlbion.Formats", - "jsonInv": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Inventory, UAlbion.Formats]], UAlbion.Formats", - "jsonItems": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.ItemData, UAlbion.Formats]], UAlbion.Formats", + "jsonInv": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Inv.Inventory, UAlbion.Formats]], UAlbion.Formats", + "jsonItems": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Inv.ItemData, UAlbion.Formats]], UAlbion.Formats", "jsonLab": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Labyrinth.LabyrinthData, UAlbion.Formats]], UAlbion.Formats", "jsonMonsterGroup": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.MonsterGroup, UAlbion.Formats]], UAlbion.Formats", "jsonPal": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.AlbionPalette, UAlbion.Formats]], UAlbion.Formats", - "jsonParty": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.PartyMemberInfo, UAlbion.Formats]], UAlbion.Formats", - "jsonSheet": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.CharacterSheet, UAlbion.Formats]], UAlbion.Formats", + "jsonParty": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Sheets.PartyMemberInfo, UAlbion.Formats]], UAlbion.Formats", + "jsonSheet": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Sheets.CharacterSheet, UAlbion.Formats]], UAlbion.Formats", "jsonSpell": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.SpellData, UAlbion.Formats]], UAlbion.Formats", "jsonText": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.ListStringSet, UAlbion.Formats]], UAlbion.Formats", "jsonTileset": "UAlbion.Formats.Parsers.JsonLoader`1[[UAlbion.Formats.Assets.Maps.TilesetData, UAlbion.Formats]], UAlbion.Formats", diff --git a/src/Editor/CharacterAttributesEditor.cs b/src/Editor/CharacterAttributesEditor.cs index 2de38f628..f3f665762 100644 --- a/src/Editor/CharacterAttributesEditor.cs +++ b/src/Editor/CharacterAttributesEditor.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Editor; diff --git a/src/Editor/CharacterEditor.cs b/src/Editor/CharacterEditor.cs index 68a8e927a..46cc100ce 100644 --- a/src/Editor/CharacterEditor.cs +++ b/src/Editor/CharacterEditor.cs @@ -1,6 +1,6 @@ using System; using ImGuiNET; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Editor; diff --git a/src/Editor/CharacterMagicEditor.cs b/src/Editor/CharacterMagicEditor.cs index 9820e985c..62c9515d8 100644 --- a/src/Editor/CharacterMagicEditor.cs +++ b/src/Editor/CharacterMagicEditor.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Editor; diff --git a/src/Editor/CharacterSkillsEditor.cs b/src/Editor/CharacterSkillsEditor.cs index 0b78d87f1..ad709cf81 100644 --- a/src/Editor/CharacterSkillsEditor.cs +++ b/src/Editor/CharacterSkillsEditor.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Editor; diff --git a/src/Editor/CombatAttributeEditor.cs b/src/Editor/CombatAttributeEditor.cs index 13fc7cf82..c3cc1556c 100644 --- a/src/Editor/CombatAttributeEditor.cs +++ b/src/Editor/CombatAttributeEditor.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Editor; diff --git a/src/Editor/InventoryEditor.cs b/src/Editor/InventoryEditor.cs index a0df6d79d..83b8b97fc 100644 --- a/src/Editor/InventoryEditor.cs +++ b/src/Editor/InventoryEditor.cs @@ -1,5 +1,5 @@ using System.Linq; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Editor; diff --git a/src/Editor/ItemSlotEditor.cs b/src/Editor/ItemSlotEditor.cs index d44f093c7..a13f0911b 100644 --- a/src/Editor/ItemSlotEditor.cs +++ b/src/Editor/ItemSlotEditor.cs @@ -4,7 +4,7 @@ using ImGuiNET; using UAlbion.Config; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; namespace UAlbion.Editor; diff --git a/src/Formats/Assets/AmmunitionType.cs b/src/Formats/Assets/Inv/AmmunitionType.cs similarity index 82% rename from src/Formats/Assets/AmmunitionType.cs rename to src/Formats/Assets/Inv/AmmunitionType.cs index 987f4f999..47e062f41 100644 --- a/src/Formats/Assets/AmmunitionType.cs +++ b/src/Formats/Assets/Inv/AmmunitionType.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public enum AmmunitionType : byte { diff --git a/src/Formats/Assets/IInventory.cs b/src/Formats/Assets/Inv/IInventory.cs similarity index 95% rename from src/Formats/Assets/IInventory.cs rename to src/Formats/Assets/Inv/IInventory.cs index bf936002d..b3354d21d 100644 --- a/src/Formats/Assets/IInventory.cs +++ b/src/Formats/Assets/Inv/IInventory.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public interface IInventory { diff --git a/src/Formats/Assets/IReadOnlyItemSlot.cs b/src/Formats/Assets/Inv/IReadOnlyItemSlot.cs similarity index 87% rename from src/Formats/Assets/IReadOnlyItemSlot.cs rename to src/Formats/Assets/Inv/IReadOnlyItemSlot.cs index 7a5785367..0aea082c3 100644 --- a/src/Formats/Assets/IReadOnlyItemSlot.cs +++ b/src/Formats/Assets/Inv/IReadOnlyItemSlot.cs @@ -1,7 +1,7 @@ using System.Numerics; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public interface IReadOnlyItemSlot { diff --git a/src/Formats/Assets/Inventory.cs b/src/Formats/Assets/Inv/Inventory.cs similarity index 99% rename from src/Formats/Assets/Inventory.cs rename to src/Formats/Assets/Inv/Inventory.cs index b93dee304..c2e16dac8 100644 --- a/src/Formats/Assets/Inventory.cs +++ b/src/Formats/Assets/Inv/Inventory.cs @@ -8,7 +8,7 @@ using UAlbion.Api.Eventing; using UAlbion.Config; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public class Inventory : IInventory { diff --git a/src/Formats/Assets/InventoryConverter.cs b/src/Formats/Assets/Inv/InventoryConverter.cs similarity index 99% rename from src/Formats/Assets/InventoryConverter.cs rename to src/Formats/Assets/Inv/InventoryConverter.cs index 66fef4018..efd2c9cf3 100644 --- a/src/Formats/Assets/InventoryConverter.cs +++ b/src/Formats/Assets/Inv/InventoryConverter.cs @@ -5,7 +5,7 @@ using UAlbion.Api; using UAlbion.Config; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public class InventoryConverter : JsonConverter { diff --git a/src/Formats/Assets/InventoryId.cs b/src/Formats/Assets/Inv/InventoryId.cs similarity index 98% rename from src/Formats/Assets/InventoryId.cs rename to src/Formats/Assets/Inv/InventoryId.cs index b45ddeef1..de6e43925 100644 --- a/src/Formats/Assets/InventoryId.cs +++ b/src/Formats/Assets/Inv/InventoryId.cs @@ -2,7 +2,7 @@ using UAlbion.Config; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public struct InventoryId : IEquatable { diff --git a/src/Formats/Assets/InventorySlotId.cs b/src/Formats/Assets/Inv/InventorySlotId.cs similarity index 96% rename from src/Formats/Assets/InventorySlotId.cs rename to src/Formats/Assets/Inv/InventorySlotId.cs index 765b6c53b..5130a390f 100644 --- a/src/Formats/Assets/InventorySlotId.cs +++ b/src/Formats/Assets/Inv/InventorySlotId.cs @@ -1,7 +1,7 @@ using System; using UAlbion.Config; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public struct InventorySlotId : IEquatable { diff --git a/src/Formats/Assets/InventoryType.cs b/src/Formats/Assets/Inv/InventoryType.cs similarity index 86% rename from src/Formats/Assets/InventoryType.cs rename to src/Formats/Assets/Inv/InventoryType.cs index 80b2c671c..ccc422fb6 100644 --- a/src/Formats/Assets/InventoryType.cs +++ b/src/Formats/Assets/Inv/InventoryType.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public enum InventoryType : byte { diff --git a/src/Formats/Assets/ItemData.cs b/src/Formats/Assets/Inv/ItemData.cs similarity index 99% rename from src/Formats/Assets/ItemData.cs rename to src/Formats/Assets/Inv/ItemData.cs index 3bb76a11f..e5dbf8e60 100644 --- a/src/Formats/Assets/ItemData.cs +++ b/src/Formats/Assets/Inv/ItemData.cs @@ -4,9 +4,10 @@ using System.Text.Json.Serialization; using SerdesNet; using UAlbion.Config; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public sealed class ItemData { diff --git a/src/Formats/Assets/ItemFlags.cs b/src/Formats/Assets/Inv/ItemFlags.cs similarity index 94% rename from src/Formats/Assets/ItemFlags.cs rename to src/Formats/Assets/Inv/ItemFlags.cs index a51c5e5df..b72f3bf06 100644 --- a/src/Formats/Assets/ItemFlags.cs +++ b/src/Formats/Assets/Inv/ItemFlags.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; [Flags] public enum ItemFlags : ushort diff --git a/src/Formats/Assets/ItemSlot.cs b/src/Formats/Assets/Inv/ItemSlot.cs similarity index 99% rename from src/Formats/Assets/ItemSlot.cs rename to src/Formats/Assets/Inv/ItemSlot.cs index e8d4be4c6..fd25b8476 100644 --- a/src/Formats/Assets/ItemSlot.cs +++ b/src/Formats/Assets/Inv/ItemSlot.cs @@ -8,7 +8,7 @@ using UAlbion.Config; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public class ItemSlot : IReadOnlyItemSlot { diff --git a/src/Formats/Assets/ItemSlotFlags.cs b/src/Formats/Assets/Inv/ItemSlotFlags.cs similarity index 84% rename from src/Formats/Assets/ItemSlotFlags.cs rename to src/Formats/Assets/Inv/ItemSlotFlags.cs index 7384133d3..17d4d2a6e 100644 --- a/src/Formats/Assets/ItemSlotFlags.cs +++ b/src/Formats/Assets/Inv/ItemSlotFlags.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; [Flags] public enum ItemSlotFlags : byte diff --git a/src/Formats/Assets/ItemSlotId.cs b/src/Formats/Assets/Inv/ItemSlotId.cs similarity index 99% rename from src/Formats/Assets/ItemSlotId.cs rename to src/Formats/Assets/Inv/ItemSlotId.cs index 7dae8efdd..70eb3403c 100644 --- a/src/Formats/Assets/ItemSlotId.cs +++ b/src/Formats/Assets/Inv/ItemSlotId.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; #pragma warning disable CA1069 // Enums values should not be duplicated public enum ItemSlotId : byte // Enum values that are more convenient for in-memory use (item slot array accessing etc) diff --git a/src/Formats/Assets/ItemType.cs b/src/Formats/Assets/Inv/ItemType.cs similarity index 95% rename from src/Formats/Assets/ItemType.cs rename to src/Formats/Assets/Inv/ItemType.cs index d9835411c..9bed48ee7 100644 --- a/src/Formats/Assets/ItemType.cs +++ b/src/Formats/Assets/Inv/ItemType.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace UAlbion.Formats.Assets; + +namespace UAlbion.Formats.Assets.Inv; [SuppressMessage("", "CA1027")] // Nonsensical "use flags" warnings when underlying type is byte. public enum ItemType : byte diff --git a/src/Formats/Assets/ReadOnlyItemSlot.cs b/src/Formats/Assets/Inv/ReadOnlyItemSlot.cs similarity index 92% rename from src/Formats/Assets/ReadOnlyItemSlot.cs rename to src/Formats/Assets/Inv/ReadOnlyItemSlot.cs index 3769f51f7..bb551c522 100644 --- a/src/Formats/Assets/ReadOnlyItemSlot.cs +++ b/src/Formats/Assets/Inv/ReadOnlyItemSlot.cs @@ -1,7 +1,7 @@ using System.Numerics; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public class ReadOnlyItemSlot : IReadOnlyItemSlot { diff --git a/src/Formats/Assets/SpecialItemId.cs b/src/Formats/Assets/Inv/SpecialItemId.cs similarity index 68% rename from src/Formats/Assets/SpecialItemId.cs rename to src/Formats/Assets/Inv/SpecialItemId.cs index 5ce4600cf..eeb07f98a 100644 --- a/src/Formats/Assets/SpecialItemId.cs +++ b/src/Formats/Assets/Inv/SpecialItemId.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Inv; public enum SpecialItemId : byte { diff --git a/src/Formats/Assets/Save/SavedGame.cs b/src/Formats/Assets/Save/SavedGame.cs index 5c7a62c97..f3cfd87e7 100644 --- a/src/Formats/Assets/Save/SavedGame.cs +++ b/src/Formats/Assets/Save/SavedGame.cs @@ -5,7 +5,9 @@ using SerdesNet; using UAlbion.Api; using UAlbion.Config; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Containers; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; diff --git a/src/Formats/Assets/CharacterAttribute.cs b/src/Formats/Assets/Sheets/CharacterAttribute.cs similarity index 97% rename from src/Formats/Assets/CharacterAttribute.cs rename to src/Formats/Assets/Sheets/CharacterAttribute.cs index 2e549ed06..c52d5ed3e 100644 --- a/src/Formats/Assets/CharacterAttribute.cs +++ b/src/Formats/Assets/Sheets/CharacterAttribute.cs @@ -2,7 +2,7 @@ using SerdesNet; using UAlbion.Formats.MapEvents; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; #pragma warning disable CA1711 public class CharacterAttribute : ICharacterAttribute diff --git a/src/Formats/Assets/CharacterAttributes.cs b/src/Formats/Assets/Sheets/CharacterAttributes.cs similarity index 98% rename from src/Formats/Assets/CharacterAttributes.cs rename to src/Formats/Assets/Sheets/CharacterAttributes.cs index 017130772..e47107dd1 100644 --- a/src/Formats/Assets/CharacterAttributes.cs +++ b/src/Formats/Assets/Sheets/CharacterAttributes.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UAlbion.Api.Eventing; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class CharacterAttributes : ICharacterAttributes { diff --git a/src/Formats/Assets/CharacterSheet.cs b/src/Formats/Assets/Sheets/CharacterSheet.cs similarity index 99% rename from src/Formats/Assets/CharacterSheet.cs rename to src/Formats/Assets/Sheets/CharacterSheet.cs index 7a3c4fc1c..be99d7e31 100644 --- a/src/Formats/Assets/CharacterSheet.cs +++ b/src/Formats/Assets/Sheets/CharacterSheet.cs @@ -6,9 +6,10 @@ using UAlbion.Api; using UAlbion.Api.Eventing; using UAlbion.Config; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class CharacterSheet : ICharacterSheet { diff --git a/src/Formats/Assets/CharacterSkills.cs b/src/Formats/Assets/Sheets/CharacterSkills.cs similarity index 97% rename from src/Formats/Assets/CharacterSkills.cs rename to src/Formats/Assets/Sheets/CharacterSkills.cs index 260c7a614..7cdfa0ea3 100644 --- a/src/Formats/Assets/CharacterSkills.cs +++ b/src/Formats/Assets/Sheets/CharacterSkills.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UAlbion.Api.Eventing; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class CharacterSkills : ICharacterSkills { diff --git a/src/Formats/Assets/CharacterType.cs b/src/Formats/Assets/Sheets/CharacterType.cs similarity index 64% rename from src/Formats/Assets/CharacterType.cs rename to src/Formats/Assets/Sheets/CharacterType.cs index 5bade96c2..d0cedcf12 100644 --- a/src/Formats/Assets/CharacterType.cs +++ b/src/Formats/Assets/Sheets/CharacterType.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum CharacterType : byte { diff --git a/src/Formats/Assets/CombatAnimationId.cs b/src/Formats/Assets/Sheets/CombatAnimationId.cs similarity index 85% rename from src/Formats/Assets/CombatAnimationId.cs rename to src/Formats/Assets/Sheets/CombatAnimationId.cs index 733f0b007..d6b012ee0 100644 --- a/src/Formats/Assets/CombatAnimationId.cs +++ b/src/Formats/Assets/Sheets/CombatAnimationId.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum CombatAnimationId // From Ambermoon, still need to check/confirm against Albion { diff --git a/src/Formats/Assets/CombatAttributes.cs b/src/Formats/Assets/Sheets/CombatAttributes.cs similarity index 97% rename from src/Formats/Assets/CombatAttributes.cs rename to src/Formats/Assets/Sheets/CombatAttributes.cs index 3d642e844..d6af54cd1 100644 --- a/src/Formats/Assets/CombatAttributes.cs +++ b/src/Formats/Assets/Sheets/CombatAttributes.cs @@ -1,7 +1,7 @@ using System; using UAlbion.Api.Eventing; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class CombatAttributes : ICombatAttributes { diff --git a/src/Formats/Assets/EffectiveCharacterSheet.cs b/src/Formats/Assets/Sheets/EffectiveCharacterSheet.cs similarity index 89% rename from src/Formats/Assets/EffectiveCharacterSheet.cs rename to src/Formats/Assets/Sheets/EffectiveCharacterSheet.cs index 581452a30..9f4a888d1 100644 --- a/src/Formats/Assets/EffectiveCharacterSheet.cs +++ b/src/Formats/Assets/Sheets/EffectiveCharacterSheet.cs @@ -1,6 +1,6 @@ using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class EffectiveCharacterSheet : CharacterSheet, IEffectiveCharacterSheet { diff --git a/src/Formats/Assets/Gender.cs b/src/Formats/Assets/Sheets/Gender.cs similarity index 82% rename from src/Formats/Assets/Gender.cs rename to src/Formats/Assets/Sheets/Gender.cs index b7ff1011f..e83d47534 100644 --- a/src/Formats/Assets/Gender.cs +++ b/src/Formats/Assets/Sheets/Gender.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum Gender : byte { diff --git a/src/Formats/Assets/ICharacterAttribute.cs b/src/Formats/Assets/Sheets/ICharacterAttribute.cs similarity index 80% rename from src/Formats/Assets/ICharacterAttribute.cs rename to src/Formats/Assets/Sheets/ICharacterAttribute.cs index e22cff7c8..a7ec8af70 100644 --- a/src/Formats/Assets/ICharacterAttribute.cs +++ b/src/Formats/Assets/Sheets/ICharacterAttribute.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; #pragma warning disable CA1711 public interface ICharacterAttribute diff --git a/src/Formats/Assets/ICharacterAttributes.cs b/src/Formats/Assets/Sheets/ICharacterAttributes.cs similarity index 89% rename from src/Formats/Assets/ICharacterAttributes.cs rename to src/Formats/Assets/Sheets/ICharacterAttributes.cs index 6a945a2ab..26988953d 100644 --- a/src/Formats/Assets/ICharacterAttributes.cs +++ b/src/Formats/Assets/Sheets/ICharacterAttributes.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public interface ICharacterAttributes { diff --git a/src/Formats/Assets/ICharacterSheet.cs b/src/Formats/Assets/Sheets/ICharacterSheet.cs similarity index 89% rename from src/Formats/Assets/ICharacterSheet.cs rename to src/Formats/Assets/Sheets/ICharacterSheet.cs index 3e7088138..372b27b1b 100644 --- a/src/Formats/Assets/ICharacterSheet.cs +++ b/src/Formats/Assets/Sheets/ICharacterSheet.cs @@ -1,6 +1,7 @@ -using UAlbion.Formats.Ids; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public interface ICharacterSheet { diff --git a/src/Formats/Assets/ICharacterSkills.cs b/src/Formats/Assets/Sheets/ICharacterSkills.cs similarity index 83% rename from src/Formats/Assets/ICharacterSkills.cs rename to src/Formats/Assets/Sheets/ICharacterSkills.cs index 2bb562eba..01cfd42f7 100644 --- a/src/Formats/Assets/ICharacterSkills.cs +++ b/src/Formats/Assets/Sheets/ICharacterSkills.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public interface ICharacterSkills { diff --git a/src/Formats/Assets/ICombatAttributes.cs b/src/Formats/Assets/Sheets/ICombatAttributes.cs similarity index 88% rename from src/Formats/Assets/ICombatAttributes.cs rename to src/Formats/Assets/Sheets/ICombatAttributes.cs index ff3bc73d8..7e3f18607 100644 --- a/src/Formats/Assets/ICombatAttributes.cs +++ b/src/Formats/Assets/Sheets/ICombatAttributes.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public interface ICombatAttributes { diff --git a/src/Formats/Assets/IEffectiveCharacterSheet.cs b/src/Formats/Assets/Sheets/IEffectiveCharacterSheet.cs similarity index 80% rename from src/Formats/Assets/IEffectiveCharacterSheet.cs rename to src/Formats/Assets/Sheets/IEffectiveCharacterSheet.cs index de6305390..94f466013 100644 --- a/src/Formats/Assets/IEffectiveCharacterSheet.cs +++ b/src/Formats/Assets/Sheets/IEffectiveCharacterSheet.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public interface IEffectiveCharacterSheet : ICharacterSheet { diff --git a/src/Formats/Assets/MagicSkills.cs b/src/Formats/Assets/Sheets/MagicSkills.cs similarity index 98% rename from src/Formats/Assets/MagicSkills.cs rename to src/Formats/Assets/Sheets/MagicSkills.cs index 7804079cc..5b4136f25 100644 --- a/src/Formats/Assets/MagicSkills.cs +++ b/src/Formats/Assets/Sheets/MagicSkills.cs @@ -5,7 +5,7 @@ using UAlbion.Api.Eventing; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class MagicSkills : IMagicSkills { diff --git a/src/Formats/Assets/MonsterData.cs b/src/Formats/Assets/Sheets/MonsterData.cs similarity index 74% rename from src/Formats/Assets/MonsterData.cs rename to src/Formats/Assets/Sheets/MonsterData.cs index afc88225e..4bb00ff38 100644 --- a/src/Formats/Assets/MonsterData.cs +++ b/src/Formats/Assets/Sheets/MonsterData.cs @@ -5,30 +5,17 @@ using UAlbion.Config; using UAlbion.Formats.Ids; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public class MonsterData { const int AnimationCount = 8; - // Guesses based on Ambermoon - // public CombatAnimation[] Animations { get; set; } = new CombatAnimation[8]; // 0 - // public byte[] AnimationFrames { get; set; } = new byte[8]; // 100 - // public byte[] Unk108 { get; set; } = new byte[16]; // 108 - // public byte[] PaletteMapping { get; set; } = new byte[32]; // 118 - // public ushort Unk138 { get; set; } - // public ushort Width { get; set; } - // public ushort Height { get; set; } - // public ushort DisplayWidth { get; set; } - // public ushort DisplayHeight { get; set; } - - public ushort Unk0 { get; set; } public SpriteId CombatGfx { get; set; } - public byte Unk37 { get; set; } + public byte Unk37 { get; set; } // Bitfield? Unique values 0 [42x], 2 [9x: Krondir, Plague, Robot], 6 [3x: AI bodies], 0x10 [3x: Kizz], 0x12 [2x: Skrinn]. public short Unk152 { get; set; } // Some sort of offset? Sometimes negative. public short WidthPercentage { get; set; } public short HeightPercentage { get; set; } - public Dictionary Animations { get; set; } = new(); // Needs a setter for JSON initialisation // Hardcoded offset of 12. This is pretty nasty, but it's how it was done in the original. @@ -36,40 +23,16 @@ public class MonsterData [JsonIgnore] // Exclude from JSON as it has a computed value. public SpriteId TacticalGfx => new(AssetType.TacticalGfx, CombatGfx.Id + 12); - static void SerdesAnimation(string name, CombatAnimationId id, Dictionary animations, ISerializer s) - { - if (s.IsReading()) - { - var temp = s.Bytes(name, null, 0x20); - var frames = new int[0x20]; - - for (int i = 0; i < temp.Length; i++) - frames[i] = temp[i]; - - animations[id] = frames; - } - - if (s.IsWriting()) - { - var existingFrames = new byte[0x20]; - if (animations.TryGetValue(id, out var value)) - for (int i = 0; i < value.Length; i++) - existingFrames[i] = (byte)value[i]; - - s.Bytes(name, existingFrames, 0x20); - } - } - public static MonsterData Serdes(MonsterData m, AssetMapping mapping, ISerializer s) { m ??= new MonsterData(); var initial = s.Offset; - m.Unk0 = s.UInt16(nameof(Unk0), m.Unk0); - s.Pad(0x34); // 2 - m.CombatGfx = SpriteId.SerdesU8(nameof(CombatGfx), m.CombatGfx, AssetType.MonsterGfx, mapping, s); // 0 - m.Unk37 = s.UInt8(nameof(Unk37), m.Unk37); + s.Pad(0x36); + m.CombatGfx = SpriteId.SerdesU8(nameof(CombatGfx), m.CombatGfx, AssetType.MonsterGfx, mapping, s); // 36 + m.Unk37 = s.UInt8(nameof(Unk37), m.Unk37); // 37 s.Pad(2); // 38 + // 0x20 bytes per anim SerdesAnimation("Move", CombatAnimationId.Move, m.Animations, s); // 3A SerdesAnimation("Melee", CombatAnimationId.Melee, m.Animations, s); // 5A SerdesAnimation("Ranged", CombatAnimationId.Ranged, m.Animations, s); // 7A @@ -108,23 +71,6 @@ public static MonsterData Serdes(MonsterData m, AssetMapping mapping, ISerialize m.WidthPercentage = s.Int16(nameof(WidthPercentage), m.WidthPercentage); m.HeightPercentage = s.Int16(nameof(HeightPercentage), m.HeightPercentage); - // 0x148 total length - - /* - Based on Ambermoon: - 0x100 bytes for animation data - 0x8 for active frame bitfields - 0x30 Atari & Amiga palette info (probably not used?) - 0x1 bitfield for animation bounciness - 0x1 'even' ?? - 0x2 Monster Width - 0x2 Monster Height - 0x2 Monster ZoomX - 0x2 Monster ZoomY - - Total: 142 - */ - var totalLength = s.Offset - initial; if (totalLength != 0x148) throw new FormatException($"Expected to process 0x148 bytes, but actually got {totalLength}"); @@ -132,7 +78,31 @@ 0x2 Monster ZoomY return m; } - public MonsterData DeepCopy() => new MonsterData().CopyFrom(this); + static void SerdesAnimation(string name, CombatAnimationId id, Dictionary animations, ISerializer s) + { + if (s.IsReading()) + { + var temp = s.Bytes(name, null, 0x20); + var frames = new int[0x20]; + + for (int i = 0; i < temp.Length; i++) + frames[i] = temp[i]; + + animations[id] = frames; + } + + if (s.IsWriting()) + { + var existingFrames = new byte[0x20]; + if (animations.TryGetValue(id, out var value)) + for (int i = 0; i < value.Length; i++) + existingFrames[i] = (byte)value[i]; + + s.Bytes(name, existingFrames, 0x20); + } + } + + public MonsterData DeepClone() => new MonsterData().CopyFrom(this); public MonsterData CopyFrom(MonsterData other) { ArgumentNullException.ThrowIfNull(other); diff --git a/src/Formats/Assets/PartyMemberInfo.cs b/src/Formats/Assets/Sheets/PartyMemberInfo.cs similarity index 71% rename from src/Formats/Assets/PartyMemberInfo.cs rename to src/Formats/Assets/Sheets/PartyMemberInfo.cs index 41c011463..d039570b4 100644 --- a/src/Formats/Assets/PartyMemberInfo.cs +++ b/src/Formats/Assets/Sheets/PartyMemberInfo.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; using UAlbion.Config; +using UAlbion.Formats.Assets.Inv; -namespace UAlbion.Formats.Assets +namespace UAlbion.Formats.Assets.Sheets { public class PartyMemberInfo { diff --git a/src/Formats/Assets/PhysicalAttribute.cs b/src/Formats/Assets/Sheets/PhysicalAttribute.cs similarity index 84% rename from src/Formats/Assets/PhysicalAttribute.cs rename to src/Formats/Assets/Sheets/PhysicalAttribute.cs index e451f61da..acc0bd66e 100644 --- a/src/Formats/Assets/PhysicalAttribute.cs +++ b/src/Formats/Assets/Sheets/PhysicalAttribute.cs @@ -1,5 +1,5 @@ #pragma warning disable CA1711 -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum PhysicalAttribute : byte { diff --git a/src/Formats/Assets/PlayerClass.cs b/src/Formats/Assets/Sheets/PlayerClass.cs similarity index 97% rename from src/Formats/Assets/PlayerClass.cs rename to src/Formats/Assets/Sheets/PlayerClass.cs index 821cc9a45..e05c25bbb 100644 --- a/src/Formats/Assets/PlayerClass.cs +++ b/src/Formats/Assets/Sheets/PlayerClass.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum PlayerClass : byte { diff --git a/src/Formats/Assets/PlayerCondition.cs b/src/Formats/Assets/Sheets/PlayerCondition.cs similarity index 96% rename from src/Formats/Assets/PlayerCondition.cs rename to src/Formats/Assets/Sheets/PlayerCondition.cs index d94654653..de64b7b6f 100644 --- a/src/Formats/Assets/PlayerCondition.cs +++ b/src/Formats/Assets/Sheets/PlayerCondition.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum PlayerCondition : ushort { diff --git a/src/Formats/Assets/PlayerConditions.cs b/src/Formats/Assets/Sheets/PlayerConditions.cs similarity index 94% rename from src/Formats/Assets/PlayerConditions.cs rename to src/Formats/Assets/Sheets/PlayerConditions.cs index 8f0fe2d93..17e087046 100644 --- a/src/Formats/Assets/PlayerConditions.cs +++ b/src/Formats/Assets/Sheets/PlayerConditions.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; [Flags] public enum PlayerConditions : ushort diff --git a/src/Formats/Assets/PlayerLanguages.cs b/src/Formats/Assets/Sheets/PlayerLanguages.cs similarity index 93% rename from src/Formats/Assets/PlayerLanguages.cs rename to src/Formats/Assets/Sheets/PlayerLanguages.cs index e1141d5de..b8618f3c6 100644 --- a/src/Formats/Assets/PlayerLanguages.cs +++ b/src/Formats/Assets/Sheets/PlayerLanguages.cs @@ -1,6 +1,6 @@ using System; -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; [Flags] public enum PlayerLanguages : byte diff --git a/src/Formats/Assets/PlayerRace.cs b/src/Formats/Assets/Sheets/PlayerRace.cs similarity index 84% rename from src/Formats/Assets/PlayerRace.cs rename to src/Formats/Assets/Sheets/PlayerRace.cs index 327fc4d07..5dfb6b569 100644 --- a/src/Formats/Assets/PlayerRace.cs +++ b/src/Formats/Assets/Sheets/PlayerRace.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum PlayerRace : byte { diff --git a/src/Formats/Assets/Skill.cs b/src/Formats/Assets/Sheets/Skill.cs similarity index 70% rename from src/Formats/Assets/Skill.cs rename to src/Formats/Assets/Sheets/Skill.cs index 5c08788db..f755f2ff4 100644 --- a/src/Formats/Assets/Skill.cs +++ b/src/Formats/Assets/Sheets/Skill.cs @@ -1,4 +1,4 @@ -namespace UAlbion.Formats.Assets; +namespace UAlbion.Formats.Assets.Sheets; public enum Skill : byte { diff --git a/src/Formats/Containers/ItemListContainer.cs b/src/Formats/Containers/ItemListContainer.cs index a4ed4e754..d8584fba6 100644 --- a/src/Formats/Containers/ItemListContainer.cs +++ b/src/Formats/Containers/ItemListContainer.cs @@ -5,7 +5,7 @@ using SerdesNet; using UAlbion.Api; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Formats.Containers; diff --git a/src/Formats/FormatJsonUtil.cs b/src/Formats/FormatJsonUtil.cs index 16d8e425b..30047e9c2 100644 --- a/src/Formats/FormatJsonUtil.cs +++ b/src/Formats/FormatJsonUtil.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Text.Json.Serialization; using UAlbion.Api; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.MapEvents; diff --git a/src/Formats/IAssetManager.cs b/src/Formats/IAssetManager.cs index b7fa94f61..c6e6bf1e2 100644 --- a/src/Formats/IAssetManager.cs +++ b/src/Formats/IAssetManager.cs @@ -6,9 +6,11 @@ using UAlbion.Config; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Flic; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Config; using UAlbion.Formats.Ids; diff --git a/src/Formats/MapEvents/ChangeAttributeEvent.cs b/src/Formats/MapEvents/ChangeAttributeEvent.cs index 6d50f76ca..0c08170ab 100644 --- a/src/Formats/MapEvents/ChangeAttributeEvent.cs +++ b/src/Formats/MapEvents/ChangeAttributeEvent.cs @@ -1,7 +1,7 @@ using System; using SerdesNet; using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Formats.MapEvents; diff --git a/src/Formats/MapEvents/ChangeLanguageEvent.cs b/src/Formats/MapEvents/ChangeLanguageEvent.cs index 4b0d32f65..5659801e2 100644 --- a/src/Formats/MapEvents/ChangeLanguageEvent.cs +++ b/src/Formats/MapEvents/ChangeLanguageEvent.cs @@ -1,7 +1,7 @@ using System; using SerdesNet; using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Formats.MapEvents; diff --git a/src/Formats/MapEvents/ChangeSkillEvent.cs b/src/Formats/MapEvents/ChangeSkillEvent.cs index 9cf132d7a..8f275134b 100644 --- a/src/Formats/MapEvents/ChangeSkillEvent.cs +++ b/src/Formats/MapEvents/ChangeSkillEvent.cs @@ -2,7 +2,7 @@ using SerdesNet; using UAlbion.Api.Eventing; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Formats.MapEvents; diff --git a/src/Formats/MapEvents/ChangeStatusEvent.cs b/src/Formats/MapEvents/ChangeStatusEvent.cs index 97df19abb..dbba53087 100644 --- a/src/Formats/MapEvents/ChangeStatusEvent.cs +++ b/src/Formats/MapEvents/ChangeStatusEvent.cs @@ -2,7 +2,7 @@ using SerdesNet; using UAlbion.Api.Eventing; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Formats.MapEvents; diff --git a/src/Formats/Parsers/CharacterSheetLoader.cs b/src/Formats/Parsers/CharacterSheetLoader.cs index f9ec7f80c..5db73ece5 100644 --- a/src/Formats/Parsers/CharacterSheetLoader.cs +++ b/src/Formats/Parsers/CharacterSheetLoader.cs @@ -2,7 +2,7 @@ using SerdesNet; using UAlbion.Api.Eventing; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Formats.Parsers; diff --git a/src/Formats/Parsers/ChestLoader.cs b/src/Formats/Parsers/ChestLoader.cs index b93c1062a..d8e65f995 100644 --- a/src/Formats/Parsers/ChestLoader.cs +++ b/src/Formats/Parsers/ChestLoader.cs @@ -1,7 +1,7 @@ using System; using SerdesNet; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Formats.Parsers; diff --git a/src/Formats/Parsers/ItemDataLoader.cs b/src/Formats/Parsers/ItemDataLoader.cs index 791dc8021..3f4430e1a 100644 --- a/src/Formats/Parsers/ItemDataLoader.cs +++ b/src/Formats/Parsers/ItemDataLoader.cs @@ -2,7 +2,7 @@ using SerdesNet; using UAlbion.Api.Eventing; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Formats.Parsers; diff --git a/src/Formats/Parsers/MerchantLoader.cs b/src/Formats/Parsers/MerchantLoader.cs index 6947988a5..6f487bc39 100644 --- a/src/Formats/Parsers/MerchantLoader.cs +++ b/src/Formats/Parsers/MerchantLoader.cs @@ -1,7 +1,7 @@ using System; using SerdesNet; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Formats.Parsers; diff --git a/src/Formats/StubAssetManager.cs b/src/Formats/StubAssetManager.cs index 95b48fbe9..39c475ab9 100644 --- a/src/Formats/StubAssetManager.cs +++ b/src/Formats/StubAssetManager.cs @@ -8,9 +8,11 @@ using UAlbion.Config; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Flic; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Config; using UAlbion.Formats.Ids; diff --git a/src/Game.Veldrid/Diag/AssetViewerWindow.cs b/src/Game.Veldrid/Diag/AssetViewerWindow.cs index 79655ed3b..3c3a5da24 100644 --- a/src/Game.Veldrid/Diag/AssetViewerWindow.cs +++ b/src/Game.Veldrid/Diag/AssetViewerWindow.cs @@ -5,17 +5,24 @@ using UAlbion.Core.Veldrid; using UAlbion.Core.Veldrid.Reflection; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; +using UAlbion.Game.Events; namespace UAlbion.Game.Veldrid.Diag; -public sealed class AssetViewerWindow(string name) : Component, IImGuiWindow +public sealed class AssetViewerWindow : Component, IImGuiWindow { AssetId _id; bool _dirty = true; object _asset; IAssetViewer _viewer; + public AssetViewerWindow(string name) + { + Name = name; + On(_ => _dirty = true); + } + public AssetId Id { get => _id; @@ -27,7 +34,7 @@ public AssetId Id } } - public string Name { get; } = name; + public string Name { get; } public void Draw() { @@ -63,11 +70,11 @@ void Refresh() _asset = mods.LoadAsset(_id); _viewer?.Remove(); - _viewer = AttachChild(_asset switch + _viewer = AttachChild((IAssetViewer)(_asset switch { ITexture texture => new TextureViewer(texture), CharacterSheet _ => new CharacterViewer(), - _ => _viewer - }); + _ => null + })); } } \ No newline at end of file diff --git a/src/Game/Assets/AssetManager.cs b/src/Game/Assets/AssetManager.cs index 2e32d1773..84876f74e 100644 --- a/src/Game/Assets/AssetManager.cs +++ b/src/Game/Assets/AssetManager.cs @@ -8,9 +8,11 @@ using UAlbion.Formats; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Flic; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Config; using UAlbion.Formats.Ids; diff --git a/src/Game/Assets/RawAssetManager.cs b/src/Game/Assets/RawAssetManager.cs index f116246b9..9678b400a 100644 --- a/src/Game/Assets/RawAssetManager.cs +++ b/src/Game/Assets/RawAssetManager.cs @@ -7,9 +7,11 @@ using UAlbion.Formats; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Flic; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Config; using UAlbion.Formats.Ids; diff --git a/src/Game/Combat/CombatDialog.cs b/src/Game/Combat/CombatDialog.cs index 4edf126b2..c1bc51823 100644 --- a/src/Game/Combat/CombatDialog.cs +++ b/src/Game/Combat/CombatDialog.cs @@ -33,7 +33,7 @@ public CombatDialog(int depth, IReadOnlyBattle battle) : base(DialogPositioning. stack.Add(new NonGreedy(startRoundButton)); stack.Add(new Spacing(0, 2)); - AttachChild(new DialogFrame(new VerticalStacker(stack)) + AttachChild(new DialogFrame(new VerticalStacker(stack) { ProgressiveOverlap = true }) { Background = DialogFrameBackgroundStyle.MainMenuPattern }); diff --git a/src/Game/Combat/IReadOnlyMob.cs b/src/Game/Combat/IReadOnlyMob.cs index e2971d16a..cd97c4fb3 100644 --- a/src/Game/Combat/IReadOnlyMob.cs +++ b/src/Game/Combat/IReadOnlyMob.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Game.Combat; diff --git a/src/Game/Combat/LogicalCombatTile.cs b/src/Game/Combat/LogicalCombatTile.cs index d41eb97e9..ba385fafc 100644 --- a/src/Game/Combat/LogicalCombatTile.cs +++ b/src/Game/Combat/LogicalCombatTile.cs @@ -4,8 +4,9 @@ using UAlbion.Api.Eventing; using UAlbion.Config; using UAlbion.Core; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.Events; using UAlbion.Game.Gui; diff --git a/src/Game/Combat/Mob.cs b/src/Game/Combat/Mob.cs index 5e83fa57b..b3ce5e7a5 100644 --- a/src/Game/Combat/Mob.cs +++ b/src/Game/Combat/Mob.cs @@ -1,6 +1,6 @@ using System; -using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Game.State; namespace UAlbion.Game.Combat; diff --git a/src/Game/Combat/Monster.cs b/src/Game/Combat/Monster.cs index 9ea19e961..d99566f72 100644 --- a/src/Game/Combat/Monster.cs +++ b/src/Game/Combat/Monster.cs @@ -3,8 +3,8 @@ using UAlbion.Api.Settings; using UAlbion.Api.Visual; using UAlbion.Core.Visual; -using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.State; using UAlbion.Game.State.Player; diff --git a/src/Game/Combat/MonsterFactory.cs b/src/Game/Combat/MonsterFactory.cs index 45d0abf23..d98df75e3 100644 --- a/src/Game/Combat/MonsterFactory.cs +++ b/src/Game/Combat/MonsterFactory.cs @@ -1,7 +1,7 @@ using System; using UAlbion.Api.Eventing; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.Combat; diff --git a/src/Game/Describe.cs b/src/Game/Describe.cs index fcaf399a3..a4ac6138c 100644 --- a/src/Game/Describe.cs +++ b/src/Game/Describe.cs @@ -1,5 +1,6 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game; diff --git a/src/Game/Events/AttributeChangedEvent.cs b/src/Game/Events/AttributeChangedEvent.cs index 2ccd96fad..8ec6be275 100644 --- a/src/Game/Events/AttributeChangedEvent.cs +++ b/src/Game/Events/AttributeChangedEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.Events; diff --git a/src/Game/Events/Inventory/ActivateItemEvent.cs b/src/Game/Events/Inventory/ActivateItemEvent.cs index 765d435ab..3edab5992 100644 --- a/src/Game/Events/Inventory/ActivateItemEvent.cs +++ b/src/Game/Events/Inventory/ActivateItemEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/ActivateItemSpellEvent.cs b/src/Game/Events/Inventory/ActivateItemSpellEvent.cs index 02dfc9344..d7967e673 100644 --- a/src/Game/Events/Inventory/ActivateItemSpellEvent.cs +++ b/src/Game/Events/Inventory/ActivateItemSpellEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/DrinkItemEvent.cs b/src/Game/Events/Inventory/DrinkItemEvent.cs index 8e97a9040..f65658388 100644 --- a/src/Game/Events/Inventory/DrinkItemEvent.cs +++ b/src/Game/Events/Inventory/DrinkItemEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/IInventoryEvent.cs b/src/Game/Events/Inventory/IInventoryEvent.cs index 0fa6c68a5..150b9e0bf 100644 --- a/src/Game/Events/Inventory/IInventoryEvent.cs +++ b/src/Game/Events/Inventory/IInventoryEvent.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventoryChangedEvent.cs b/src/Game/Events/Inventory/InventoryChangedEvent.cs index e04f8a45d..318d5a1f1 100644 --- a/src/Game/Events/Inventory/InventoryChangedEvent.cs +++ b/src/Game/Events/Inventory/InventoryChangedEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventoryDiscardEvent.cs b/src/Game/Events/Inventory/InventoryDiscardEvent.cs index 3f7499a09..30f6065ac 100644 --- a/src/Game/Events/Inventory/InventoryDiscardEvent.cs +++ b/src/Game/Events/Inventory/InventoryDiscardEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventoryPickupEvent.cs b/src/Game/Events/Inventory/InventoryPickupEvent.cs index 8eb387ad3..56a55fd7d 100644 --- a/src/Game/Events/Inventory/InventoryPickupEvent.cs +++ b/src/Game/Events/Inventory/InventoryPickupEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventorySellEvent.cs b/src/Game/Events/Inventory/InventorySellEvent.cs index ce67d34b9..c9d2d2dad 100644 --- a/src/Game/Events/Inventory/InventorySellEvent.cs +++ b/src/Game/Events/Inventory/InventorySellEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventorySlotEvent.cs b/src/Game/Events/Inventory/InventorySlotEvent.cs index dc84f382a..7898fbf0f 100644 --- a/src/Game/Events/Inventory/InventorySlotEvent.cs +++ b/src/Game/Events/Inventory/InventorySlotEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/InventorySwapEvent.cs b/src/Game/Events/Inventory/InventorySwapEvent.cs index deb579028..df2bcc78f 100644 --- a/src/Game/Events/Inventory/InventorySwapEvent.cs +++ b/src/Game/Events/Inventory/InventorySwapEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/ReadItemEvent.cs b/src/Game/Events/Inventory/ReadItemEvent.cs index 2355ba1ab..5f7df1348 100644 --- a/src/Game/Events/Inventory/ReadItemEvent.cs +++ b/src/Game/Events/Inventory/ReadItemEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/ReadSpellScrollEvent.cs b/src/Game/Events/Inventory/ReadSpellScrollEvent.cs index 500da4bf4..be0812e5b 100644 --- a/src/Game/Events/Inventory/ReadSpellScrollEvent.cs +++ b/src/Game/Events/Inventory/ReadSpellScrollEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/Inventory/SetInventorySlotUiPositionEvent.cs b/src/Game/Events/Inventory/SetInventorySlotUiPositionEvent.cs index bf2710494..d70bb8354 100644 --- a/src/Game/Events/Inventory/SetInventorySlotUiPositionEvent.cs +++ b/src/Game/Events/Inventory/SetInventorySlotUiPositionEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.Events.Inventory; diff --git a/src/Game/Events/SkillChangedEvent.cs b/src/Game/Events/SkillChangedEvent.cs index b63641435..b1dc0a362 100644 --- a/src/Game/Events/SkillChangedEvent.cs +++ b/src/Game/Events/SkillChangedEvent.cs @@ -1,5 +1,5 @@ using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.Events; diff --git a/src/Game/Gui/Controls/VerticalStacker.cs b/src/Game/Gui/Controls/VerticalStacker.cs index 43b4eb9a4..166516270 100644 --- a/src/Game/Gui/Controls/VerticalStacker.cs +++ b/src/Game/Gui/Controls/VerticalStacker.cs @@ -21,6 +21,7 @@ public VerticalStacker(IList children) } public bool Greedy { get; set; } = true; + public bool ProgressiveOverlap { get; set; } // When true lower rows will be drawn on a higher layer than upper rows, e.g. for the combat grid. public override Vector2 GetSize() { @@ -59,7 +60,9 @@ protected override int DoLayout(Rectangle extents, int order, T context, Layo ? new Rectangle(extents.X, offset, extents.Width, height) : new Rectangle(extents.X + (int)(extents.Width - childSize.X) / 2, offset, (int)childSize.X, height); - maxOrder = Math.Max(maxOrder, func(childElement, childExtents, order + 1, context)); + int childOrder = ProgressiveOverlap ? maxOrder + 1 : order + 1; + maxOrder = Math.Max(maxOrder, func(childElement, childExtents, childOrder, context)); + // Rendering may have altered the size of any text elements, so retrieve it // again to ensure correct rendering on the first frame. height = (int)childElement.GetSize().Y; diff --git a/src/Game/Gui/Dialogs/Conversation.cs b/src/Game/Gui/Dialogs/Conversation.cs index 2c0b20de3..f0f0b5e6f 100644 --- a/src/Game/Gui/Dialogs/Conversation.cs +++ b/src/Game/Gui/Dialogs/Conversation.cs @@ -7,6 +7,7 @@ using UAlbion.Formats; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Config; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; diff --git a/src/Game/Gui/Dialogs/ConversationParticipantLabel.cs b/src/Game/Gui/Dialogs/ConversationParticipantLabel.cs index 815005d40..cfad628a2 100644 --- a/src/Game/Gui/Dialogs/ConversationParticipantLabel.cs +++ b/src/Game/Gui/Dialogs/ConversationParticipantLabel.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Game.Gui.Controls; using UAlbion.Game.Gui.Text; using UAlbion.Game.Text; diff --git a/src/Game/Gui/Inventory/InventoryChestPane.cs b/src/Game/Gui/Inventory/InventoryChestPane.cs index 02dce6894..9cc356596 100644 --- a/src/Game/Gui/Inventory/InventoryChestPane.cs +++ b/src/Game/Gui/Inventory/InventoryChestPane.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events.Inventory; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Gui/Inventory/InventoryDetailsDialog.cs b/src/Game/Gui/Inventory/InventoryDetailsDialog.cs index 2b60266b8..2806718a0 100644 --- a/src/Game/Gui/Inventory/InventoryDetailsDialog.cs +++ b/src/Game/Gui/Inventory/InventoryDetailsDialog.cs @@ -2,6 +2,8 @@ using System.Linq; using UAlbion.Core.Visual; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Game.Gui.Controls; using UAlbion.Game.Gui.Text; diff --git a/src/Game/Gui/Inventory/InventoryLockPane.cs b/src/Game/Gui/Inventory/InventoryLockPane.cs index dec571708..ba97adbc6 100644 --- a/src/Game/Gui/Inventory/InventoryLockPane.cs +++ b/src/Game/Gui/Inventory/InventoryLockPane.cs @@ -2,7 +2,7 @@ using UAlbion.Config; using UAlbion.Core; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events; using UAlbion.Game.Events.Inventory; diff --git a/src/Game/Gui/Inventory/InventoryMerchantPane.cs b/src/Game/Gui/Inventory/InventoryMerchantPane.cs index d234dc303..946648205 100644 --- a/src/Game/Gui/Inventory/InventoryMerchantPane.cs +++ b/src/Game/Gui/Inventory/InventoryMerchantPane.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Gui/Inventory/InventoryMidPane.cs b/src/Game/Gui/Inventory/InventoryMidPane.cs index ee68779c0..7b578e833 100644 --- a/src/Game/Gui/Inventory/InventoryMidPane.cs +++ b/src/Game/Gui/Inventory/InventoryMidPane.cs @@ -1,6 +1,6 @@ using System; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events.Inventory; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Gui/Inventory/InventoryRightPane.cs b/src/Game/Gui/Inventory/InventoryRightPane.cs index 057491815..65ad0d852 100644 --- a/src/Game/Gui/Inventory/InventoryRightPane.cs +++ b/src/Game/Gui/Inventory/InventoryRightPane.cs @@ -1,6 +1,6 @@ using System.Linq; using UAlbion.Core.Visual; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events.Inventory; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Gui/Inventory/InventoryStatsPage.cs b/src/Game/Gui/Inventory/InventoryStatsPage.cs index ff046126a..396b1c55f 100644 --- a/src/Game/Gui/Inventory/InventoryStatsPage.cs +++ b/src/Game/Gui/Inventory/InventoryStatsPage.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.Gui.Controls; using UAlbion.Game.Gui.Text; diff --git a/src/Game/Gui/Inventory/LogicalCombatPositionSlot.cs b/src/Game/Gui/Inventory/LogicalCombatPositionSlot.cs index 72114d0d7..246d1a0e8 100644 --- a/src/Game/Gui/Inventory/LogicalCombatPositionSlot.cs +++ b/src/Game/Gui/Inventory/LogicalCombatPositionSlot.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.Events; using UAlbion.Game.State; diff --git a/src/Game/Gui/Inventory/LogicalInventorySlot.cs b/src/Game/Gui/Inventory/LogicalInventorySlot.cs index a4bcb63c6..5f6cb275f 100644 --- a/src/Game/Gui/Inventory/LogicalInventorySlot.cs +++ b/src/Game/Gui/Inventory/LogicalInventorySlot.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using UAlbion.Config; using UAlbion.Core; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events; using UAlbion.Game.Events.Inventory; diff --git a/src/Game/Gui/Inventory/VisualCombatPositionSlot.cs b/src/Game/Gui/Inventory/VisualCombatPositionSlot.cs index 1859f64bf..f15a5edb0 100644 --- a/src/Game/Gui/Inventory/VisualCombatPositionSlot.cs +++ b/src/Game/Gui/Inventory/VisualCombatPositionSlot.cs @@ -1,6 +1,6 @@ using System; using UAlbion.Core; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Gui/Inventory/VisualInventorySlot.cs b/src/Game/Gui/Inventory/VisualInventorySlot.cs index 0552b4d1e..3eac45bd9 100644 --- a/src/Game/Gui/Inventory/VisualInventorySlot.cs +++ b/src/Game/Gui/Inventory/VisualInventorySlot.cs @@ -2,7 +2,7 @@ using System.Numerics; using UAlbion.Config; using UAlbion.Core; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events.Inventory; using UAlbion.Game.Gui.Controls; diff --git a/src/Game/Querier.cs b/src/Game/Querier.cs index 9f5058920..0a445383b 100644 --- a/src/Game/Querier.cs +++ b/src/Game/Querier.cs @@ -4,6 +4,7 @@ using UAlbion.Formats; using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events; diff --git a/src/Game/State/GameState.cs b/src/Game/State/GameState.cs index 1b1b515a8..e1383c1ea 100644 --- a/src/Game/State/GameState.cs +++ b/src/Game/State/GameState.cs @@ -6,8 +6,9 @@ using UAlbion.Api.Eventing; using UAlbion.Config; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Formats.ScriptEvents; diff --git a/src/Game/State/ICombatParticipant.cs b/src/Game/State/ICombatParticipant.cs index 6eabd8d84..ed42f2f4c 100644 --- a/src/Game/State/ICombatParticipant.cs +++ b/src/Game/State/ICombatParticipant.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.State; diff --git a/src/Game/State/IGameState.cs b/src/Game/State/IGameState.cs index ca7bda7a3..01348e5f0 100644 --- a/src/Game/State/IGameState.cs +++ b/src/Game/State/IGameState.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; diff --git a/src/Game/State/IPlayer.cs b/src/Game/State/IPlayer.cs index 2c4940433..bab1fd5ea 100644 --- a/src/Game/State/IPlayer.cs +++ b/src/Game/State/IPlayer.cs @@ -1,6 +1,6 @@ using System; using System.Numerics; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.State; diff --git a/src/Game/State/Party.cs b/src/Game/State/Party.cs index bb08e7c11..0b2aabbb0 100644 --- a/src/Game/State/Party.cs +++ b/src/Game/State/Party.cs @@ -3,8 +3,9 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using UAlbion.Api.Eventing; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Save; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events; diff --git a/src/Game/State/PartyInventory.cs b/src/Game/State/PartyInventory.cs index d0e83cbca..0c63c2342 100644 --- a/src/Game/State/PartyInventory.cs +++ b/src/Game/State/PartyInventory.cs @@ -6,7 +6,7 @@ using UAlbion.Config; using UAlbion.Core; using UAlbion.Core.Visual; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events.Inventory; diff --git a/src/Game/State/Player/EffectiveSheetCalculator.cs b/src/Game/State/Player/EffectiveSheetCalculator.cs index 1da2a1e05..04ef12be3 100644 --- a/src/Game/State/Player/EffectiveSheetCalculator.cs +++ b/src/Game/State/Player/EffectiveSheetCalculator.cs @@ -1,7 +1,8 @@ using System; using UAlbion.Api.Settings; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.State.Player; @@ -43,7 +44,8 @@ public static IEffectiveCharacterSheet GetEffectiveSheet( Inventory = sheet.Inventory?.DeepClone(), Attributes = sheet.Attributes.DeepClone(), Skills = sheet.Skills.DeepClone(), - Combat = sheet.Combat.DeepClone() + Combat = sheet.Combat.DeepClone(), + Monster = sheet.Monster?.DeepClone() }; ApplyWieldedItems(effective, getItem); diff --git a/src/Game/State/Player/IInventoryManager.cs b/src/Game/State/Player/IInventoryManager.cs index aaffa3ac0..9d5585ba6 100644 --- a/src/Game/State/Player/IInventoryManager.cs +++ b/src/Game/State/Player/IInventoryManager.cs @@ -1,4 +1,4 @@ -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedAttribute.cs b/src/Game/State/Player/InterpolatedAttribute.cs index 8c3a84c86..a6fbe098a 100644 --- a/src/Game/State/Player/InterpolatedAttribute.cs +++ b/src/Game/State/Player/InterpolatedAttribute.cs @@ -1,6 +1,6 @@ using System; using UAlbion.Api; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedAttributes.cs b/src/Game/State/Player/InterpolatedAttributes.cs index 7502e0764..4604594c0 100644 --- a/src/Game/State/Player/InterpolatedAttributes.cs +++ b/src/Game/State/Player/InterpolatedAttributes.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedCharacterSheet.cs b/src/Game/State/Player/InterpolatedCharacterSheet.cs index f404cf8b5..5b0072f4d 100644 --- a/src/Game/State/Player/InterpolatedCharacterSheet.cs +++ b/src/Game/State/Player/InterpolatedCharacterSheet.cs @@ -1,6 +1,7 @@ using System; using UAlbion.Api; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedCombat.cs b/src/Game/State/Player/InterpolatedCombat.cs index 4941e5322..ae4081772 100644 --- a/src/Game/State/Player/InterpolatedCombat.cs +++ b/src/Game/State/Player/InterpolatedCombat.cs @@ -1,6 +1,6 @@ using System; using UAlbion.Api; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedInventory.cs b/src/Game/State/Player/InterpolatedInventory.cs index 3cdb92004..3a0da3e7d 100644 --- a/src/Game/State/Player/InterpolatedInventory.cs +++ b/src/Game/State/Player/InterpolatedInventory.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedItemSlot.cs b/src/Game/State/Player/InterpolatedItemSlot.cs index a14892f96..2e38d5502 100644 --- a/src/Game/State/Player/InterpolatedItemSlot.cs +++ b/src/Game/State/Player/InterpolatedItemSlot.cs @@ -1,7 +1,7 @@ using System; using System.Numerics; using UAlbion.Api; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedMagicSkills.cs b/src/Game/State/Player/InterpolatedMagicSkills.cs index 0f25e65bc..67c1b6541 100644 --- a/src/Game/State/Player/InterpolatedMagicSkills.cs +++ b/src/Game/State/Player/InterpolatedMagicSkills.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InterpolatedSkills.cs b/src/Game/State/Player/InterpolatedSkills.cs index b0e5d48db..8627f3940 100644 --- a/src/Game/State/Player/InterpolatedSkills.cs +++ b/src/Game/State/Player/InterpolatedSkills.cs @@ -1,5 +1,5 @@ using System; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Sheets; namespace UAlbion.Game.State.Player; diff --git a/src/Game/State/Player/InventoryManager.cs b/src/Game/State/Player/InventoryManager.cs index 04fa13f54..52fe63f5a 100644 --- a/src/Game/State/Player/InventoryManager.cs +++ b/src/Game/State/Player/InventoryManager.cs @@ -6,7 +6,9 @@ using UAlbion.Config; using UAlbion.Core; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events; diff --git a/src/Game/State/Player/PartyMember.cs b/src/Game/State/Player/PartyMember.cs index 45ca48f2e..ee9fbb04e 100644 --- a/src/Game/State/Player/PartyMember.cs +++ b/src/Game/State/Player/PartyMember.cs @@ -3,7 +3,8 @@ using UAlbion.Api.Settings; using UAlbion.Core.Events; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.Events; using UAlbion.Game.Events.Inventory; diff --git a/src/Game/State/SheetApplier.cs b/src/Game/State/SheetApplier.cs index e7e175a41..5db97b238 100644 --- a/src/Game/State/SheetApplier.cs +++ b/src/Game/State/SheetApplier.cs @@ -1,7 +1,8 @@ using System; using UAlbion.Api.Eventing; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.MapEvents; using UAlbion.Game.Events; using UAlbion.Game.Events.Inventory; diff --git a/src/Game/Text/TextFormatter.cs b/src/Game/Text/TextFormatter.cs index ca4ce3f4a..bbc83ebdd 100644 --- a/src/Game/Text/TextFormatter.cs +++ b/src/Game/Text/TextFormatter.cs @@ -6,6 +6,8 @@ using UAlbion.Api; using UAlbion.Formats; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Game.State; diff --git a/src/Tests/UAlbion.Base.Tests/AssetConversionTests.cs b/src/Tests/UAlbion.Base.Tests/AssetConversionTests.cs index deb722192..7630b8f76 100644 --- a/src/Tests/UAlbion.Base.Tests/AssetConversionTests.cs +++ b/src/Tests/UAlbion.Base.Tests/AssetConversionTests.cs @@ -9,7 +9,9 @@ using UAlbion.Config; using UAlbion.Formats; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.MapEvents; using UAlbion.Formats.Parsers; using UAlbion.Game.Assets; diff --git a/src/Tests/UAlbion.Base.Tests/AssetLoadTests.cs b/src/Tests/UAlbion.Base.Tests/AssetLoadTests.cs index 9429d6d2b..aca3e1e51 100644 --- a/src/Tests/UAlbion.Base.Tests/AssetLoadTests.cs +++ b/src/Tests/UAlbion.Base.Tests/AssetLoadTests.cs @@ -7,8 +7,10 @@ using UAlbion.Config; using UAlbion.Formats; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Formats.ScriptEvents; diff --git a/src/Tests/UAlbion.Base.Tests/EventRoundTripTests.cs b/src/Tests/UAlbion.Base.Tests/EventRoundTripTests.cs index 23a8d1f6b..6332b3a3e 100644 --- a/src/Tests/UAlbion.Base.Tests/EventRoundTripTests.cs +++ b/src/Tests/UAlbion.Base.Tests/EventRoundTripTests.cs @@ -6,8 +6,8 @@ using UAlbion.Api.Eventing; using UAlbion.Config; using UAlbion.Formats; -using UAlbion.Formats.Assets; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.TestCommon; diff --git a/src/Tests/UAlbion.Base.Tests/RoundtripTests.cs b/src/Tests/UAlbion.Base.Tests/RoundtripTests.cs index 289e35f65..e62cbd359 100644 --- a/src/Tests/UAlbion.Base.Tests/RoundtripTests.cs +++ b/src/Tests/UAlbion.Base.Tests/RoundtripTests.cs @@ -9,8 +9,10 @@ using UAlbion.Config.Properties; using UAlbion.Formats; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Containers; using UAlbion.Formats.Exporters.Tiled; using UAlbion.Formats.Ids; diff --git a/src/Tests/UAlbion.Formats.Tests/JsonTests.cs b/src/Tests/UAlbion.Formats.Tests/JsonTests.cs index 31300d359..73150187f 100644 --- a/src/Tests/UAlbion.Formats.Tests/JsonTests.cs +++ b/src/Tests/UAlbion.Formats.Tests/JsonTests.cs @@ -4,7 +4,8 @@ using System.Text.Json; using UAlbion.Api; using UAlbion.Config; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using Xunit; diff --git a/src/Tests/UAlbion.Game.Tests/InventoryTests.cs b/src/Tests/UAlbion.Game.Tests/InventoryTests.cs index 03b1fc97a..be0e33ef2 100644 --- a/src/Tests/UAlbion.Game.Tests/InventoryTests.cs +++ b/src/Tests/UAlbion.Game.Tests/InventoryTests.cs @@ -5,7 +5,7 @@ using Xunit; using UAlbion.Config; using UAlbion.Core; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; using UAlbion.Game.Events.Inventory; using UAlbion.Game.State.Player; diff --git a/src/Tests/UAlbion.Game.Tests/ItemSlotTests.cs b/src/Tests/UAlbion.Game.Tests/ItemSlotTests.cs index 44792c5aa..346dec76f 100644 --- a/src/Tests/UAlbion.Game.Tests/ItemSlotTests.cs +++ b/src/Tests/UAlbion.Game.Tests/ItemSlotTests.cs @@ -1,7 +1,7 @@ using Xunit; using UAlbion.Config; using UAlbion.Formats; -using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Ids; namespace UAlbion.Game.Tests; diff --git a/src/Tools/BuildTestingMaps/FlagTestMap.cs b/src/Tools/BuildTestingMaps/FlagTestMap.cs index fb036698b..8336a8f8b 100644 --- a/src/Tools/BuildTestingMaps/FlagTestMap.cs +++ b/src/Tools/BuildTestingMaps/FlagTestMap.cs @@ -1,6 +1,7 @@ using UAlbion.Base; using UAlbion.Config; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Maps; using UAlbion.Formats.Ids; using UAlbion.Formats.Parsers; diff --git a/src/UAlbion/DumpText.cs b/src/UAlbion/DumpText.cs index 98594a141..5218d2f1b 100644 --- a/src/UAlbion/DumpText.cs +++ b/src/UAlbion/DumpText.cs @@ -8,8 +8,10 @@ using UAlbion.Config; using UAlbion.Formats; using UAlbion.Formats.Assets; +using UAlbion.Formats.Assets.Inv; using UAlbion.Formats.Assets.Labyrinth; using UAlbion.Formats.Assets.Maps; +using UAlbion.Formats.Assets.Sheets; using UAlbion.Formats.Ids; using UAlbion.Formats.MapEvents; using UAlbion.Game;