Name runtime item references as definition ids
This commit is contained in:
parent
a3c65aa8e0
commit
84bf298596
6 changed files with 20 additions and 24 deletions
|
|
@ -12,15 +12,10 @@ using static Unity.Mathematics.math;
|
|||
|
||||
public abstract class ItemInstance
|
||||
{
|
||||
public RuntimeItemReference Data;
|
||||
public RuntimeItemDefinitionReference Reference;
|
||||
public ItemRotation Rotation;
|
||||
public RuntimeItemReference Reference
|
||||
{
|
||||
get => Data;
|
||||
set => Data = value;
|
||||
}
|
||||
|
||||
public Guid ItemId => Data?.ItemId ?? Guid.Empty;
|
||||
public Guid ItemId => Reference?.ItemId ?? Guid.Empty;
|
||||
}
|
||||
|
||||
public abstract class CraftedItemInstance : ItemInstance
|
||||
|
|
|
|||
|
|
@ -302,9 +302,9 @@ public class ItemManager
|
|||
return shape;
|
||||
}
|
||||
|
||||
public RuntimeItemReference CreateReference(Guid itemId)
|
||||
public RuntimeItemDefinitionReference CreateReference(Guid itemId)
|
||||
{
|
||||
return new RuntimeItemReference(itemId);
|
||||
return new RuntimeItemDefinitionReference(itemId);
|
||||
}
|
||||
|
||||
public void Log(string s)
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ public interface INamedEntry
|
|||
string EntryName { get; set; }
|
||||
}
|
||||
|
||||
public class RuntimeItemReference
|
||||
public class RuntimeItemDefinitionReference
|
||||
{
|
||||
public Guid ItemId;
|
||||
|
||||
public RuntimeItemReference()
|
||||
public RuntimeItemDefinitionReference()
|
||||
{
|
||||
}
|
||||
|
||||
public RuntimeItemReference(Guid itemId)
|
||||
public RuntimeItemDefinitionReference(Guid itemId)
|
||||
{
|
||||
ItemId = itemId;
|
||||
}
|
||||
Loading…
Reference in a new issue