Remove cargo GUID lookup overloads
This commit is contained in:
parent
0b92a2faae
commit
eac886d783
4 changed files with 10 additions and 24 deletions
|
|
@ -320,11 +320,6 @@ public abstract class Entity
|
|||
return _activeConsumables.FirstOrDefault(ac => ac.Item?.ItemKey == itemKey);
|
||||
}
|
||||
|
||||
public ConsumableItemEffect FindActiveConsumable(Guid itemId)
|
||||
{
|
||||
return FindActiveConsumable(AetheriaRuntimeItemReference.FromLegacyId(itemId));
|
||||
}
|
||||
|
||||
public bool CanActivateConsumable(AetheriaRuntimeCatalogItem item)
|
||||
{
|
||||
var itemKey = GetItemKey(item);
|
||||
|
|
@ -426,21 +421,11 @@ public abstract class Entity
|
|||
return sum;
|
||||
}
|
||||
|
||||
public int CountItemsInCargo(Guid itemDataID)
|
||||
{
|
||||
return CountItemsInCargo(AetheriaRuntimeItemReference.FromLegacyId(itemDataID));
|
||||
}
|
||||
|
||||
public EquippedCargoBay FindItemInCargo(string itemKey)
|
||||
{
|
||||
return CargoBays.FirstOrDefault(c => c.ContainsItem(itemKey));
|
||||
}
|
||||
|
||||
public EquippedCargoBay FindItemInCargo(Guid itemDataID)
|
||||
{
|
||||
return FindItemInCargo(AetheriaRuntimeItemReference.FromLegacyId(itemDataID));
|
||||
}
|
||||
|
||||
public Shape UnoccupiedSpace
|
||||
{
|
||||
get
|
||||
|
|
@ -461,9 +446,11 @@ public abstract class Entity
|
|||
|
||||
// Attempts to move a given number of items of the given type to the target Entity
|
||||
// Returns the number of items successfully transferred
|
||||
public int TryTransferItems(Entity target, Guid itemDataID, int quantity)
|
||||
public int TryTransferItems(Entity target, string itemKey, int quantity)
|
||||
{
|
||||
var itemKey = AetheriaRuntimeItemReference.FromLegacyId(itemDataID);
|
||||
if (target == null || string.IsNullOrWhiteSpace(itemKey) || quantity <= 0)
|
||||
return 0;
|
||||
|
||||
int quantityTransferred = 0;
|
||||
while (quantityTransferred < quantity)
|
||||
{
|
||||
|
|
@ -1600,11 +1587,6 @@ public class EquippedCargoBay : EquippedItem
|
|||
return ContainsItem(itemKey) ? ItemsOfType[itemKey].FirstOrDefault() : null;
|
||||
}
|
||||
|
||||
public ItemInstance GetFirstItem(Guid itemId)
|
||||
{
|
||||
return GetFirstItem(AetheriaRuntimeItemReference.FromLegacyId(itemId));
|
||||
}
|
||||
|
||||
public EquippedCargoBay(ItemManager itemManager, EquippableItem item, int2 position, Entity entity, string name) : base(itemManager, item, position, entity)
|
||||
{
|
||||
var typedCargoBay = ItemManager.GetRuntimeItem(EquippableItem);
|
||||
|
|
|
|||
Loading…
Reference in a new issue