Skip to content

Commit 1a4be44

Browse files
Fix: IPC Health Examine not showing Body Part health (ProjectOmu#1009)
* Fix: IPC Health Examine brokey * omu comment * BoneSeverity.None --------- Co-authored-by: feistyfedora <12000170+feistyfedora@users.noreply.github.com>
1 parent a1a4818 commit 1a4be44

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Content.Server/_Shitmed/PartStatus/PartStatusSystem.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
// SPDX-License-Identifier: AGPL-3.0-or-later
88

9+
using System.Collections.Generic;
910
using System.Linq;
1011
using System.Text;
1112
using Content.Server.Body.Systems;
@@ -31,6 +32,7 @@
3132
using Content.Shared.Verbs;
3233
using Robust.Shared.Utility;
3334
using Content.Shared.HealthExaminable;
35+
using Robust.Shared.GameObjects;
3436
using Robust.Shared.Prototypes;
3537

3638
namespace Content.Server._Shitmed.PartStatus;
@@ -142,10 +144,10 @@ private HashSet<PartStatus> CollectPartStatuses(Entity<BodyPartComponent> rootPa
142144

143145
foreach (var woundable in _woundSystem.GetAllWoundableChildren(rootPart))
144146
{
145-
if (!TryComp<BodyPartComponent>(woundable, out var bodyPartComponent) ||
146-
!TryComp<BoneComponent>(woundable.Comp.Bone.ContainedEntities.FirstOrNull(), out var bone))
147+
if (!TryComp<BodyPartComponent>(woundable, out var bodyPartComponent)) // Omu: Boneless Fix
147148
continue;
148149

150+
TryComp<BoneComponent>(woundable.Comp.Bone.ContainedEntities.FirstOrNull(), out var bone); // Omu: Boneless Fix
149151
var partName = bodyPartComponent.ParentSlot?.Id ?? bodyPartComponent.PartType.ToString().ToLower();
150152
var (damageSeverities, isBleeding) = AnalyzeWounds(woundable);
151153

@@ -155,7 +157,7 @@ private HashSet<PartStatus> CollectPartStatuses(Entity<BodyPartComponent> rootPa
155157
partName,
156158
woundable.Comp.WoundableSeverity,
157159
damageSeverities,
158-
bone.BoneSeverity,
160+
bone?.BoneSeverity ?? BoneSeverity.None, // Omu: Boneless Fix
159161
isBleeding));
160162
}
161163

Content.Shared/_Shitmed/Surgery/Traumas/TraumasSerializable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public record struct TraumaBeingRemovedEvent(Entity<TraumaComponent> Trauma, Ent
5555
[Serializable, NetSerializable]
5656
public enum BoneSeverity
5757
{
58+
None = -1, // Omu: No bones?
5859
Normal = 0,
5960
Damaged = 1,
6061
Cracked = 2,

0 commit comments

Comments
 (0)