diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index c481858e4..abb9dde4e 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index 30474a5f0..99c47773d 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -314,48 +314,17 @@ public abstract class Entity _activeConsumables.Add(new ConsumableItemEffect(item, this)); } - public ConsumableItemEffect FindActiveConsumable(ConsumableItemData data) - { - return data == null ? null : FindActiveConsumable(data.ID); - } - public ConsumableItemEffect FindActiveConsumable(Guid itemId) { return _activeConsumables.FirstOrDefault(ac => ac.Item?.Data?.ItemId == itemId); } - public bool CanActivateConsumable(ConsumableItemData data) - { - var typedItem = ItemManager.GetRuntimeItem(data?.ID ?? Guid.Empty); - if (typedItem == null) - return data != null && (data.Stackable || FindActiveConsumable(data) == null); - - return CanActivateConsumable(typedItem); - } - public bool CanActivateConsumable(AetheriaRuntimeCatalogItem item) { var itemId = GetLegacyGuid(item); return item != null && itemId != Guid.Empty && (item.Stackable || FindActiveConsumable(itemId) == null); } - public bool TryActivateConsumable(ConsumableItemData data) - { - var typedItem = ItemManager.GetRuntimeItem(data?.ID ?? Guid.Empty); - if (typedItem != null) - return TryActivateConsumable(typedItem); - - if (!CanActivateConsumable(data)) return false; - - var bay = FindItemInCargo(data.ID); - if (bay == null) return false; - - var item = (ConsumableItem) bay.ItemsOfType[data.ID].First(); - ActivateConsumable(item); - bay.Remove(item); - return true; - } - public bool TryActivateConsumable(AetheriaRuntimeCatalogItem typedItem) { if (!CanActivateConsumable(typedItem)) return false; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index f592f846c..00bbf10d0 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -804,10 +804,13 @@ First Aetheria surfaces to publish: Wwise parameter updates off `EquippableItemData.AudioStats`; missing typed audio stat bindings produce no parameter updates. - Done: add typed consumable stackability, duration, and effectiveness curve - fields and route action-bar consumable activation/runtime evaluation - through typed item rows; verifier records that the current mapped catalog - has `0` consumable item rows, so future consumable content still needs - typed coverage. + fields and route action-bar consumable activation/runtime evaluation + through typed item rows; verifier records that the current mapped catalog + has `0` consumable item rows, so future consumable content still needs + typed coverage. + - Done: delete `Entity` consumable activation overloads that accepted + `ConsumableItemData`; active lookup uses item ids and activation commands + accept typed runtime catalog rows only. - Done: import action-bar icon resource paths into typed item definitions and move `ActionBarSlot` custom gear icon lookup onto typed runtime item rows. - Done: move `Ship` drag, combat/turret predicted shot height, and thruster