Skip to content

Scent fixes - #5500

Merged
redmushie merged 9 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-fixes
Aug 5, 2026
Merged

Scent fixes#5500
redmushie merged 9 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-fixes

Conversation

@Sparlight

@Sparlight Sparlight commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Short description

Day one fixes for ScentSystem.

Why we need to add this

Consistent and sensible logic for this system is important.

Media (Video/Screenshots)

(all fixes tested/verified; rollerbed clip shown here)
(also tested making a long dispo loop and verifying no new scent emissions once flushed)
(also tested having a terror spider with attached ScentComponent in dispo pipes)
(also tested replays)

Scents no longer stick to the rollerbed:

Myserver.-.Starlight.2026-08-03.13-26-11.mp4

Scents now only show up if a vent crawler is at a pipe system terminus:

2026-08-03.13-59-11.mp4

Scents now no longer show up in replays:

Starlight.2026-08-03.21-00-32.mp4

Checks

  • I do not require assistance to complete the PR.
  • Before posting/requesting review of a PR, I have verified that the changes work.
  • I have added screenshots/videos of the changes, or this PR does not change in-game mechanics.
  • I affirm that my changes are licensed under the MIT License and grant permission for use in this repository under its conditions.

Changelog

🆑 Sparlight

  • tweak: Dying makes you lose your currently-tracked scent.
  • fix: Scent emissions now no longer get stuck on mechs/rollerbeds.
  • fix: Scent emissions no longer travel down disposal tubes and emit while being disposed.
  • fix: Scent emissions no longer emit from vent-crawling entities unless they are at a vent terminus.
  • fix: Scents no longer appear in replays.

@Sparlight
Sparlight requested a review from a team August 3, 2026 20:02
@github-actions github-actions Bot added Changes: C# S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/S S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Aug 3, 2026
Comment thread Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
@starlightgithub starlightgithub Bot added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Aug 3, 2026
@redmushie redmushie self-assigned this Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The head commit changed during the review from 35c2bcc to 019e19a.

📝 Walkthrough

Walkthrough

Scent markers now record their airtight container. Emission excludes disposed entities and hidden vent-crawl entities. Client tracking uses current containment. Dead smellers lose tracked scent when their mob state changes to Dead.

Changes

Scent lifecycle

Layer / File(s) Summary
Containment-aware scent emission
Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs, Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
Markers replace WasContained with ContainedIn. Emission filters disposed and hidden vent-crawl entities, records airtight containment, and refreshes it during merging.
Current containment marker tracking
Content.Client/_Starlight/Scent/Systems/ScentTrackingSystem.cs
Markers are hidden without a local SmellerComponent. Visibility, enclosure comparison, and marker sizing use ContainedIn.
Dead smeller cleanup
Content.Shared/_Starlight/Scent/Systems/SharedScentSystem.cs
Tracked scent is cleared when a smeller becomes Dead.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Entity
  participant ScentSystem
  participant ScentMarkerComponent
  Entity->>ScentSystem: Emit scent
  ScentSystem->>ScentSystem: Check disposal and hidden vent-crawl state
  ScentSystem->>ScentSystem: GetAirtightContainer
  ScentSystem->>ScentMarkerComponent: SpawnAtPosition and set ContainedIn
Loading

Suggested reviewers: redmushie

🚥 Pre-merge checks | ✅ 6 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
No Magic Numbers ⚠️ Warning The scent fixes are well targeted, but the systems still use un-named thresholds: 8, 360, 0.85f, 0.1f, and freshness factors 4f/2f/3f. Extract scent-ID length, fade minimum, hue range, saturation, and freshness thresholds into clearly named shared or system constants.
Avoid Service Locator ❓ Inconclusive The repository state requires parent comparison to distinguish pre-existing service resolution from code introduced by this pull request. No verdict yet.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the pull request as a set of scent-related fixes and matches the main changes.
Description check ✅ Passed The description accurately summarizes the scent fixes, testing performed, and gameplay effects.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Hardcoded Ecs Parameters ✅ Passed The PR adds no hardcoded tuning values; it uses existing component state and the networked [DataField] ContainedIn field, while configurable scent values remain in ScentComponent.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Content.Server/_Starlight/Scent/Systems/ScentSystem.cs`:
- Line 451: Update the marker creation in the scent emission flow around
SpawnAtPosition to pass the map-space position from
ToMapCoordinates(xform.Coordinates).Position instead of EntityCoordinates.
Preserve ContainedIn solely as emission metadata and do not attach the spawned
marker to the emitter’s parent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: b8fb4102-d6a6-4261-b24f-72702a89ca2e

📥 Commits

Reviewing files that changed from the base of the PR and between cfc147e and c90df0e.

📒 Files selected for processing (4)
  • Content.Client/_Starlight/Scent/Systems/ScentTrackingSystem.cs
  • Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
  • Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs
  • Content.Shared/_Starlight/Scent/Systems/SharedScentSystem.cs

Comment thread Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
@Sparlight
Sparlight requested a review from redmushie August 3, 2026 20:27
@github-actions github-actions Bot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. and removed S: Awaiting Changes Status: Changes are required before another review can happen labels Aug 3, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 4, 2026
redmushie
redmushie previously approved these changes Aug 4, 2026
@starlightgithub starlightgithub Bot added S: Approved Status: Reviewed and approved by at least one maintainer or dev; a PR may require another approval. and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Aug 4, 2026
@redmushie
redmushie added this pull request to the merge queue Aug 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 4, 2026
@github-actions github-actions Bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Sparlight
Sparlight dismissed stale reviews from redmushie and coderabbitai[bot] via 6ba8d59 August 4, 2026 11:30
@github-actions github-actions Bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Aug 4, 2026
@Sparlight
Sparlight requested a review from redmushie August 4, 2026 11:31
@github-actions github-actions Bot added the S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. label Aug 4, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 4, 2026
@Sparlight

Copy link
Copy Markdown
Contributor Author
image

Ran the tests locally, seems like we ran into a shard 5 flake. Gonna try rerunning CI tests.

@starlightgithub starlightgithub Bot removed the S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. label Aug 5, 2026
@redmushie
redmushie added this pull request to the merge queue Aug 5, 2026
Merged via the queue into ss14Starlight:starlight-dev with commit 7e3675c Aug 5, 2026
23 checks passed
starlightgithub Bot added a commit that referenced this pull request Aug 5, 2026
bynddark8 pushed a commit to bynddark8/space-station-14 that referenced this pull request Aug 6, 2026
## Short description
<!-- What do you propose to change with your PR? -->
Day one fixes for ScentSystem.

## Why we need to add this
<!-- What is the reason for adding these changes? Please post links to
Discussions as well as Bug Reports here. Please describe how this will
change the game balance. -->
Consistent and sensible logic for this system is important.

## Media (Video/Screenshots)
<!--
If your PR contains in-game changes you must provide screenshots/videos
of the changes.
-->
(all fixes tested/verified; rollerbed clip shown here)
(also tested making a long dispo loop and verifying no new scent
emissions once flushed)
(also tested having a terror spider with attached ScentComponent in
dispo pipes)
(also tested replays)

Scents no longer stick to the rollerbed:


https://github.com/user-attachments/assets/7721f942-6e80-4d85-a00e-81c0f0375c3b

Scents now only show up if a vent crawler is at a pipe system terminus:


https://github.com/user-attachments/assets/2235da14-b9ad-4988-9ce7-333c45ca1467

Scents now no longer show up in replays:


https://github.com/user-attachments/assets/03f745c2-6a00-4fcd-a5af-f49f07c0d88f

## Checks
<!-- check boxes for faster reviewing of your PR -->
- [X] I do not require assistance to complete the PR.
- [X] Before posting/requesting review of a PR, I have verified that the
changes work.
- [X] I have added screenshots/videos of the changes, or this PR does
not change in-game mechanics.
- [X] I affirm that my changes are licensed under the [MIT
License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT)
and grant permission for use in this repository under its conditions.

**Changelog**

:cl: Sparlight
- tweak: Dying makes you lose your currently-tracked scent.
- fix: Scent emissions now no longer get stuck on mechs/rollerbeds.
- fix: Scent emissions no longer travel down disposal tubes and emit
while being disposed.
- fix: Scent emissions no longer emit from vent-crawling entities unless
they are at a vent terminus.
- fix: Scents no longer appear in replays.
<!--
If you want the players to know about changes made in this PR, specify
them using the template outside the comment. Short and informative.

:cl: STARLIGHT TEAM
- add: Added Starlight.
- remove: Removed SS13.
- tweak: Changed SS14.
- fix: Fixed Rinary.
-->
bynddark8 pushed a commit to bynddark8/space-station-14 that referenced this pull request Aug 6, 2026
Limerent-Sun pushed a commit to Limerent-Sun/BlimpufStation that referenced this pull request Aug 7, 2026
## Short description
<!-- What do you propose to change with your PR? -->
Day one fixes for ScentSystem.

## Why we need to add this
<!-- What is the reason for adding these changes? Please post links to
Discussions as well as Bug Reports here. Please describe how this will
change the game balance. -->
Consistent and sensible logic for this system is important.

## Media (Video/Screenshots)
<!--
If your PR contains in-game changes you must provide screenshots/videos
of the changes.
-->
(all fixes tested/verified; rollerbed clip shown here)
(also tested making a long dispo loop and verifying no new scent
emissions once flushed)
(also tested having a terror spider with attached ScentComponent in
dispo pipes)
(also tested replays)

Scents no longer stick to the rollerbed:


https://github.com/user-attachments/assets/7721f942-6e80-4d85-a00e-81c0f0375c3b

Scents now only show up if a vent crawler is at a pipe system terminus:


https://github.com/user-attachments/assets/2235da14-b9ad-4988-9ce7-333c45ca1467

Scents now no longer show up in replays:


https://github.com/user-attachments/assets/03f745c2-6a00-4fcd-a5af-f49f07c0d88f

## Checks
<!-- check boxes for faster reviewing of your PR -->
- [X] I do not require assistance to complete the PR.
- [X] Before posting/requesting review of a PR, I have verified that the
changes work.
- [X] I have added screenshots/videos of the changes, or this PR does
not change in-game mechanics.
- [X] I affirm that my changes are licensed under the [MIT
License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT)
and grant permission for use in this repository under its conditions.

**Changelog**

:cl: Sparlight
- tweak: Dying makes you lose your currently-tracked scent.
- fix: Scent emissions now no longer get stuck on mechs/rollerbeds.
- fix: Scent emissions no longer travel down disposal tubes and emit
while being disposed.
- fix: Scent emissions no longer emit from vent-crawling entities unless
they are at a vent terminus.
- fix: Scents no longer appear in replays.
<!--
If you want the players to know about changes made in this PR, specify
them using the template outside the comment. Short and informative.

:cl: STARLIGHT TEAM
- add: Added Starlight.
- remove: Removed SS13.
- tweak: Changed SS14.
- fix: Fixed Rinary.
-->
Limerent-Sun pushed a commit to Blimpuf-Station/BlimpufStation that referenced this pull request Aug 7, 2026
## Short description
<!-- What do you propose to change with your PR? -->
Day one fixes for ScentSystem.

## Why we need to add this
<!-- What is the reason for adding these changes? Please post links to
Discussions as well as Bug Reports here. Please describe how this will
change the game balance. -->
Consistent and sensible logic for this system is important.

## Media (Video/Screenshots)
<!--
If your PR contains in-game changes you must provide screenshots/videos
of the changes.
-->
(all fixes tested/verified; rollerbed clip shown here)
(also tested making a long dispo loop and verifying no new scent
emissions once flushed)
(also tested having a terror spider with attached ScentComponent in
dispo pipes)
(also tested replays)

Scents no longer stick to the rollerbed:

https://github.com/user-attachments/assets/7721f942-6e80-4d85-a00e-81c0f0375c3b

Scents now only show up if a vent crawler is at a pipe system terminus:

https://github.com/user-attachments/assets/2235da14-b9ad-4988-9ce7-333c45ca1467

Scents now no longer show up in replays:

https://github.com/user-attachments/assets/03f745c2-6a00-4fcd-a5af-f49f07c0d88f

## Checks
<!-- check boxes for faster reviewing of your PR -->
- [X] I do not require assistance to complete the PR.
- [X] Before posting/requesting review of a PR, I have verified that the
changes work.
- [X] I have added screenshots/videos of the changes, or this PR does
not change in-game mechanics.
- [X] I affirm that my changes are licensed under the [MIT
License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT)
and grant permission for use in this repository under its conditions.

**Changelog**

:cl: Sparlight
- tweak: Dying makes you lose your currently-tracked scent.
- fix: Scent emissions now no longer get stuck on mechs/rollerbeds.
- fix: Scent emissions no longer travel down disposal tubes and emit
while being disposed.
- fix: Scent emissions no longer emit from vent-crawling entities unless
they are at a vent terminus.
- fix: Scents no longer appear in replays.
<!--
If you want the players to know about changes made in this PR, specify
them using the template outside the comment. Short and informative.

:cl: STARLIGHT TEAM
- add: Added Starlight.
- remove: Removed SS13.
- tweak: Changed SS14.
- fix: Fixed Rinary.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes: C# S: Approved Status: Reviewed and approved by at least one maintainer or dev; a PR may require another approval. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants