Expand UseDelay to support multiple delays per entity; fix bible healing and bag pickup (#27234)

* Upgraded UseDelay to support multiple delays per entity

* Implement secondary delay for bibles.
Also some improvements to make it work nicely.

* Documentation is good

* Reserve the previous change; now Storage uses the special ID and Bible uses the default.

* .0

* Added VV support to UseDelayInfo

* Serialize better

* No register, just setlength

(cherry picked from commit b292905216)
This commit is contained in:
Tayrtahn
2024-05-03 00:11:26 +02:00
committed by null
parent b17eb7902b
commit 07bfdf787a
7 changed files with 193 additions and 62 deletions
@@ -144,7 +144,7 @@ public sealed class SpraySystem : EntitySystem
_audio.PlayPvs(entity.Comp.SpraySound, entity, entity.Comp.SpraySound.Params.WithVariation(0.125f));
_useDelay.SetDelay((entity, useDelay), TimeSpan.FromSeconds(cooldownTime));
_useDelay.SetLength((entity, useDelay), TimeSpan.FromSeconds(cooldownTime));
_useDelay.TryResetDelay((entity, useDelay));
}
}