Fix dragon devour and reduce time significantly (#8921)

This commit is contained in:
metalgearsloth
2022-06-17 17:02:35 +10:00
committed by GitHub
parent c3fa06ae45
commit ce715a2851
2 changed files with 6 additions and 2 deletions

View File

@@ -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. /// 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.
/// </remarks> /// </remarks>
/// </summary> /// </summary>
[DataField("structureDevourTime")]
public float StructureDevourTime = 10f;
[DataField("devourTime")] [DataField("devourTime")]
public float DevourTime = 15f; public float DevourTime = 2f;
[DataField("spawnCount")] public int SpawnsLeft = 2; [DataField("spawnCount")] public int SpawnsLeft = 2;

View File

@@ -60,6 +60,7 @@ namespace Content.Server.Dragon
private void OnDragonDevourComplete(EntityUid uid, DragonComponent component, DragonDevourComplete args) private void OnDragonDevourComplete(EntityUid uid, DragonComponent component, DragonDevourComplete args)
{ {
component.CancelToken = null;
var ichorInjection = new Solution(component.DevourChem, component.DevourHealRate); var ichorInjection = new Solution(component.DevourChem, component.DevourHealRate);
//Humanoid devours allow dragon to get eggs, corpses included //Humanoid devours allow dragon to get eggs, corpses included
@@ -154,7 +155,7 @@ namespace Content.Server.Dragon
component.CancelToken = new CancellationTokenSource(); 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), UserFinishedEvent = new DragonStructureDevourComplete(uid, target),
UserCancelledEvent = new DragonDevourCancelledEvent(), UserCancelledEvent = new DragonDevourCancelledEvent(),