Fix artifact point extraction going into negatives (#36642)
This commit is contained in:
@@ -39,7 +39,8 @@ public sealed class ArtifactAnalyzerSystem : SharedArtifactAnalyzerSystem
|
||||
sumResearch += research;
|
||||
}
|
||||
|
||||
if (sumResearch == 0)
|
||||
// 4-16-25: It's a sad day when a scientist makes negative 5k research
|
||||
if (sumResearch <= 0)
|
||||
return;
|
||||
|
||||
_research.ModifyServerPoints(server.Value, sumResearch, serverComponent);
|
||||
|
||||
@@ -163,7 +163,7 @@ public abstract partial class SharedXenoArtifactSystem
|
||||
if (ent.Comp.Locked)
|
||||
return 0;
|
||||
|
||||
return ent.Comp.ResearchValue - ent.Comp.ConsumedResearchValue;
|
||||
return Math.Max(0, ent.Comp.ResearchValue - ent.Comp.ConsumedResearchValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user