Skip to content

Commit c16cd96

Browse files
2 parents 0dea6a2 + e4aacad commit c16cd96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Code/TokenSystem/Tokens/ExpressionTokens/PlayerExpressionToken.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public enum PlayerProperty
6363
RelativeX,
6464
RelativeY,
6565
RelativeZ,
66+
IsNpc,
67+
IsDummy,
6668
}
6769

6870
public abstract class Info
@@ -172,6 +174,8 @@ public class Info<T>(Func<Player, T> handler, string? description) : Info
172174
[PlayerProperty.RelativeX] = new Info<NumberValue>(plr => (decimal)plr.RelativeRoomPosition().x, "Returns the player's x relative to the current room or 0 if in no room"),
173175
[PlayerProperty.RelativeY] = new Info<NumberValue>(plr => (decimal)plr.RelativeRoomPosition().y, "Returns the player's y relative to the current room or 0 if in no room"),
174176
[PlayerProperty.RelativeZ] = new Info<NumberValue>(plr => (decimal)plr.RelativeRoomPosition().z, "Returns the player's z relative to the current room or 0 if in no room"),
177+
[PlayerProperty.IsNpc] = new Info<BoolValue>(plr => plr.IsNpc, "True if it's a player without any client connected to it"),
178+
[PlayerProperty.IsDummy] = new Info<BoolValue>(plr => plr.IsDummy, null)
175179
};
176180

177181
protected override IParseResult InternalParse(BaseToken[] tokens)

0 commit comments

Comments
 (0)