Fix for Tesla Twins Miniboss (#41199)
* increase QA standards on the Tesla Generator production line * comment * Inert datafield and code * I'm not even supposed to be here today
This commit is contained in:
@@ -53,6 +53,9 @@ public sealed class SingularityGeneratorSystem : SharedSingularityGeneratorSyste
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SetPower(uid, 0, comp);
|
SetPower(uid, 0, comp);
|
||||||
|
|
||||||
|
// Other particle entities from the same wave could trigger additional teslas to spawn, so we must block the generator
|
||||||
|
comp.Inert = true;
|
||||||
Spawn(comp.SpawnPrototype, Transform(uid).Coordinates);
|
Spawn(comp.SpawnPrototype, Transform(uid).Coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +115,8 @@ public sealed class SingularityGeneratorSystem : SharedSingularityGeneratorSyste
|
|||||||
if (!TryComp<SingularityGeneratorComponent>(args.OtherEntity, out var generatorComp))
|
if (!TryComp<SingularityGeneratorComponent>(args.OtherEntity, out var generatorComp))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_timing.CurTime < _metadata.GetPauseTime(uid) + generatorComp.NextFailsafe && !generatorComp.FailsafeDisabled)
|
if (generatorComp.Inert ||
|
||||||
|
_timing.CurTime < generatorComp.NextFailsafe && !generatorComp.FailsafeDisabled)
|
||||||
{
|
{
|
||||||
QueueDel(uid);
|
QueueDel(uid);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ public sealed partial class SingularityGeneratorComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public float Threshold = 16;
|
public float Threshold = 16;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An inert generator will never be charged by particles, even if emagged.
|
||||||
|
/// This is normally only used between activating and being destroyed, to avoid creating duplicate teslas.
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public bool Inert;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows the generator to ignore all the failsafe stuff, e.g. when emagged
|
/// Allows the generator to ignore all the failsafe stuff, e.g. when emagged
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user