Add seatSetPath and make SitSpec fail-safe#53
Conversation
Add support for resolving seat sets by full hierarchy path (seatSetPath) and expose it on SitAtSeatSet. Change SitSpec to require a positive DurationMinutes (defaults to 60) and to disable the action (and deactivate its GameObject) with a logged warning when a seat set cannot be resolved to prevent NullReferenceExceptions. Update NPCScheduleBuilder API docs and the scheduling/seating registry documentation with examples, resolution order, and failure-handling guidance.
📝 WalkthroughWalkthroughThis PR enhances the Sit scheduling action by introducing optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
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.
🧹 Nitpick comments (1)
S1API/docs/scheduling-system.md (1)
272-272: Minor style improvement for clarity.The static analysis flagged a sentence fragment. Adding "It" as the subject improves readability.
📝 Suggested fix
-- `seatSetName`: GameObject name of the `AvatarSeatSet`. Can be `null` if `seatSetPath` is provided. +- `seatSetName`: GameObject name of the `AvatarSeatSet`. It can be `null` if `seatSetPath` is provided.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@S1API/docs/scheduling-system.md` at line 272, Update the sentence describing `seatSetName` to use a full sentence by adding a subject; change the fragment "Can be `null` if `seatSetPath` is provided." to "It can be `null` if `seatSetPath` is provided." in the `seatSetName` description that references the `AvatarSeatSet` symbol.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@S1API/docs/scheduling-system.md`:
- Line 272: Update the sentence describing `seatSetName` to use a full sentence
by adding a subject; change the fragment "Can be `null` if `seatSetPath` is
provided." to "It can be `null` if `seatSetPath` is provided." in the
`seatSetName` description that references the `AvatarSeatSet` symbol.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c959a2f6-4fa0-435c-a407-6ec85bcce1b3
📒 Files selected for processing (4)
S1API/Entities/Schedule/ActionSpecs/SitSpec.csS1API/Entities/Schedule/NPCScheduleBuilder.csS1API/docs/scheduling-system.mdS1API/docs/seating-registry.md
Add support for resolving seat sets by full hierarchy path (seatSetPath) and expose it on SitAtSeatSet. Change SitSpec to require a positive DurationMinutes (defaults to 60) and to disable the action (and deactivate its GameObject) with a logged warning when a seat set cannot be resolved to prevent NullReferenceExceptions. Update NPCScheduleBuilder API docs and the scheduling/seating registry documentation with examples, resolution order, and failure-handling guidance.
Release Notes
Changes
seatSetPathparameter toSitAtSeatSetmethod, enabling resolution of seat sets via full hierarchy path in addition to name-based lookupLines Changed by Contributor