Skip to content

Commit 0e4e059

Browse files
committed
rename ItemBase -> ItemDescriptor
1 parent 1598506 commit 0e4e059

File tree

86 files changed

+375
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+375
-300
lines changed

Framework/Intersect.Framework.Core/Descriptors/GameObjectType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Intersect.Extensions;
22
using Intersect.Framework.Core.GameObjects.Crafting;
33
using Intersect.Framework.Core.GameObjects.Events;
4+
using Intersect.Framework.Core.GameObjects.Items;
45
using Intersect.Framework.Core.GameObjects.Variables;
56
using Intersect.GameObjects;
67
using Intersect.GameObjects.Maps;
@@ -15,7 +16,7 @@ public enum GameObjectType
1516
[GameObjectInfo(typeof(ClassDescriptor), "classes")]
1617
Class,
1718

18-
[GameObjectInfo(typeof(ItemBase), "items")]
19+
[GameObjectInfo(typeof(ItemDescriptor), "items")]
1920
Item,
2021

2122
[GameObjectInfo(typeof(NpcBase), "npcs")]

Framework/Intersect.Framework.Core/GameObjects/Crafting/CraftingRecipeIngredient.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Intersect.GameObjects;
1+
using Intersect.Framework.Core.GameObjects.Items;
2+
using Intersect.GameObjects;
23

34
namespace Intersect.Framework.Core.GameObjects.Crafting;
45

@@ -14,8 +15,8 @@ public CraftingRecipeIngredient(Guid itemId, int quantity)
1415
Quantity = quantity;
1516
}
1617

17-
public ItemBase GetItem()
18+
public ItemDescriptor GetItem()
1819
{
19-
return ItemBase.Get(ItemId);
20+
return ItemDescriptor.Get(ItemId);
2021
}
2122
}

Framework/Intersect.Framework.Core/GameObjects/EquipmentProperties.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
33
using Intersect.Enums;
4+
using Intersect.Framework.Core.GameObjects.Items;
45
using Intersect.GameObjects.Ranges;
56

67
namespace Intersect.GameObjects;
@@ -11,7 +12,7 @@ public EquipmentProperties()
1112
{
1213
}
1314

14-
public EquipmentProperties(ItemBase descriptor)
15+
public EquipmentProperties(ItemDescriptor descriptor)
1516
{
1617
Descriptor = descriptor;
1718
}
@@ -22,7 +23,7 @@ public EquipmentProperties(ItemBase descriptor)
2223
[ForeignKey(nameof(DescriptorId))]
2324
[System.Text.Json.Serialization.JsonIgnore]
2425
[Newtonsoft.Json.JsonIgnore]
25-
public ItemBase Descriptor { get; set; }
26+
public ItemDescriptor Descriptor { get; set; }
2627

2728
[NotMapped]
2829
public Dictionary<Stat, ItemRange> StatRanges { get; set; } = new();

Framework/Intersect.Framework.Core/GameObjects/Events/Commands/ChangeItemsCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Intersect.Enums;
2+
using Intersect.Framework.Core.GameObjects.Items;
23

34
namespace Intersect.Framework.Core.GameObjects.Events.Commands;
45

Framework/Intersect.Framework.Core/GameObjects/Items/ConsumableData.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
using Intersect.Enums;
2-
using Microsoft.EntityFrameworkCore;
1+
using Microsoft.EntityFrameworkCore;
32

4-
namespace Intersect.GameObjects;
3+
namespace Intersect.Framework.Core.GameObjects.Items;
54

65
[Owned]
76
public partial class ConsumableData

Framework/Intersect.Framework.Core/GameObjects/Items/ConsumableType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Intersect.Enums;
1+
namespace Intersect.Framework.Core.GameObjects.Items;
22

33
public enum ConsumableType : byte
44
{

Framework/Intersect.Framework.Core/GameObjects/Items/EffectData.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
using Intersect.Enums;
2-
using Microsoft.EntityFrameworkCore;
1+
using Microsoft.EntityFrameworkCore;
32

4-
namespace Intersect.GameObjects;
3+
namespace Intersect.Framework.Core.GameObjects.Items;
54

65
[Owned]
76
public partial class EffectData

Framework/Intersect.Framework.Core/GameObjects/Items/ItemBase.cs renamed to Framework/Intersect.Framework.Core/GameObjects/Items/ItemDescriptor.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,28 @@
33
using Intersect.Enums;
44
using Intersect.Framework.Core.GameObjects.Conditions;
55
using Intersect.Framework.Core.GameObjects.Events;
6+
using Intersect.GameObjects;
67
using Intersect.GameObjects.Ranges;
78
using Intersect.Models;
89
using Intersect.Utilities;
910
using Newtonsoft.Json;
1011

11-
namespace Intersect.GameObjects;
12+
namespace Intersect.Framework.Core.GameObjects.Items;
1213

13-
public partial class ItemBase : DatabaseObject<ItemBase>, IFolderable
14+
public partial class ItemDescriptor : DatabaseObject<ItemDescriptor>, IFolderable
1415
{
1516
[NotMapped]
1617
public ConditionLists UsageRequirements { get; set; } = new();
1718

1819
public string CannotUseMessage { get; set; } = string.Empty;
1920

20-
public ItemBase()
21+
public ItemDescriptor()
2122
{
2223
Initialize();
2324
}
2425

2526
[JsonConstructor]
26-
public ItemBase(Guid id) : base(id)
27+
public ItemDescriptor(Guid id) : base(id)
2728
{
2829
Initialize();
2930
}
@@ -431,8 +432,8 @@ public void SetEffectOfType(ItemEffect type, int value)
431432
/// Gets an array of all items sharing the provided cooldown group.
432433
/// </summary>
433434
/// <param name="cooldownGroup">The cooldown group to search for.</param>
434-
/// <returns>Returns an array of <see cref="ItemBase"/> containing all items with the supplied cooldown group.</returns>
435-
public static ItemBase[] GetCooldownGroup(string cooldownGroup)
435+
/// <returns>Returns an array of <see cref="ItemDescriptor"/> containing all items with the supplied cooldown group.</returns>
436+
public static ItemDescriptor[] GetCooldownGroup(string cooldownGroup)
436437
{
437438
cooldownGroup = cooldownGroup.Trim();
438439

@@ -442,7 +443,7 @@ public static ItemBase[] GetCooldownGroup(string cooldownGroup)
442443
return [];
443444
}
444445

445-
return Lookup.Values.OfType<ItemBase>()
446+
return Lookup.Values.OfType<ItemDescriptor>()
446447
.Where(descriptor => descriptor.CooldownGroup?.Trim() == cooldownGroup)
447448
.ToArray();
448449
}

Framework/Intersect.Framework.Core/GameObjects/Items/ItemEffect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Intersect.Enums;
1+
namespace Intersect.Framework.Core.GameObjects.Items;
22

33
public enum ItemEffect : byte
44
{

Framework/Intersect.Framework.Core/GameObjects/Items/ItemHandling.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Intersect.Enums;
1+
namespace Intersect.Framework.Core.GameObjects.Items;
22

33
/// <summary>
44
/// Contains the definitions to be used on how to handle giving or taking away items to and from players.

0 commit comments

Comments
 (0)