Skip to content

Commit

Permalink
fixes mobdthresholds (Vault-Overseers#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScyronX authored Aug 16, 2024
1 parent ed168db commit 99abac5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Content.Shared/Mobs/Systems/MobThresholdSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void Initialize()
private void OnGetState(EntityUid uid, MobThresholdsComponent component, ref ComponentGetState args)
{
// Nuclear14 HP depends on Endurance
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(uid, out var special))
totalEndurance = special.TotalEndurance;
var thresholds = new Dictionary<FixedPoint2, MobState>();
Expand All @@ -49,7 +49,7 @@ private void OnGetState(EntityUid uid, MobThresholdsComponent component, ref Com
private void OnHandleState(EntityUid uid, MobThresholdsComponent component, ref ComponentHandleState args)
{
// Nuclear14 HP depends on Endurance
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(uid, out var special))
totalEndurance = special.TotalEndurance;
var thresholds = new Dictionary<FixedPoint2, MobState>();
Expand Down Expand Up @@ -114,7 +114,7 @@ public FixedPoint2 GetThresholdForState(EntityUid target, MobState mobState,
{
if (!Resolve(target, ref thresholdComponent))
return FixedPoint2.Zero;
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(target, out var special))
totalEndurance = special.TotalEndurance;

Expand All @@ -141,7 +141,7 @@ public bool TryGetThresholdForState(EntityUid target, MobState mobState,
[NotNullWhen(true)] out FixedPoint2? threshold,
MobThresholdsComponent? thresholdComponent = null)
{
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(target, out var special))
totalEndurance = special.TotalEndurance;

Expand Down Expand Up @@ -221,7 +221,7 @@ public bool TryGetIncapPercentage(EntityUid target, FixedPoint2 damage,
percentage = 0;
return true;
}
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(target, out var special))
totalEndurance = special.TotalEndurance;

Expand Down Expand Up @@ -311,7 +311,7 @@ public void SetMobStateThreshold(EntityUid target, FixedPoint2 damage, MobState
{
if (!Resolve(target, ref threshold))
return;
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(target, out var special))
totalEndurance = special.TotalEndurance;

Expand Down Expand Up @@ -365,7 +365,7 @@ public void SetAllowRevives(EntityUid uid, bool val, MobThresholdsComponent? com
private void CheckThresholds(EntityUid target, MobStateComponent mobStateComponent,
MobThresholdsComponent thresholdsComponent, DamageableComponent damageableComponent, EntityUid? origin = null)
{
var totalEndurance = 0;
var totalEndurance = 5;
if (TryComp<SpecialComponent>(target, out var special))
totalEndurance = special.TotalEndurance;

Expand Down

0 comments on commit 99abac5

Please sign in to comment.