Skip to content

Commit

Permalink
Happy to just be, part of your story.
Browse files Browse the repository at this point in the history
  • Loading branch information
gluesniffler committed Nov 18, 2024
1 parent b603833 commit 7c6e38c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Content.Shared/Body/Organ/OrganComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ public sealed partial class OrganComponent : Component, ISurgeryToolComponent
public EntityUid? Body;

/// <summary>
/// Relevant body this organ originally belonged to.
/// Relevant body this organ originally belonged to.
/// /// FOR WHATEVER FUCKING REASON AUTONETWORKING THIS CRASHES GIBTEST AAAAAAAAAAAAAAA
/// </summary>
[DataField, AutoNetworkedField]
[DataField]
public EntityUid? OriginalBody;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Body/Systems/SharedBodySystem.Organs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private void AddOrgan(

if (organEnt.Comp.Body is not null)
{
organEnt.Comp.OriginalBody = organEnt.Comp.Body;
var addedInBodyEv = new OrganAddedToBodyEvent(bodyUid, parentPartUid);
RaiseLocalEvent(organEnt, ref addedInBodyEv);
}
Expand All @@ -37,7 +38,6 @@ private void RemoveOrgan(Entity<OrganComponent> organEnt, EntityUid parentPartUi
{
var removedInBodyEv = new OrganRemovedFromBodyEvent(bodyUid, parentPartUid);
RaiseLocalEvent(organEnt, ref removedInBodyEv);
organEnt.Comp.OriginalBody = bodyUid;
}

if (TryComp(parentPartUid, out DamageableComponent? damageable)
Expand Down

0 comments on commit 7c6e38c

Please sign in to comment.