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

Smelling salts behaviour changes + 'Inhaled' trigger #16703

Merged
merged 14 commits into from Nov 5, 2023

Conversation

TDHooligan
Copy link
Contributor

@TDHooligan TDHooligan commented Oct 29, 2023

[CHEMISTRY][FEATURE]

About the PR

When inhaled via an ampoule (using a new 'inhaled' feature specific to them or chemsmoke), Smelling Salts burn out your sinuses for 6 minutes:

  • You are woken up (Removes Drowsy and Passing out, once)
  • If you are weakened, it is removed, burning you for 10 damage (this requires a second party, or rare item)
    • NOTE: this does not affect stunned. ie, stun batons. Or paralysis (fully passed out)
  • You gain 30 max health, decaying linearly over 1 minute.
  • You cannot get these benefits again until the 6 minutes are up.

status effect icons (health bonus active, then the remaining 5 minutes):
image image

Smelling salts no longer has an as-yet-unexplained healing effect between -5~-35 health.

TECHNICAL: Adds a new parameter to ampoules, signifying the contents were inhaled. This still counts as INGEST, but chemicals that care for the parameter can look for it.

Why's this needed?

Smelling salts' main effect right now is as a purgative, I thought it'd be neat to give it some cool unique effects for particularly tense wrestling matches, or fights. Your gang leader KO'ed? crack open an ampoule under their nose.

I set the cooldown as a 'makes sense between wrestling matches' but I think there could be a rationale for further increasing it. The strongest benefits of this are reserved to it being applied externally, though.

Changelog

(u)TDHooligan
(+)Smelling salt ampoules now trade your sinuses for a short, risky consciousness boost.

@boring-cyborg boring-cyborg bot added the C-Sprites Automatically applied on any .dmi or icons folder change label Oct 29, 2023
@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 29, 2023
@keywordlabeler keywordlabeler bot added A-Chemistry Deals with the chemistry system in some way C-Feature A new feature or enhancements to existing features labels Oct 29, 2023
@colossusqw
Copy link
Contributor

I like this a lot, but it gets me thinking, wouldn't it make sense to have a INHALE parameter that differs from INGEST? Like it could be useful for differentiating behavior in smoke and ampoules from behavior in drinking or taking pills.

@TDHooligan
Copy link
Contributor Author

I like this a lot, but it gets me thinking, wouldn't it make sense to have a INHALE parameter that differs from INGEST? Like it could be useful for differentiating behavior in smoke and ampoules from behavior in drinking or taking pills.

as mentioned, this is added via param_list. i dont see a need to completely rewrite chemistry to support more than INGEST/TOUCH considering that INHALE will ultimately be INGEST with extra effects.

@TDHooligan TDHooligan changed the title Smelling salts behaviour changes Smelling salts behaviour changes + 'Inhaled' trigger Oct 30, 2023
@github-actions github-actions bot added the S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict label Nov 1, 2023
Comment on lines 2477 to 2479
var/seconds_left = round(duration/10)
var/cooldown = (maxDuration/10 - benefit_duration)
var/bonusRemaining = max(0,(seconds_left - cooldown)/benefit_duration)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this math could be simplified quite a bit - 1 + (duration - maxDuration) / (benefit_duration SECONDS) is (essentially) equivalent

(Also not actually an issue but swapping from snake_case to camelCase over the course of 3 lines is a little silly)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much codebase swapping :''(

code/modules/status_system/statusEffects.dm Show resolved Hide resolved
@github-actions github-actions bot removed the S-Merge-Conflict Applied and removed when a PR has or no longer has a merge conflict label Nov 4, 2023
@Tarmunora Tarmunora merged commit d0e8a17 into goonstation:master Nov 5, 2023
21 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 5, 2023
@TDHooligan TDHooligan deleted the saltsy branch March 23, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Chemistry Deals with the chemistry system in some way C-Feature A new feature or enhancements to existing features C-Sprites Automatically applied on any .dmi or icons folder change size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants