Skip to content

Commit

Permalink
ModBuffIcon clearer properties
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Jan 28, 2023
1 parent daad0bf commit c3cc965
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion BloonsTD6 Mod Helper/LATEST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fixed ModSettingHotkeys to allow easier overlap with vanilla hotkeys
- Fixed filtering mods menu empty page
- Fixes for ModSettingEnums (thanks Baydock!)
- Fixes for ModSettingEnums (thanks Baydock!)
- Added BuffLocsName and BuffIconName properties to ModBuffIcons for clarity when manually applying them
18 changes: 14 additions & 4 deletions Shared/Api/Display/ModBuffIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public abstract class ModBuffIcon : NamedModContent
/// <param name="model">The support model to apply to</param>
public void ApplyTo(SupportModel model)
{
model.buffLocsName = Icon;
model.buffIconName = Id;
model.buffLocsName = BuffLocsName;
model.buffIconName = BuffIconName;
model.isGlobal = GlobalRange;
model.maxStackSize = MaxStackSize;
model.onlyShowBuffIfMutated = OnlyShowBuffIfMutated;
Expand All @@ -77,11 +77,21 @@ public void ApplyTo(SupportModel model)
/// <param name="model">The support model to apply to</param>
public void ApplyTo(TowerBehaviorBuffModel model)
{
model.buffLocsName = Icon;
model.buffIconName = Id;
model.buffLocsName = BuffLocsName;
model.buffIconName = BuffIconName;
model.isGlobalRange = GlobalRange;
model.maxStackSize = MaxStackSize;
}

/// <summary>
/// What should go in a Model's buffLocsName field
/// </summary>
public string BuffLocsName => Icon;

/// <summary>
/// What should go in a Model's buffIconName field
/// </summary>
public string BuffIconName => Id;

/// <inheritdoc />
public override void Register()
Expand Down
2 changes: 1 addition & 1 deletion Shared/ModHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class ModHelper
#region ModHelperData for the Mod Helper

internal const string Name = "BloonsTD6 Mod Helper";
internal const string Version = "3.1.2";
internal const string Version = "3.1.3";
internal const string RepoOwner = "gurrenm3";
internal const string RepoName = "BTD-Mod-Helper";
internal const string Description = "A powerful and easy to use API for modding BTD6. Also the mod that is allowing all of this UI to happen right now :P";
Expand Down

0 comments on commit c3cc965

Please sign in to comment.