Skip to content

Commit

Permalink
rename AnimationBase -> AnimationDescriptor
Browse files Browse the repository at this point in the history
rename AnimationBase -> AnimationDescriptor without forgetting the editor...
  • Loading branch information
lodicolo committed Feb 26, 2025
1 parent 8b19dc2 commit 10d3da6
Show file tree
Hide file tree
Showing 48 changed files with 3,788 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Intersect.Enums;

public enum GameObjectType
{
[GameObjectInfo(typeof(AnimationBase), "animations")]
[GameObjectInfo(typeof(AnimationDescriptor), "animations")]
Animation = 0,

[GameObjectInfo(typeof(ClassBase), "classes")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Intersect.GameObjects;

public partial class AnimationBase : DatabaseObject<AnimationBase>, IFolderable
public partial class AnimationDescriptor : DatabaseObject<AnimationDescriptor>, IFolderable
{
[JsonConstructor]
public AnimationBase(Guid id) : base(id)
public AnimationDescriptor(Guid id) : base(id)
{
// TODO: localize this
Name = "New Animation";
Expand All @@ -16,7 +16,7 @@ public AnimationBase(Guid id) : base(id)
}

//EF Parameterless Constructor
public AnimationBase()
public AnimationDescriptor()
{
// TODO: localize this
Name = "New Animation";
Expand Down
4 changes: 2 additions & 2 deletions Framework/Intersect.Framework.Core/GameObjects/ClassBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ public ClassBase()

[NotMapped]
[JsonIgnore]
public AnimationBase AttackAnimation
public AnimationDescriptor AttackAnimation
{
get => AnimationBase.Get(AttackAnimationId);
get => AnimationDescriptor.Get(AttackAnimationId);
set => AttackAnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
12 changes: 6 additions & 6 deletions Framework/Intersect.Framework.Core/GameObjects/ItemBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public ItemBase(Guid id) : base(id)

[NotMapped]
[JsonIgnore]
public AnimationBase Animation
public AnimationDescriptor Animation
{
get => AnimationBase.Get(AnimationId);
get => AnimationDescriptor.Get(AnimationId);
set => AnimationId = value?.Id ?? Guid.Empty;
}

Expand All @@ -46,9 +46,9 @@ public AnimationBase Animation

[NotMapped]
[JsonIgnore]
public AnimationBase AttackAnimation
public AnimationDescriptor AttackAnimation
{
get => AnimationBase.Get(AttackAnimationId);
get => AnimationDescriptor.Get(AttackAnimationId);
set => AttackAnimationId = value?.Id ?? Guid.Empty;
}

Expand All @@ -57,9 +57,9 @@ public AnimationBase AttackAnimation

[NotMapped]
[JsonIgnore]
public AnimationBase EquipmentAnimation
public AnimationDescriptor EquipmentAnimation
{
get => AnimationBase.Get(EquipmentAnimationId);
get => AnimationDescriptor.Get(EquipmentAnimationId);
set => EquipmentAnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public partial class MapAnimationAttribute : MapAttribute
public override MapAttributeType Type => MapAttributeType.Animation;

[EditorLabel("Attributes", "MapAnimation")]
[EditorReference(typeof(AnimationBase), nameof(AnimationBase.Name))]
[EditorReference(typeof(AnimationDescriptor), nameof(AnimationDescriptor.Name))]
public Guid AnimationId { get; set; }

[EditorLabel("Attributes", "MapAnimationBlock")]
Expand Down Expand Up @@ -269,7 +269,7 @@ public partial class MapCritterAttribute : MapAttribute
public string Sprite { get; set; }

[EditorLabel("Attributes", "CritterAnimation")]
[EditorReference(typeof(AnimationBase), nameof(AnimationBase.Name))]
[EditorReference(typeof(AnimationDescriptor), nameof(AnimationDescriptor.Name))]
public Guid AnimationId { get; set; }

//Movement types will mimic npc options?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ public string PlayerLightColorJson

[NotMapped]
[JsonIgnore]
public AnimationBase WeatherAnimation
public AnimationDescriptor WeatherAnimation
{
get => AnimationBase.Get(WeatherAnimationId);
get => AnimationDescriptor.Get(WeatherAnimationId);
set => WeatherAnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
4 changes: 2 additions & 2 deletions Framework/Intersect.Framework.Core/GameObjects/NpcBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public string JsonAggroList

[NotMapped]
[JsonIgnore]
public AnimationBase AttackAnimation
public AnimationDescriptor AttackAnimation
{
get => AnimationBase.Get(AttackAnimationId);
get => AnimationDescriptor.Get(AttackAnimationId);
set => AttackAnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public ResourceBase()

[NotMapped]
[JsonIgnore]
public AnimationBase Animation
public AnimationDescriptor Animation
{
get => AnimationBase.Get(AnimationId);
get => AnimationDescriptor.Get(AnimationId);
set => AnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
12 changes: 6 additions & 6 deletions Framework/Intersect.Framework.Core/GameObjects/SpellBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public SpellBase()

[NotMapped]
[JsonIgnore]
public AnimationBase CastAnimation
public AnimationDescriptor CastAnimation
{
get => AnimationBase.Get(CastAnimationId);
get => AnimationDescriptor.Get(CastAnimationId);
set => CastAnimationId = value?.Id ?? Guid.Empty;
}

Expand All @@ -54,9 +54,9 @@ public AnimationBase CastAnimation

[NotMapped]
[JsonIgnore]
public AnimationBase HitAnimation
public AnimationDescriptor HitAnimation
{
get => AnimationBase.Get(HitAnimationId);
get => AnimationDescriptor.Get(HitAnimationId);
set => HitAnimationId = value?.Id ?? Guid.Empty;
}

Expand All @@ -65,9 +65,9 @@ public AnimationBase HitAnimation

[NotMapped]
[JsonIgnore]
public AnimationBase TickAnimation
public AnimationDescriptor TickAnimation
{
get => AnimationBase.Get(TickAnimationId);
get => AnimationDescriptor.Get(TickAnimationId);
set => TickAnimationId = value?.Id ?? Guid.Empty;
}

Expand Down
Loading

0 comments on commit 10d3da6

Please sign in to comment.