Skip to content

New Trait: Hay Fever - #266

Open
battlecruiser12 wants to merge 4 commits into
funky-station:masterfrom
battlecruiser12:hayfever
Open

New Trait: Hay Fever#266
battlecruiser12 wants to merge 4 commits into
funky-station:masterfrom
battlecruiser12:hayfever

Conversation

@battlecruiser12

Copy link
Copy Markdown

About the PR

Adds a new trait called "Hay Fever", which causes the player to periodically have allergic reactions. The possible allergic reactions are itchy nose, itchy eyes, sneeze, and sneeze attack. Itchy nose and itchy eyes are purely popup-based, while sneeze and sneeze attack also causes the character to sneeze.

The code is heavily based on the Smoker trait from Funky, the PR for which is under the MIT license: funky-station/funky-station#3046

Why / Balance

Much like the smoker trait which the code is heavily based on, hay fever adds a new option for adding flavor to your character. While hay fever does not directly affect gameplay, it can lead to some funny moments, such as:

  • A character hiding from an active threat suddenly starts sneezing.
  • A chef or bartender sneezing while serving someone.
  • A doctor sneezing in a patient's face while performing a medical exam.

Technical details

Adds the HayFeverComponent.cs and its system, HayFeverSystem.cs. At a configurable interval, the system rolls a random number to determine if an allergic reaction will happen, and if one happens, which one.

Test plan

  1. Create a character with the Hay Fever trait and check that the HayFeverComponent is applied correctly at round start.
  2. Observe the four different allergic reactions that can occur, as well as check that the variables are updated correctly. (If you edit the ServerComponent under View Variables to make ReactionInterval significantly lower, you won't have to wait as long for things to happen.)

Media

The video was recorded with the ReactionInterval significantly reduced.

hayfever.mp4

Requirements

  • I have read and am following the Macrocosm Pull Request Conventions.
  • I have tested this pull request and written instructions on how to test it
  • I have added media to this PR or it does not require an in-game showcase.
  • If I am porting something, I have done my best to respect the appropriate licenses associated with the presented changes.

License

MIT

Breaking changes

Changelog

🆑 battlecruiser12

  • add: Added the Hay Fever trait, which periodically causes itchy nose, eyes, and sneezing.

@battlecruiser12

Copy link
Copy Markdown
Author

Turns out Rider adding the files to git as I make them doesn't actually include the code itself in the commit. I will fix this.

@github-actions github-actions Bot added size/M and removed size/S labels Aug 4, 2026

@pirakaplant pirakaplant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As the maintainer responsible for traits, I like this one. It's simple but flavourful. I tested this and it works.

However, I do have a few critiques concerning the code. It all works, but there's room for improvement that I noticed.

Comment thread Content.Server/_Funkystation/Traits/Assorted/HayFeverSystem.cs Outdated
Comment thread Content.Server/_Funkystation/Traits/Assorted/HayFeverSystem.cs Outdated
Comment thread Content.Server/_Funkystation/Traits/Assorted/HayFeverSystem.cs
Comment thread Content.Server/_Funkystation/Traits/Assorted/HayFeverSystem.cs Outdated
Comment thread Content.Server/_Funkystation/Traits/Assorted/HayFeverSystem.cs Outdated
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.

2 participants