From bd424b38abb787ea594e4f44ffce3e5f19969654 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:33:18 -0600 Subject: [PATCH] Fix ling blackbox feedback incrementing `changeling_power_purchase` when nothing was purchased (#80480) ## About The Pull Request #80108 added `on_purchase` calls to `regain_powers` as a bugfix, due to some powers having effects ONLY in "purchase". Unfortunately we put blackbox logging in there. So every time `regain_powers` is called, it incremented the tally by one despite the fact that they weren't purchasing anything, they were already purchased. --- code/modules/antagonists/changeling/changeling.dm | 3 ++- code/modules/antagonists/changeling/changeling_power.dm | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 25b58a62d43..eb3714203a8 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -415,7 +415,8 @@ purchased_powers[power_path] = new_action new_action.on_purchase(owner.current) // Grant() is ran in this proc, see changeling_powers.dm. - log_changeling_power("[key_name(owner)] adapted the [new_action] power") + log_changeling_power("[key_name(owner)] adapted the [new_action.name] power") + SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, new_action.name) return TRUE diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index 1e2d54eb456..efbf906809b 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -40,8 +40,6 @@ the same goes for Remove(). if you override Remove(), call parent or else your p */ /datum/action/changeling/proc/on_purchase(mob/user, is_respec) - if(!is_respec) - SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, name) Grant(user)//how powers are added rather than the checks in mob.dm /datum/action/changeling/Trigger(trigger_flags)