Artifact container (#7822)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Alex Evgrashin
2022-04-29 01:03:39 +03:00
committed by GitHub
parent 6dbc37a690
commit 2d34ded94d
20 changed files with 226 additions and 42 deletions

View File

@@ -49,6 +49,10 @@ public sealed class ArtifactSystem : EntitySystem
if (!Resolve(uid, ref component))
return false;
// check if artifact is under suppression field
if (component.IsSuppressed)
return false;
// check if artifact isn't under cooldown
var timeDif = _gameTiming.CurTime - component.LastActivationTime;
if (timeDif.TotalSeconds < component.CooldownTime)