Fix Voidboots Ability To Lay Down#155
Conversation
📝 WalkthroughWalkthroughA single file refactor consolidates gravity and grid checks into a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 | 🟠 MajorBreaking change for external callers relying on forced lie-down scenarios.
Adding
CanLieDown(uid)toTryLieDownprevents it from forcing an entity to lie down when not on a gravity-supporting grid. However, three callers—TelefragSystem.DoTelefrag,SharedStunSystem.OnKnockInit, andSharedLayingDownSystem.Toggle—invokeTryLieDownwithout 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:
- Be removed if
TryLieDownis meant to force the action,- Be moved to callers so they can decide when to enforce it, or
- 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
📒 Files selected for processing (1)
Content.Shared/_White/Standing/SharedLayingDownSystem.cs
|
Закинуто к Монолиту |
About the PR
Why / Balance
How to test
Media
Requirements
Breaking changes
Changelog
Summary by CodeRabbit