Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
csinkers committed Oct 27, 2024
1 parent 5fa6ce8 commit 5f5f327
Show file tree
Hide file tree
Showing 131 changed files with 209 additions and 185 deletions.
8 changes: 4 additions & 4 deletions mods/Base/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Editor/CharacterAttributesEditor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Sheets;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/CharacterEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using ImGuiNET;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Sheets;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/CharacterMagicEditor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Sheets;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/CharacterSkillsEditor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Sheets;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/CombatAttributeEditor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Sheets;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/InventoryEditor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Linq;
using UAlbion.Formats.Assets;
using UAlbion.Formats.Assets.Inv;

namespace UAlbion.Editor;

Expand Down
2 changes: 1 addition & 1 deletion src/Editor/ItemSlotEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public enum AmmunitionType : byte
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public interface IInventory
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Numerics;
using UAlbion.Formats.Ids;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public interface IReadOnlyItemSlot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using UAlbion.Api.Eventing;
using UAlbion.Config;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public class Inventory : IInventory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UAlbion.Api;
using UAlbion.Config;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public class InventoryConverter : JsonConverter<Inventory>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using UAlbion.Config;
using UAlbion.Formats.Ids;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public struct InventoryId : IEquatable<InventoryId>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using UAlbion.Config;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public struct InventorySlotId : IEquatable<InventorySlotId>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public enum InventoryType : byte
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

[Flags]
public enum ItemFlags : ushort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using UAlbion.Config;
using UAlbion.Formats.Ids;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public class ItemSlot : IReadOnlyItemSlot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

[Flags]
public enum ItemSlotFlags : byte
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Numerics;
using UAlbion.Formats.Ids;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public class ReadOnlyItemSlot : IReadOnlyItemSlot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Inv;

public enum SpecialItemId : byte
{
Expand Down
2 changes: 2 additions & 0 deletions src/Formats/Assets/Save/SavedGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public enum CharacterType : byte
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using UAlbion.Api.Eventing;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public class CombatAttributes : ICombatAttributes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UAlbion.Formats.Ids;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public class EffectiveCharacterSheet : CharacterSheet, IEffectiveCharacterSheet
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public enum Gender : byte
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

#pragma warning disable CA1711
public interface ICharacterAttribute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public interface ICharacterAttributes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public interface ICharacterSkills
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public interface ICombatAttributes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace UAlbion.Formats.Assets;
namespace UAlbion.Formats.Assets.Sheets;

public interface IEffectiveCharacterSheet : ICharacterSheet
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 5f5f327

Please sign in to comment.