11using JetBrains . Annotations ;
2+ using LabApi . Features . Wrappers ;
23using PlayerRoles ;
34using Respawning ;
4- using Respawning . Waves ;
55using Respawning . Waves . Generic ;
66using SER . Code . ArgumentSystem . Arguments ;
77using SER . Code . ArgumentSystem . BaseArguments ;
@@ -16,7 +16,7 @@ namespace SER.Code.MethodSystem.Methods.RespawnMethods;
1616[ UsedImplicitly ]
1717public 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