Skip to content

Fix Voidboots Ability To Lay Down#155

Closed
Lokilife wants to merge 1 commit intospace-exodus:mainfrom
Lokilife:fix-voidboots
Closed

Fix Voidboots Ability To Lay Down#155
Lokilife wants to merge 1 commit intospace-exodus:mainfrom
Lokilife:fix-voidboots

Conversation

@Lokilife
Copy link
Copy Markdown

@Lokilife Lokilife commented Mar 24, 2026

About the PR

Why / Balance

How to test

Media

Requirements

  • I have read and am following the Pull Request and Changelog Guidelines.
  • I have added media to this PR or it does not require an ingame showcase.
  • I can confirm this PR contains no AI-generated content, and did not use any AI-generated content.

Breaking changes

Changelog

Summary by CodeRabbit

  • Bug Fixes
    • Refined standing and lying down system behavior across different environmental conditions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

A single file refactor consolidates gravity and grid checks into a new CanLieDown() predicate, applied across ToggleStanding, OnParentChanged, and TryLieDown methods to centralize lying-down validation logic.

Changes

Cohort / File(s) Summary
Lying Down Validation Refactor
Content.Shared/_White/Standing/SharedLayingDownSystem.cs
Introduced CanLieDown() helper predicate to consolidate gravity/grid checks previously scattered across ToggleStanding, OnParentChanged, and TryLieDown methods. Updated methods to use the new predicate for consistent validation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop, hop—the checks now unified!
No more scattered gravity and grid,
One helper predicate, clean and bright,
Makes lying down feel just right.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix Voidboots Ability To Lay Down' is specific and directly related to the main changeset. The changes modify the lying-down system to use a new predicate that checks gravity support, which directly addresses the voidboots ability to lay down.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Content.Shared/_White/Standing/SharedLayingDownSystem.cs (1)

149-166: ⚠️ Potential issue | 🟠 Major

Breaking change for external callers relying on forced lie-down scenarios.

Adding CanLieDown(uid) to TryLieDown prevents it from forcing an entity to lie down when not on a gravity-supporting grid. However, three callers—TelefragSystem.DoTelefrag, SharedStunSystem.OnKnockInit, and SharedLayingDownSystem.Toggle—invoke TryLieDown without checking the return value, expecting it to succeed as a forced action:

  • In DoTelefrag (line 26), the telefragged entity remains standing if not on a gravity grid, contradicting the intent of a forced telefrag effect.
  • In OnKnockInit (line 148), a knocked-down entity may not actually lie down in space.
  • In SharedLayingDownSystem.Toggle (line 79), the toggle fails silently without feedback.

The gravity check should either:

  1. Be removed if TryLieDown is meant to force the action,
  2. Be moved to callers so they can decide when to enforce it, or
  3. Be enforced with proper error handling instead of silent failure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7a427a03-1c73-4376-b966-e9b81df2ad7f

📥 Commits

Reviewing files that changed from the base of the PR and between 50d2992 and 826a4f1.

📒 Files selected for processing (1)
  • Content.Shared/_White/Standing/SharedLayingDownSystem.cs

@Lokilife
Copy link
Copy Markdown
Author

Закинуто к Монолиту

@Lokilife Lokilife closed this Mar 24, 2026
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.

1 participant