Skip to content

Prevent partial smellers from detecting cloaked entities - #5557

Merged
walksanatora merged 8 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-cloaked-entities
Aug 11, 2026
Merged

Prevent partial smellers from detecting cloaked entities#5557
walksanatora merged 8 commits into
ss14Starlight:starlight-devfrom
Sparlight:scent-cloaked-entities

Conversation

@Sparlight

@Sparlight Sparlight commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Short description

Make partial smellers (vulpkanins) unable to detect cloaked entities using stealth.
This was an unintended feature for partial smellers.

Why we need to add this

The scent system was designed to do things like catching cloaked entities. I want scent perception to be a strong pull to the future K9 implementation.
However, giving this to vulps has presented periodic balance concerns when it comes to this.
Recently, I've noticed umbrae vampires and other cloaked antags being immediately outed by their scent trail by vulpkanin security. That's not exactly what we want out of the scent system. It's okay for the K9 to do because there's gonna be like one of them and their ability set will be limited. But for anyone to roll vulp and invalidate the entire stealth kit is unhealthy.

Media (Video/Screenshots)

2026-08-08.09-12-01.1.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: Partial smellers (vulpkanins) can no longer detect scent emissions from cloaked entities.

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

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Summary

Vulpulkanin partial scent perception no longer detects scent markers emitted by cloaked entities.

The server records cloaking state on new and merged scent markers. The client hides partial-perception markers when WasCloaked is set. This prevents cloaked antagonists from being detected through scent.

Notable changes

  • Added networked WasCloaked to ScentMarkerComponent.
  • Added stealth visibility checks during scent emission and merging.
  • Updated partial scent tracking to hide cloaked markers.
  • Added the requested media and changelog entry.

Risk areas

  • The cloaking state is captured when the scent marker is emitted or merged.
  • Changes to stealth thresholds could affect which scent markers are hidden.
  • Existing scent pooling and network synchronization must preserve WasCloaked correctly.

Guideline gaps

No concrete gap is visible from the available PR context.

Walkthrough

Scent markers now record whether their source was cloaked when emitted or merged. Partial perceivers hide markers marked WasCloaked.

Changes

Scent cloaking

Layer / File(s) Summary
Capture cloaking state
Content.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs, Content.Server/_Starlight/Scent/Systems/ScentSystem.cs
ScentMarkerComponent adds the networked WasCloaked field. ScentSystem determines cloaking from enabled stealth visibility and stores the state for new and merged markers.
Filter cloaked markers
Content.Client/_Starlight/Scent/Systems/ScentTrackingSystem.cs
ApplyFilter hides cloaked markers from Partial perceivers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SourceEntity
  participant ScentSystem
  participant ScentMarkerComponent
  participant ScentTrackingSystem
  SourceEntity->>ScentSystem: Provide stealth visibility
  ScentSystem->>ScentMarkerComponent: Store WasCloaked
  ScentMarkerComponent->>ScentTrackingSystem: Synchronize marker state
  ScentTrackingSystem->>ScentTrackingSystem: Hide marker for Partial perceivers
Loading

Possibly related PRs

Suggested reviewers: redmushie

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the change, its gameplay rationale, and its effect on partial smellers detecting cloaked entities.
Title check ✅ Passed The title clearly and concisely summarizes the main change for partial smellers and cloaked entities.
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: 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.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs`:
- Around line 32-35: Replace the `//` comment above the public `WasCloaked`
field in `ScentMarkerComponent` with a `/// <summary>` XML documentation block
that preserves its description of whether the emitter was cloaked at emission
time.
🪄 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: 9ce2040e-8e9e-46ef-863c-0de5ca5d0823

📥 Commits

Reviewing files that changed from the base of the PR and between 6bab688 and 987e8ea.

📒 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.Shared/_Starlight/Scent/Components/ScentMarkerComponent.cs Outdated
@Sparlight

Copy link
Copy Markdown
Contributor Author

damn coderabbit fussy over proper xml docstring summaries, it's fixed now

@Sparlight

Copy link
Copy Markdown
Contributor Author
image got around to running tests locally.

It's a flaky test. Closing and reopening to re-run CI.

@Sparlight Sparlight closed this Aug 8, 2026
@Sparlight Sparlight reopened this Aug 8, 2026
@Sparlight

Copy link
Copy Markdown
Contributor Author

Added missing media, ready for review

@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/Medical/Surgery/OrganSystem.cs`:
- Around line 76-98: Remove the functional organ implantation and extraction
changes from this PR, including the fresh component creation and removal logic
in the relevant surgery lifecycle methods. Revert these methods to their
pre-change behavior and leave the organ lifecycle work for a separate change,
keeping this PR limited to cloaked scent perception.
- Around line 76-98: Track the fresh components successfully added by each organ
during installation, rather than relying only on component types. Update
OnFunctionalOrganExtracted to remove and update only those recorded instances,
preserving pre-existing body or other-organ components; maintain the existing
EntityManager lifecycle operations and clear the tracking data after extraction.
🪄 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: bb9f52e6-4439-48ac-a221-53e5a3374a58

📥 Commits

Reviewing files that changed from the base of the PR and between e0d7983 and 6682d59.

📒 Files selected for processing (1)
  • Content.Server/_Starlight/Medical/Surgery/OrganSystem.cs

Comment thread Content.Server/_Starlight/Medical/Surgery/OrganSystem.cs Outdated
@Sparlight

Copy link
Copy Markdown
Contributor Author

aw hell I put this on the WRONG branch, this was meant for the olfactory implant branch

walksanatora
walksanatora previously approved these changes Aug 10, 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 10, 2026
@walksanatora
walksanatora added this pull request to the merge queue Aug 10, 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 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

Copy link
Copy Markdown
Contributor

Content + Integration Test Results

Summary:

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️
1681 1661 0 20

Failed Tests:

No failed tests ✨

Github Test Reporter by CTRF 💚

@Sparlight
Sparlight requested a review from walksanatora August 10, 2026 23:43
@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 10, 2026
@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 11, 2026
@walksanatora
walksanatora added this pull request to the merge queue Aug 11, 2026
Merged via the queue into ss14Starlight:starlight-dev with commit 80bfcbb Aug 11, 2026
20 checks passed
starlightgithub Bot added a commit that referenced this pull request Aug 11, 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