Fix Fultons losing their beacon when split (#20179)
This commit is contained in:
@@ -43,6 +43,8 @@ public abstract partial class SharedFultonSystem : EntitySystem
|
||||
SubscribeLocalEvent<FultonedComponent, EntGotInsertedIntoContainerMessage>(OnFultonContainerInserted);
|
||||
|
||||
SubscribeLocalEvent<FultonComponent, AfterInteractEvent>(OnFultonInteract);
|
||||
|
||||
SubscribeLocalEvent<FultonComponent, StackSplitEvent>(OnFultonSplit);
|
||||
}
|
||||
|
||||
private void OnFultonContainerInserted(EntityUid uid, FultonedComponent component, EntGotInsertedIntoContainerMessage args)
|
||||
@@ -161,6 +163,13 @@ public abstract partial class SharedFultonSystem : EntitySystem
|
||||
});
|
||||
}
|
||||
|
||||
private void OnFultonSplit(EntityUid uid, FultonComponent component, ref StackSplitEvent args)
|
||||
{
|
||||
var newFulton = EnsureComp<FultonComponent>(args.NewId);
|
||||
newFulton.Beacon = component.Beacon;
|
||||
Dirty(args.NewId, newFulton);
|
||||
}
|
||||
|
||||
protected virtual void UpdateAppearance(EntityUid uid, FultonedComponent fultoned)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user