action refactor proper ecs edition (#27422)
This commit is contained in:
@@ -25,16 +25,14 @@ public sealed class ChargesSystem : SharedChargesSystem
|
||||
|
||||
while (query.MoveNext(out var uid, out var recharge, out var charges))
|
||||
{
|
||||
BaseActionComponent? actionComp = null;
|
||||
|
||||
if (!_actions.ResolveActionData(uid, ref actionComp, logError: false))
|
||||
if (_actions.GetAction(uid, false) is not {} action)
|
||||
continue;
|
||||
|
||||
var current = GetCurrentCharges((uid, charges, recharge));
|
||||
|
||||
if (!_lastCharges.TryGetValue(uid, out var last) || current != last)
|
||||
{
|
||||
_actions.UpdateAction(uid, actionComp);
|
||||
_actions.UpdateAction(action);
|
||||
}
|
||||
|
||||
_tempLastCharges[uid] = current;
|
||||
|
||||
Reference in New Issue
Block a user