Skip to content

Allow partial smellers to detect bodies in closed containers - #5570

Merged
walksanatora merged 3 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-partialsmellers-containers
Aug 10, 2026
Merged

Allow partial smellers to detect bodies in closed containers#5570
walksanatora merged 3 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-partialsmellers-containers

Conversation

@Sparlight

Copy link
Copy Markdown
Contributor

Short description

Based on a request from SnakeNuke. Seemed reasonable.
Partial smellers (vulpkanins) can now detect bodies inside closed containers, with a faint scent emission.
This primarily is intended to help with paramedic work, and aid in discoverability of corpses hidden in maints.

Why we need to add this

Putting a corpse in a locker is basically round removal. Bodies in closets can be detected by full smellers already; but we're doing a carve-out for corpses being detected in closets by partial smellers. Makes sense for a corpse to smell bad anyway.

image image image image image image

Media (Video/Screenshots)

Sparlight.s.Dev.Server.-.Starlight.2026-08-08.11-14-20.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

  • add: Partial smellers can now faintly perceive the scent emissions of corpses inside closed containers.

@Sparlight
Sparlight requested a review from a team August 8, 2026 17:23
@github-actions github-actions Bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/XS S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. Changes: C# labels Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 15fda947-d765-4dc5-bbcc-5542d1f48ebc

📥 Commits

Reviewing files that changed from the base of the PR and between ce399d0 and f68f2ec.

📒 Files selected for processing (1)
  • Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs

📝 Walkthrough

Summary

Partial smellers can detect scent markers from corpses inside closed containers. Non-corpse scent markers remain hidden from partial smellers.

This supports paramedic and K9 gameplay. It helps players find corpses hidden in lockers and maintenance areas before they rot.

Changes

  • Added the networked, serialized WasDead flag to ScentMarkerComponent.
  • Recorded the emitter's dead state when the server creates or refreshes scent markers.
  • Updated partial-smeller filtering to reveal contained markers only when WasDead is true.
  • Limited changes to Starlight scent systems. No upstream files changed.

Risk areas

  • Partial smellers can now detect corpse scent through closed containers.
  • The system must not reveal contained scent from living entities or other non-corpse emitters.
  • Existing full-smeller detection remains unchanged.
  • Network serialization must preserve WasDead between the server and client.
  • The dead-state snapshot can become stale if an emitter changes state after a marker is emitted or refreshed.

Guideline gaps

None identified from the available PR context.

Walkthrough

Scent markers now record whether their emitter was dead at emission or refresh time. Partial perception no longer hides contained markers marked WasDead.

Changes

Scent marker visibility

Layer / File(s) Summary
Record emitter death state
Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs, Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
ScentMarkerComponent adds the networked WasDead field. New and refreshed markers set the field from the emitter’s current mob state.
Apply death state to filtering
Content.Client/_Starlight/Scent/Systems/ScentTrackingSystem.cs
Partial-perception filtering hides contained markers only when WasDead is false.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: redmushie

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: partial smellers can detect bodies inside closed containers.
Description check ✅ Passed The description directly explains the corpse-detection change, its intended paramedic use, and its gameplay rationale.
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.

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: 2

🤖 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 459: Update both IsDead calls in ScentSystem, including the assignments
to markerComp.WasDead at the referenced locations, to use the injected
MobStateSystem dependency and its overload that accepts the resolved
MobStateComponent; do not reference an undeclared MobState receiver.

In `@Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs`:
- Around line 31-34: Replace the line comment above ScentMarkerComponent.WasDead
with XML documentation describing whether the emitter was dead when the scent
was emitted or when the marker was last refreshed through merging. Keep the
documentation accurate for both initial emission and ScentSystem merge updates.
🪄 Autofix

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

Review profile: CHILL

Plan: Pro Plus

Run ID: f60e266a-e422-4817-8820-f757868637b2

📥 Commits

Reviewing files that changed from the base of the PR and between e22931e and ce399d0.

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

Comment thread Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
Comment thread Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs
@github-actions github-actions Bot added size/S and removed size/XS labels Aug 9, 2026
@Sparlight

Copy link
Copy Markdown
Contributor Author

@coderabbitai re-review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@Sparlight I will re-review the current changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 10, 2026
@walksanatora
walksanatora added this pull request to the merge queue Aug 10, 2026
Merged via the queue into ss14Starlight:starlight-dev with commit 167fefc Aug 10, 2026
23 checks passed
starlightgithub Bot added a commit that referenced this pull request Aug 10, 2026
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