Skip to content

Commit 9f66520

Browse files
authored
Auuuugr
1 parent 9bed865 commit 9f66520

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

EffectDisplay/Components/UserEffectDisplayer.cs

+3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ private IEnumerator<float> PlayerEffectShower(Player ply)
9292
{
9393
string name = Plugin.Instance.Config.GetTranslation(type.GetEffectType());
9494
string line = Category(type.GetEffectType());
95+
// Current end time line
9596
line = type.Duration == 0 ? line.Replace("%time%", "inf") : line.Replace("%time%", ((int)type.TimeLeft).ToString());
97+
// Effect duration total
98+
line = type.Duration == 0 ? line.Replace("%duration%", "inf") : line.Replace("%duration%", type.Duration.ToString());
9699
line = line.Replace("%intensity%", type.Intensity.ToString());
97100
line = line.Replace("%type%", name);
98101
output.AppendLine(line);

EffectDisplay/Configs.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class Configs: IConfig
2222
[Description("these lines will be displayed for each effect type separately, allowing you to customize them")]
2323
public Dictionary<string, string> EffectLine { get; set; } = new Dictionary<string, string>()
2424
{
25-
{"Mixed", "<size=12>%effect% is <color=\"purple\">%type% end after %time%" },
26-
{"Positive", "<size=12>%effect% is <color=\"green\">%type% end after %time%" },
27-
{"Negative", "<size=12>%effect% is <color=\"red\">%type% end after %time%" }
25+
{"Mixed", "<size=12>%effect% is <color=\"purple\">%type% end after %time%|%duration%" },
26+
{"Positive", "<size=12>%effect% is <color=\"green\">%type% end after %time%|%duration%" },
27+
{"Negative", "<size=12>%effect% is <color=\"red\">%type% end after %time%|%duration%" }
2828
};
2929

3030
[Description("decomposes the text on the screen to change only to what is processed by align")]
@@ -51,11 +51,12 @@ public class Configs: IConfig
5151
[Description("List of roles for which the effects display will not be displayed (the roles of the dead are ignored)")]
5252
public List<RoleTypeId> IgnoredRoles { get; set; } = new List<RoleTypeId>()
5353
{
54-
54+
RoleTypeId.None,
55+
RoleTypeId.Spectator
5556
};
5657

5758
/// <summary>
58-
/// Return effect name from <see cref="EffectTranslation"/> or <see cref="EffectType"/> as <see cref="string"></see>
59+
/// Return effect name from <see cref="EffectTranslation"/> and if not found in it return <see cref="EffectType"/> as <see cref="string"></see>
5960
/// </summary>
6061
public string GetTranslation(EffectType effectType)
6162
{

0 commit comments

Comments
 (0)