Asphyxiation#669
Conversation
📝 WalkthroughWalkthroughIn ChangesDamage Clamping in RefreshWounds
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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/_Offbrand/Wounds/WoundableSystem.cs`:
- Around line 298-300: When clamping unwoundable damage in the WoundableSystem
at the location where oldValue is compared against MaximumDamage.Base, the code
reduces oldValue before storing it in damageFinal.DamageDict but fails to report
the corresponding negative delta. After the line that clamps oldValue to
data.Base within the TryGetValue condition, calculate the difference between the
original and clamped values, then update the damageDone dictionary for that
damage type to include this delta so that OnEntityDamageChanged receives an
accurate report of all damage changes applied.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 787ab663-485a-4e23-a5ec-fbf435dbdb8d
📒 Files selected for processing (1)
Content.Shared/_Offbrand/Wounds/WoundableSystem.cs
Описание PR
Ограничен максимальный урон тушек согласно полям из maximumDamage компонента Woundable прототипа BaseMobWoundable
Для ИМов:
создавая гуманоидов, вы можете вполне им менять паренты, ну и создаёте свой аналог BaseMobWoundable, но с другими параметрами и используете как и где угодно.
Почему / Баланс
сказали - сделал
Технические детали
добавил if, если урон больше - заменяем макс числом
Медиа
Требования
Согласие с условиями
Критические изменения
Список изменений
Summary by CodeRabbit