Skip to content

Commit

Permalink
Fix the DoAfter (new-frontiers-14#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician authored Dec 21, 2023
1 parent 9d37886 commit f6242c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/_NF/CryoSleep/CryoSleepSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ private void OnAutoCryoSleep(EntityUid uid, CryoSleepComponent component, CryoSt
if (args.Cancelled || args.Handled)
return;

var body = args.User;
var body = args.Used;
var pod = args.Target;
if (body is not { Valid: true } || pod is not { Valid: true })
return;

CryoStoreBody(body, pod.Value);
CryoStoreBody(body.Value, pod.Value);
args.Handled = true;
}

Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/_NF/CryoSleep/SharedCryoSleepSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Content.Shared.CryoSleep;

public abstract partial class SharedCryoSleepSystem : EntitySystem
{
/// <summary>
/// Raised on a cryopod that an entity was shoved into,
/// only if the mind of that entity has not decided to proceed with cryosleep or cancel it.
///
/// The target and the user of this event is the cryopod, and the "used" is the body put into it.
/// </summary>
[Serializable, NetSerializable]
public sealed partial class CryoStoreDoAfterEvent : SimpleDoAfterEvent
{
Expand Down

0 comments on commit f6242c3

Please sign in to comment.