Skip to content

Commit 21e9f3f

Browse files
committed
Merge branch 'main' into dev
2 parents 827bdb4 + ba4634f commit 21e9f3f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Code/MethodSystem/Methods/RespawnMethods/RespawnWaveInfoMethod.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using JetBrains.Annotations;
2+
using LabApi.Features.Wrappers;
23
using PlayerRoles;
34
using Respawning;
4-
using Respawning.Waves;
55
using Respawning.Waves.Generic;
66
using SER.Code.ArgumentSystem.Arguments;
77
using SER.Code.ArgumentSystem.BaseArguments;
@@ -16,7 +16,7 @@ namespace SER.Code.MethodSystem.Methods.RespawnMethods;
1616
[UsedImplicitly]
1717
public class RespawnWaveInfoMethod : LiteralValueReturningMethod, IReferenceResolvingMethod
1818
{
19-
public Type ResolvesReference => typeof(TimeBasedWave);
19+
public Type ResolvesReference => typeof(RespawnWave);
2020

2121
public override TypeOfValue LiteralReturnTypes => new TypesOfValue([
2222
typeof(NumberValue),
@@ -28,7 +28,7 @@ public class RespawnWaveInfoMethod : LiteralValueReturningMethod, IReferenceReso
2828

2929
public override Argument[] ExpectedArguments { get; } =
3030
[
31-
new ReferenceArgument<TimeBasedWave>("respawnWave"),
31+
new ReferenceArgument<RespawnWave>("respawnWave"),
3232
new OptionsArgument("property",
3333
Option.Enum<Faction>(),
3434
"maxWaveSize",
@@ -40,15 +40,15 @@ public class RespawnWaveInfoMethod : LiteralValueReturningMethod, IReferenceReso
4040

4141
public override void Execute()
4242
{
43-
var wave = Args.GetReference<TimeBasedWave>("respawnWave");
43+
var wave = Args.GetReference<RespawnWave>("respawnWave");
4444

4545
ReturnValue = Args.GetOption("property") switch
4646
{
47-
"faction" => new StaticTextValue(wave.TargetFaction.ToString()),
47+
"faction" => new StaticTextValue(wave.Faction.ToString()),
4848
"maxwavesize" => new NumberValue(wave.MaxWaveSize),
49-
"respawntokens" => new NumberValue(wave is ILimitedWave limitedWave ? limitedWave.RespawnTokens : 0),
50-
"influence" => new NumberValue((decimal)FactionInfluenceManager.Get(wave.TargetFaction)),
51-
"timeleft" => new DurationValue(TimeSpan.FromSeconds(wave.Timer.TimeLeft)),
49+
"respawntokens" => new NumberValue(wave.Base is ILimitedWave limitedWave ? limitedWave.RespawnTokens : 0),
50+
"influence" => new NumberValue((decimal)FactionInfluenceManager.Get(wave.Faction)),
51+
"timeleft" => new DurationValue(TimeSpan.FromSeconds(wave.TimeLeft)),
5252
_ => throw new AndrzejFuckedUpException()
5353
};
5454
}

0 commit comments

Comments
 (0)