From ce715a28517a7f255b45c5d334b27d7d9c748f2a Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 17 Jun 2022 17:02:35 +1000 Subject: [PATCH] Fix dragon devour and reduce time significantly (#8921) --- Content.Server/Dragon/DragonComponent.cs | 5 ++++- Content.Server/Dragon/DragonSystem.cs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Content.Server/Dragon/DragonComponent.cs b/Content.Server/Dragon/DragonComponent.cs index a17c317cd9..3de7deff32 100644 --- a/Content.Server/Dragon/DragonComponent.cs +++ b/Content.Server/Dragon/DragonComponent.cs @@ -45,8 +45,11 @@ namespace Content.Server.Dragon /// NOTE: original intended design was to increase this proportionally with damage thresholds, but those proved quite difficult to get consistently. right now it devours the structure at a fixed timer. /// /// + [DataField("structureDevourTime")] + public float StructureDevourTime = 10f; + [DataField("devourTime")] - public float DevourTime = 15f; + public float DevourTime = 2f; [DataField("spawnCount")] public int SpawnsLeft = 2; diff --git a/Content.Server/Dragon/DragonSystem.cs b/Content.Server/Dragon/DragonSystem.cs index b03c8fcb81..8ef43a1bdd 100644 --- a/Content.Server/Dragon/DragonSystem.cs +++ b/Content.Server/Dragon/DragonSystem.cs @@ -60,6 +60,7 @@ namespace Content.Server.Dragon private void OnDragonDevourComplete(EntityUid uid, DragonComponent component, DragonDevourComplete args) { + component.CancelToken = null; var ichorInjection = new Solution(component.DevourChem, component.DevourHealRate); //Humanoid devours allow dragon to get eggs, corpses included @@ -154,7 +155,7 @@ namespace Content.Server.Dragon component.CancelToken = new CancellationTokenSource(); - _doAfterSystem.DoAfter(new DoAfterEventArgs(uid, component.DevourTime, component.CancelToken.Token, target) + _doAfterSystem.DoAfter(new DoAfterEventArgs(uid, component.StructureDevourTime, component.CancelToken.Token, target) { UserFinishedEvent = new DragonStructureDevourComplete(uid, target), UserCancelledEvent = new DragonDevourCancelledEvent(),