Skip to content

Commit 39e6e23

Browse files
remove ValidRef method
1 parent d0639bc commit 39e6e23

4 files changed

Lines changed: 11 additions & 35 deletions

File tree

Code/MethodSystem/Methods/ReferenceVariableMethods/ValidRefMethod.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

Code/MethodSystem/Methods/UCRMethods/GetUCRRoleMethod.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using SER.Code.Helpers;
44
using SER.Code.MethodSystem.BaseMethods.Synchronous;
55
using SER.Code.MethodSystem.MethodDescriptors;
6-
using SER.Code.MethodSystem.Methods.ReferenceVariableMethods;
76
using SER.Code.MethodSystem.Structures;
87
using UncomplicatedCustomRoles.API.Features;
98
using UncomplicatedCustomRoles.API.Interfaces;
@@ -21,8 +20,7 @@ public class GetUCRRoleMethod : ReferenceReturningMethod, IAdditionalDescription
2120
public override string Description => "Returns a reference to the UCR role a player has.";
2221

2322
public string AdditionalDescription =>
24-
$"Be sure to use {GetFriendlyName(typeof(ValidRefMethod))} method to verify if the player has a role. " +
25-
$"The reference will be INVALID when the player doesn't have a role.";
23+
"Be sure to verify if the player has a role. The reference will be INVALID when the player doesn't have a role.";
2624

2725
public override Argument[] ExpectedArguments { get; } =
2826
[

Example Scripts/chaosCoin.ser

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if $effect is 3
4747
*room = @evPlayer -> roomRef
4848

4949
# explode player if he isnt in a room
50-
if {ValidRef *room} is false
50+
if {*room -> isInvalid}
5151
Explode @evPlayer
5252
stop
5353
end

Example Scripts/rave.ser

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# confirm that @sender variable was created
2-
if {VarExists @sender} == false
2+
if {VarExists @sender} is false
33
Reply "you need to run this script through remote admin!"
44
stop
55
end
66

77
# the values for the rave
8-
$duration = .5s
8+
$dur = .5s
99
*room = @sender -> roomRef
1010

1111
# verify that the player is in a room
12-
if {ValidRef *room} is false
12+
if {*room -> isInvalid}
1313
Reply "you need to be in a room!"
1414
stop
1515
end
1616

1717
# changing colors for the room
1818
repeat 20
19-
TransitionLightColor *room #ff0000ff $duration
20-
wait $duration
19+
TransitionLightColor *room #ff0000ff $dur
20+
wait $dur
2121

22-
TransitionLightColor *room #00ff00ff $duration
23-
wait $duration
22+
TransitionLightColor *room #00ff00ff $dur
23+
wait $dur
2424

25-
TransitionLightColor *room #0000ffff $duration
26-
wait $duration
25+
TransitionLightColor *room #0000ffff $dur
26+
wait $dur
2727
end
2828

2929
# reset color to default

0 commit comments

Comments
 (0)