Skip to content

Commit 45517aa

Browse files
update SpawnPickup to return a reference
1 parent 7e3e5ad commit 45517aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MethodSystem/Methods/PickupMethods/SpawnPickupMethod.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace SER.MethodSystem.Methods.PickupMethods;
1111

1212
[UsedImplicitly]
13-
public class SpawnPickupMethod : SynchronousMethod, ICanError
13+
public class SpawnPickupMethod : ReferenceReturningMethod<Pickup>, ICanError
1414
{
1515
public override string Description => "Spawns an item pickup at a given position.";
1616

@@ -45,5 +45,6 @@ public override void Execute()
4545

4646
if (pickup is null) throw new ScriptRuntimeError(ErrorReasons[0]);
4747
pickup.Spawn();
48+
ReturnValue = pickup;
4849
}
4950
}

0 commit comments

Comments
 (0)