Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Making the fuck you coupon trigger only once, take two (#1422)
* Making the fuck you coupon trigger only once, take two (#81953) ## About The Pull Request So a previous pr attempted to fix the fuck you coupon, by adding 1 to the arguments. ```dm (tgstation/code/modules/cargo/coupon.dm, line 87) cursed.AddComponent(/datum/component/omen, 1) ``` But this was setting the `vessel` rather than the `incidents_left` argument to 1. ```dm (tgstation/code/datums/components/omen.dm, line 20) /datum/component/omen/Initialize(obj/vessel, incidents_left, luck_mod, damage_mod) ``` Moving this argument over one fixes the issue. ```dm cursed.AddComponent(/datum/component/omen, null, 1) ``` However! We're now skipping over the `vessel` value, which is used to burn up a curse's vessel once the curse is expended. Setting this to `src` rather than `null` means the fuck you coupon actually gets 'expended', which I think it better than just using `null` or `incidents_left = 1`. The coupon's useless once it's done, and this way it's cooler anyway. For consistency, we then also add this behaviour to when the coupon gives you a heart attack instead. Then! I noticed there was a _second_ bug with fuck you coupons, where it would stop prematurely if the location wasn't a mob. ```dm (tgstation/code/modules/cargo/coupon.dm, line 80-81) if(!ismob(loc)) return FALSE ``` However, this also happens when you don't have a free hand for it to put the coupon in, and thus entirely negating the curse and just giving you a useless fuck you coupon. We fix this by just adding a `user` argument to `generate`, which it prefers to use when available, and is set to the user ripping off the coupon in the first place. ## Why It's Good For The Game Fixes #81946. As fuck you coupons are pretty much useless after expending their curse, and we have to add the vessel value anyway, I thought it'd be more fitting to add the coupon as the vessel rather than just putting in null. Then, for consistency, I felt it'd be best to make them *also* burn when giving you a heart attack when you already have a curse. Y'know, it's expending the coupon for it's one-time fuck you! Also fixes fuck you coupons not actually applying their curse if you didn't have any free hands for it to put the coupon in when ripping it off. ## Changelog :cl: fix: Fuck you coupons ACTUALLY trigger only once again. As a consequence, they also burn up when expended for their one-time fuck you. fix: Fuck you coupons work regardless of whether you had a free hand or not. /:cl: * Making the fuck you coupon trigger only once, take two --------- Co-authored-by: _0Steven <[email protected]>
- Loading branch information