Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Making the fuck you coupon trigger only once, take two #2392

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#1422
Original PR: tgstation/tgstation#81953

About The Pull Request

So a previous pr attempted to fix the fuck you coupon, by adding 1 to the arguments.

(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.

(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.

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.

(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

🆑 00-Steven
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 (#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]>
@ReezeBL ReezeBL merged commit 1716e4d into master Mar 14, 2024
24 checks passed
@ReezeBL ReezeBL deleted the upstream-mirror-1422 branch March 14, 2024 08:02
AnywayFarus added a commit that referenced this pull request Mar 14, 2024
Iajret pushed a commit that referenced this pull request May 8, 2024
* Quick equip no longer throws balloon alerts (#83117)

## About The Pull Request
Pressing E to quick equip would throw balloon alerts when it iterates
over storage that's full
Especially noticeable on round start engies because their toolbelt gets
checked
## Why It's Good For The Game
Less noise
## Changelog
:cl:
fix: The quick equip 'E' hotkey shouldn't warn if one of your bags is
full anymore
/:cl:

* Quick equip no longer throws balloon alerts

---------

Co-authored-by: Jeremiah <[email protected]>
ReezeBL pushed a commit that referenced this pull request May 9, 2024
* Quick equip no longer throws balloon alerts (#83117)

## About The Pull Request
Pressing E to quick equip would throw balloon alerts when it iterates
over storage that's full
Especially noticeable on round start engies because their toolbelt gets
checked
## Why It's Good For The Game
Less noise
## Changelog
:cl:
fix: The quick equip 'E' hotkey shouldn't warn if one of your bags is
full anymore
/:cl:

* Quick equip no longer throws balloon alerts

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Jeremiah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants