Fix dragon devour and reduce time significantly (#8921)
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user