Skip to content

Commit 732631b

Browse files
add @AllPlayers and @emptyPlayers for naming convention
1 parent c8a0559 commit 732631b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Code/VariableSystem/VariableIndex.cs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,23 @@ public static void Initialize()
1919
List<PredefinedPlayerVariable> allApiVariables =
2020
[
2121
new("all", Player.ReadyList.ToList, "Other"),
22+
new("allPlayers", Player.ReadyList.ToList, "Other"),
2223
new("alivePlayers", () => Player.ReadyList.Where(plr => plr.IsAlive).ToList(), "Other"),
2324
new("npcPlayers", () => Player.ReadyList.Where(plr => plr.IsNpc).ToList(), "Other"),
24-
new("empty", () => [], "Other")
25+
new("empty", () => [], "Other"),
26+
new("emptyPlayers", () => [], "Other"),
2527
];
2628

2729
allApiVariables.AddRange(
2830
Enum.GetValues(typeof(RoleTypeId))
2931
.Cast<RoleTypeId>()
3032
.Select(roleType =>
3133
{
32-
return new PredefinedPlayerVariable(roleType.ToString().LowerFirst() + "Players",
34+
return new PredefinedPlayerVariable(
35+
roleType.ToString().LowerFirst() + "Players",
3336
() => Player.ReadyList.Where(plr => plr.Role == roleType).ToList(),
34-
"Role");
37+
"Role"
38+
);
3539
}));
3640

3741
allApiVariables.AddRange(
@@ -40,9 +44,11 @@ public static void Initialize()
4044
.Where(zone => zone != FacilityZone.None)
4145
.Select(zone =>
4246
{
43-
return new PredefinedPlayerVariable(zone.ToString().LowerFirst() + "Players",
47+
return new PredefinedPlayerVariable(
48+
zone.ToString().LowerFirst() + "Players",
4449
() => Player.ReadyList.Where(plr => plr.Zone == zone).ToList(),
45-
"Facility zone");
50+
"Facility zone"
51+
);
4652
}));
4753

4854
allApiVariables.AddRange(
@@ -66,9 +72,11 @@ public static void Initialize()
6672
return null;
6773
}
6874

69-
return new PredefinedPlayerVariable(name,
75+
return new PredefinedPlayerVariable(
76+
name,
7077
() => Player.ReadyList.Where(plr => plr.Role.GetTeam() == teamType).ToList(),
71-
"Team");
78+
"Team"
79+
);
7280
})
7381
.OfType<PredefinedPlayerVariable>());
7482

0 commit comments

Comments
 (0)