Skip to content

feature: export voice over function - #1

Open
SaloEater wants to merge 4 commits into
Mirrowel:masterfrom
SaloEater:export_voice_over_func
Open

feature: export voice over function#1
SaloEater wants to merge 4 commits into
Mirrowel:masterfrom
SaloEater:export_voice_over_func

Conversation

@SaloEater

Copy link
Copy Markdown

No description provided.

@coderabbitai

coderabbitai Bot commented Apr 2, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@SaloEater has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 53 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 53 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 56a30fa5-b165-4595-bb25-34f02635d690

📥 Commits

Reviewing files that changed from the base of the PR and between 3e7ffe3 and 1fdda86.

📒 Files selected for processing (2)
  • gamedata/configs/text/eng/ui_st_body_health_system.xml
  • gamedata/scripts/zzz_player_injuries.script
📝 Walkthrough

Walkthrough

Replaced a hardcoded footstep injury probability with a new MCM option chance_damage_on_footstep and moved footstep voice playback into a new global helper play_actor_on_footstep_voice_over(), updating actor_on_footstep to use the config and call the helper.

Changes

Cohort / File(s) Summary
MCM Configuration
gamedata/scripts/zzz_player_injuries_mcm.script
Added chance_damage_on_footstep default = 35 and exposed it as a track slider (min 1, max 100, step 1) in the MCM UI.
Footstep Injury System
gamedata/scripts/zzz_player_injuries.script
Replaced hardcoded probability check with chance_damage_on_footstep (local config read). Extracted inline voice playback into a new global helper play_actor_on_footstep_voice_over(); actor_on_footstep now calls this helper and retains blur/state_cooldown logic.
Localization / UI Text
gamedata/configs/text/eng/ui_st_body_health_system.xml, gamedata/configs/text/rus/ui_st_body_health_system.xml
Added two new string IDs for the MCM label and description: ui_mcm_body_health_system_chance_damage_on_footstep and ui_mcm_body_health_system_chance_damage_on_footstep_desc.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with a curious squeal,
A slider appeared — what a marvelous deal!
Voices tucked tidy in one little lair,
Footsteps now governed by choices laid fair,
Thump, tweak, and hop — joyous bugs beware! 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title references exporting a voice-over function, which is only partially accurate—the PR adds a new MCM configuration option and refactors injury system code, with the voice-over helper function being just one aspect of broader changes. Update the title to reflect the primary change more accurately, such as 'feat: make footstep damage configurable via MCM' or 'feat: add configurable chance for footstep damage', which better captures the main scope.
Description check ⚠️ Warning No description was provided by the author, making it impossible to assess whether the rationale, context, or details about the changes are communicated. Add a pull request description explaining the motivation for the changes, what the new MCM option does, and any related context or testing performed.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 the current code and only fix it if needed.

Inline comments:
In `@gamedata/scripts/zzz_player_injuries.script`:
- Around line 1721-1733: In play_actor_on_footstep_voice_over(), sound_play is
declared local only inside the if branch so the else branch sees nil; move the
declaration "local sound_play = math.random(1,13)" to the top of the function
(before the zzz_player_injuries_mcm.get_config check) so both the
"new_voice_sounds" branch and the legacy else branch use the same sound_play
variable; keep existing logic that builds file using muffle and
pain_<sound_play>.
🪄 Autofix (Beta)

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 825185b7-edc4-4f9a-9c78-6d7d935af4c0

📥 Commits

Reviewing files that changed from the base of the PR and between 384bd39 and 8efff56.

📒 Files selected for processing (2)
  • gamedata/scripts/zzz_player_injuries.script
  • gamedata/scripts/zzz_player_injuries_mcm.script
📜 Review details
🔇 Additional comments (2)
gamedata/scripts/zzz_player_injuries_mcm.script (1)

39-40: Good config wiring for footstep damage chance.

The new chance_damage_on_footstep option is consistently added in defaults and exposed in MCM with a valid range and matching default.

Also applies to: 63-63

gamedata/scripts/zzz_player_injuries.script (1)

35-35: Nice separation of concerns in footstep handling.

Using a configurable chance gate and delegating VO playback to a helper makes the footstep path cleaner and easier to maintain.

Also applies to: 1700-1702

Comment thread gamedata/scripts/zzz_player_injuries.script

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 the current code and only fix it if needed.

Inline comments:
In `@gamedata/configs/text/eng/ui_st_body_health_system.xml`:
- Around line 277-280: Replace the awkward phrase "on sprinting" with "while
sprinting" in the affected UI text entries: update the label text "Chance to
receive damage on sprinting" and the description string with id
ui_mcm_body_health_system_chance_damage_on_footstep_desc so the copy reads
natural English ("Chance to receive damage while sprinting" and "Damages the
actor while sprinting with broken legs").
🪄 Autofix (Beta)

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5799e4d3-a6fa-4379-a88b-38ed1c00953a

📥 Commits

Reviewing files that changed from the base of the PR and between 8efff56 and 3e7ffe3.

📒 Files selected for processing (2)
  • gamedata/configs/text/eng/ui_st_body_health_system.xml
  • gamedata/configs/text/rus/ui_st_body_health_system.xml
📜 Review details
🔇 Additional comments (2)
gamedata/configs/text/eng/ui_st_body_health_system.xml (1)

276-281: String IDs correctly align with the new MCM option.

The added keys follow the existing ui_mcm_body_health_system_<id> and <id>_desc convention and are consistent with chance_damage_on_footstep.

gamedata/configs/text/rus/ui_st_body_health_system.xml (1)

278-283: RU localization keys are correctly added and aligned.

The new Russian entries mirror the English key names and maintain localization parity for chance_damage_on_footstep.

Comment thread gamedata/configs/text/eng/ui_st_body_health_system.xml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant