Skip to content

Commit

Permalink
Allow to disable critical effects descriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
CptMoore committed Dec 20, 2023
1 parent e0dade4 commit 7e9c901
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/Features/CriticalEffects/CriticalEffectsCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ protected virtual UnitType GetUnitType()

public void OnLoaded(Dictionary<string, object> values)
{
if (!CriticalEffectsFeature.settings.DescriptionEnabled)
{
return;
}

var descriptions = new List<string>();

string? GetEffectDescription(string effectId)
Expand Down
1 change: 1 addition & 0 deletions source/Features/CriticalEffects/CriticalEffectsSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class CriticalEffectsSettings : ISettings
public ComponentType[] DefaultMaxCritsComponentTypes { get; set; } = {ComponentType.Weapon, ComponentType.AmmunitionBox, ComponentType.JumpJet, ComponentType.Upgrade};
public string DefaultMaxCritsComponentTypesDescription => "For which types the default max crits are applied.";

public bool DescriptionEnabled = true;
public string DescriptionIdentifier = "Criticals";
public string DescriptionTemplate = "Critical Effects:<b><color=#F79B26FF>\r\n{{elements}}</color></b>\r\n";
public string ElementTemplate = " <indent=10%><line-indent=-5%><line-height=65%>{{element}}</line-height></line-indent></indent>\r\n";
Expand Down

0 comments on commit 7e9c901

Please sign in to comment.