diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52d9dd2..769b013 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,8 @@ jobs: run: tcli publish --config-path ./ClientUI/thunderstore.toml --token ${{ secrets.THUNDERSTORE_KEY }} --file ./dist/XPRising-ClientUI-${RELEASE_TAG:1}.zip update_latest_release: + # only run if the thunderstore release was successful + needs: release_on_thunderstore # required to allow release to be updated permissions: contents: write @@ -60,6 +62,6 @@ jobs: fetch-depth: 0 - name: Set release as latest - run: gh release edit ${{ env.RELEASE_TAG }} --draft=false --latest + run: gh release edit ${{ env.RELEASE_TAG }} --draft=false --prerelease=false --latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e486df..a8876ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. +## [0.5.1] - 2025-08-02 + +### Changed + +- Unknown/unhandled attacks/spells now only get logged when mastery debugging is enabled, instead of getting logged by default. + ## [0.5.0] - 2025-07-27 ### Added diff --git a/XPRising/Systems/WeaponMasterySystem.cs b/XPRising/Systems/WeaponMasterySystem.cs index bb5bea3..dd11924 100644 --- a/XPRising/Systems/WeaponMasterySystem.cs +++ b/XPRising/Systems/WeaponMasterySystem.cs @@ -40,7 +40,7 @@ public static void HandleDamageEvent(Entity sourceEntity, Entity targetEntity, f } if (uncertain) { - LogDamage(damageOwner, targetEntity, abilityGuid, change, divisor, "NEEDS SUPPORT: ", true); + LogDamage(damageOwner, targetEntity, abilityGuid, change, divisor, "NEEDS SUPPORT: ", LogLevel.Warning); return; } @@ -129,14 +129,14 @@ public static MasteryType WeaponToMasteryType(WeaponType weapon) } } - private static void LogDamage(Entity source, Entity target, PrefabGUID abilityPrefab, float change, float divisor, string prefix = "", bool forceLog = false) + private static void LogDamage(Entity source, Entity target, PrefabGUID abilityPrefab, float change, float divisor, string prefix = "", LogLevel level = LogLevel.Info) { - Plugin.Log(Plugin.LogSystem.Mastery, LogLevel.Info, + Plugin.Log(Plugin.LogSystem.Mastery, level, () => $"{prefix}{GetName(source, out _)} -> " + $"({DebugTool.GetPrefabName(abilityPrefab)}) -> " + $"{GetName(target, out _)}" + - $"[diff: {change}, div: {divisor}, val: {change/divisor}]", forceLog); + $"[diff: {change}, div: {divisor}, val: {change/divisor}]"); } private static string GetName(Entity entity, out bool isUser) diff --git a/XPRising/Utils/MasteryHelper.cs b/XPRising/Utils/MasteryHelper.cs index 8dee657..aee45e1 100644 --- a/XPRising/Utils/MasteryHelper.cs +++ b/XPRising/Utils/MasteryHelper.cs @@ -389,7 +389,7 @@ public static GlobalMasterySystem.MasteryType GetMasteryTypeForEffect(int effect ignore = true; return GlobalMasterySystem.MasteryType.None; case Effects.AB_Vampire_Withered_SlowAttack_Hit: - uncertain = true; + ignore = true; return GlobalMasterySystem.MasteryType.None; }