Skip to content

Commit

Permalink
pass Actor to cartridge messages (#33210)
Browse files Browse the repository at this point in the history
* pass Actor to cartridge messages

* NonSerialized gaming

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
  • Loading branch information
deltanedas authored and sleepyyapril committed Dec 26, 2024
1 parent fee041e commit 57675a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Content.Server/CartridgeLoader/CartridgeLoaderSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ private void OnUiMessage(EntityUid uid, CartridgeLoaderComponent component, Cart
{
var cartridgeEvent = args.MessageEvent;
cartridgeEvent.LoaderUid = GetNetEntity(uid);
cartridgeEvent.Actor = args.Actor;

RelayEvent(component, cartridgeEvent, true);
}
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/CartridgeLoader/CartridgeUiMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ public CartridgeUiMessage(CartridgeMessageEvent messageEvent)
public abstract class CartridgeMessageEvent : EntityEventArgs
{
public NetEntity LoaderUid;

[NonSerialized]
public EntityUid Actor;
}

0 comments on commit 57675a0

Please sign in to comment.