From bc04526d35e6c6475eb11036ad735a512e5b6913 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 08:04:05 +0100 Subject: [PATCH] Require typed consumable activation --- .voidbot/state/aetheria.cc | Bin 75338 -> 76606 bytes Assets/Scripts/ServerShared/Entity.cs | 31 -------------------------- docs/aetheria-perfect-machine-map.md | 11 +++++---- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index c481858e48549d4e5679ef71c252e38237f94305..abb9dde4e47a07e2cce7d1f1eddd9a03d9019957 100644 GIT binary patch delta 1059 zcmZuwO-~a+7|uYg;>QV!NHM&LUonBTV5NZZfD}y+1~l~}^)#KGZa1BsDYLVb%AsC8 zk~Quh!03@kjEM<)@?t!AGU242yqR$GLgMTey2Y5xVe)=F^E}Tx@8>Ux58o1-8$Bm; zvzf`+?1V9$ohhxOl>e#cSsc5TjbfsAwJVm3V#gArJ!!OcIr07vdf~6#bhjSvZI1Zs zZ&E4MtW$GbaMm0rg1erB%ZvuUjvx!&2^N!Ru*C&1!7VBQ6GH3Ch51flK~X1<6^06C ztc*zwh;SUtP1kry7`C0A-wRyXs%hM^xj9Fay+Y$|;GzKv*Qg7&1_Il3$DmQQ8HIVw zqiU?Kb~k8bD9Yx3>QE-)29X@_cb5kJ#ixBO2!$C?tWprn{2y_#LM0Q}bRoo!WngIu zEm#xA$`%~zSXH4xB?Uf??fi%pb^LIZ%^0-ks_kmSus*=3g-H|g#YNE8 zxa|iCR@4%*2};x`AB#vR&6aplQm*#(=qk*F1yv37gi4`ZJ{T29(QvOr#Z#W<))m)R zbvuOMlxlTtV@N0$TNKK)B0?=Tsp`Q>PY=nVKr0nWG+%pv5s z=GCFxcCC;PCWcTyy5R3V81aoqNq>BM=+up3=LZ7`mXauy4ksCbQ~h%z1g8HTXrF}nHk;!CA8wy+Q^VgW_ zPHE#{?>M>?934jIPQ*K!^S}045RI?V0%GDZ!)->MoyfVZdZR#qgGdN RDuj5~8bKfX;^<7K^cM(hZNvZo delta 204 zcmdmYjpfuCmJLgoc+9L!Ev<}<^o-4nqb4$nPCm-ii6mwL7RzU@K!}+efWqO$vm`>Ng%L>S^h9~ay 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