Delete runtime item projection base
This commit is contained in:
parent
c0d0fbf656
commit
a4665d6065
5 changed files with 40 additions and 48 deletions
|
|
@ -260,8 +260,10 @@ public class Shape
|
|||
|
||||
}
|
||||
|
||||
public abstract class ItemData : RuntimeItemProjectionEntry, INamedEntry
|
||||
public abstract class ItemData : INamedEntry
|
||||
{
|
||||
public Guid ID = Guid.NewGuid();
|
||||
|
||||
[Inspectable, LegacyPayloadKey(1)]
|
||||
public string Name;
|
||||
|
||||
|
|
@ -293,6 +295,16 @@ public abstract class ItemData : RuntimeItemProjectionEntry, INamedEntry
|
|||
set => Name = value;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ID.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is ItemData item && item.ID == ID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Inspectable]
|
||||
|
|
|
|||
|
|
@ -10,22 +10,6 @@ public interface INamedEntry
|
|||
string EntryName { get; set; }
|
||||
}
|
||||
|
||||
public abstract class RuntimeItemProjectionEntry
|
||||
{
|
||||
public Guid ID = Guid.NewGuid();
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ID.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is RuntimeItemProjectionEntry entry) return entry.ID == ID;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class RuntimeItemReference
|
||||
{
|
||||
public Guid ItemId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue