|
1 | | -using JetBrains.Annotations; |
| 1 | +using CustomPlayerEffects; |
| 2 | +using JetBrains.Annotations; |
2 | 3 | using LabApi.Features.Wrappers; |
3 | 4 | using PlayerRoles; |
4 | 5 | using PlayerRoles.FirstPersonControl.Thirdperson.Subcontrollers; |
@@ -67,6 +68,8 @@ public enum PlayerProperty |
67 | 68 | HumeShield, |
68 | 69 | MaxHumeShield, |
69 | 70 | HumeShieldRegenRate, |
| 71 | + Effects, |
| 72 | + EffectReferences, |
70 | 73 | GroupName, |
71 | 74 | PositionX, |
72 | 75 | PositionY, |
@@ -94,7 +97,7 @@ public enum PlayerProperty |
94 | 97 | RelativeY, |
95 | 98 | RelativeZ, |
96 | 99 | IsNpc, |
97 | | - IsDummy, |
| 100 | + IsDummy |
98 | 101 | } |
99 | 102 |
|
100 | 103 | private class Info<T>(Func<Player, T> handler, string? description) |
@@ -126,6 +129,8 @@ private class Info<T>(Func<Player, T> handler, string? description) |
126 | 129 | [PlayerProperty.HumeShield] = new Info<NumberValue>(plr => (decimal)plr.HumeShield, null), |
127 | 130 | [PlayerProperty.MaxHumeShield] = new Info<NumberValue>(plr => (decimal)plr.MaxHumeShield, null), |
128 | 131 | [PlayerProperty.HumeShieldRegenRate] = new Info<NumberValue>(plr => (decimal)plr.HumeShieldRegenRate, null), |
| 132 | + [PlayerProperty.Effects] = new Info<CollectionValue<TextValue>>(plr => new(plr.ActiveEffects.Select(e => e.GetType().Name.ToStaticTextValue())), "Collection of names of active effects"), |
| 133 | + [PlayerProperty.EffectReferences] = new Info<CollectionValue<ReferenceValue<StatusEffectBase>>>(plr => new(plr.ActiveEffects), "Collection of references of active effects"), |
129 | 134 | [PlayerProperty.GroupName] = new Info<StaticTextValue>(plr => plr.GroupName, "The name of the group (like admin or vip)"), |
130 | 135 | [PlayerProperty.PositionX] = new Info<NumberValue>(plr => (decimal)plr.Position.x, null), |
131 | 136 | [PlayerProperty.PositionY] = new Info<NumberValue>(plr => (decimal)plr.Position.y, null), |
|
0 commit comments