Organ fixes (#20488)
This commit is contained in:
@@ -12,7 +12,7 @@ public partial class SharedBodySystem
|
||||
private void AddOrgan(EntityUid uid, EntityUid bodyUid, EntityUid parentPartUid, OrganComponent component)
|
||||
{
|
||||
component.Body = bodyUid;
|
||||
RaiseLocalEvent(uid, new AddedToPartEvent(bodyUid));
|
||||
RaiseLocalEvent(uid, new AddedToPartEvent(parentPartUid));
|
||||
|
||||
if (component.Body != null)
|
||||
RaiseLocalEvent(uid, new AddedToPartInBodyEvent(component.Body.Value, parentPartUid));
|
||||
@@ -20,12 +20,14 @@ public partial class SharedBodySystem
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
private void RemoveOrgan(EntityUid uid, EntityUid bodyUid, EntityUid parentPartUid, OrganComponent component)
|
||||
private void RemoveOrgan(EntityUid uid, EntityUid parentPartUid, OrganComponent component)
|
||||
{
|
||||
RaiseLocalEvent(uid, new RemovedFromPartEvent(bodyUid));
|
||||
RaiseLocalEvent(uid, new RemovedFromPartEvent(parentPartUid));
|
||||
|
||||
if (component.Body != null)
|
||||
{
|
||||
RaiseLocalEvent(uid, new RemovedFromPartInBodyEvent(component.Body.Value, parentPartUid));
|
||||
}
|
||||
|
||||
component.Body = null;
|
||||
Dirty(uid, component);
|
||||
|
||||
Reference in New Issue
Block a user