Conversation
📝 WalkthroughWalkthroughAdds four new mob prototypes under a single YAML: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ 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.
Actionable comments posted: 3
🧹 Nitpick comments (1)
Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml (1)
169-278: Significant code duplication—consider inheriting from MobOneStar.
MobOneStarMeleeusesBaseMobas parent and duplicates ~60 lines of component definitions that already exist inMobOneStar. Since the melee variant shares most characteristics with the base One-Star (sprite, damage handling, speech, movement, etc.), it should inherit fromMobOneStarand only override/remove what differs.This would:
- Reduce maintenance burden
- Ensure consistency when MobOneStar is updated
- Fix the missing
LightBehaviourautomatically♻️ Suggested refactor approach
- type: entity name: One-Star id: MobOneStarMelee parent: [ MobOneStar ] suffix: "Лютый Дизбаланс + Ближний бой" components: - type: MobThresholds thresholds: allowRevives: false showOverlays: true # Remove ranged weapon components - type: BallisticAmmoProvider - type: Gun # Add melee components - type: MeleeWeapon damage: types: Blunt: 150 Structural: 200 range: 4 attackRate: 0.4 altDisarm: false - type: CombatModeNote: Component removal syntax depends on the engine. If removal isn't supported, you may need to set ranged components to inactive/empty states.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml` around lines 169 - 278, MobOneStarMelee duplicates most components from MobOneStar; change its parent to MobOneStar (replace parent: [ BaseMob ] with parent: [ MobOneStar ]) and remove all duplicated components that are identical to the base so the entity only declares differences (keep/override MobThresholds, add MeleeWeapon and CombatMode, and explicitly remove or disable ranged components like BallisticAmmoProvider and Gun if present), ensuring LightBehaviour is inherited from MobOneStar; update only MobOneStarMelee's components list to contain the minimal overrides (thresholds and melee-specific components) rather than the full component block.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml`:
- Around line 179-183: The two layers for states onestar_boss and
onestar_boss_screen both use the same map key
"enum.DamageStateVisualLayers.Base" which causes the second to override the
first; update the map key for the onestar_boss_screen layer to the correct
visual layer (e.g., the screen-specific enum used by other mobs such as the
MobOneStar example) so each state uses a distinct enum value (adjust the second
layer's map from "enum.DamageStateVisualLayers.Base" to the appropriate screen
layer enum).
- Around line 11-15: The two entries in the layers array use the same map key
"enum.DamageStateVisualLayers.Base", causing the second (onestar_boss_screen) to
override the first (onestar_boss); change the map key for the screen overlay
layer to the appropriate overlay/emissive enum (e.g., use
enum.DamageStateVisualLayers.BaseUnshaded or the project's overlay enum) so each
state has a unique map key and both onestar_boss and onestar_boss_screen render
correctly. Ensure you update the second layer's map value only, keeping the
state name onestar_boss_screen unchanged.
- Around line 239-244: Remove the invalid isLooped property from the
HandheldLight block and add corresponding LightBehaviour entries for the
referenced IDs so the blinkingBehaviourId and radiatingBehaviourId point to real
components; specifically, delete the isLooped: true under HandheldLight and
create LightBehaviour definitions (e.g., id: blinking and id: radiating) that
include their own isLooped, timing, and any required fields so the
HandheldLight's blinkingBehaviourId and radiatingBehaviourId resolve correctly.
---
Nitpick comments:
In `@Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml`:
- Around line 169-278: MobOneStarMelee duplicates most components from
MobOneStar; change its parent to MobOneStar (replace parent: [ BaseMob ] with
parent: [ MobOneStar ]) and remove all duplicated components that are identical
to the base so the entity only declares differences (keep/override
MobThresholds, add MeleeWeapon and CombatMode, and explicitly remove or disable
ranged components like BallisticAmmoProvider and Gun if present), ensuring
LightBehaviour is inherited from MobOneStar; update only MobOneStarMelee's
components list to contain the minimal overrides (thresholds and melee-specific
components) rather than the full component block.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1ca088ad-c609-4cec-b329-ab32c7d29aef
📒 Files selected for processing (1)
Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml`:
- Around line 84-86: The ToggleableVisuals entry references spriteLayer "light"
but the Sprite component only defines enum.DamageStateVisualLayers.Base and
BaseUnshaded, so either add a "light" sprite layer to the Sprite definition (so
ToggleableVisuals.spriteLayer: light maps to an actual layer) or remove the
ToggleableVisuals block entirely and rely solely on PointLight for toggling;
update the Sprite component's layers to include a uniquely named "light" layer
if you intend to keep ToggleableVisuals, or delete the ToggleableVisuals entry
if only the PointLight toggle is required.
- Around line 75-77: The fireRate value in the onestar YAML entry is incorrect
for the imbalanced gunner: update the property fireRate in the onestar entity
definition from 24 to 16 (or, if 24 is intentional, update the PR
objectives/changelog to reflect the change). Locate the block with "type: Gun"
and the fireRate field in onestar.yml and set fireRate: 16 (or adjust
documentation accordingly).
- Around line 146-163: MobOneStarMelee currently inherits ranged components from
parent MobOneStar (Gun and BallisticAmmoProvider) and so ends up with both
ranged and melee gear; fix by explicitly removing the inherited ranged
components or reparenting to a non‑weapon base. In the onestar.yml entry for the
melee variant (the entity that uses parent: MobOneStar and suffix "Лютый
Дизбаланс + Ближний бой") either add explicit overrides that remove the Gun and
BallisticAmmoProvider components (use the project’s component removal syntax to
unset/remove those component types) or change the parent from MobOneStar to a
weaponless base entity so only MeleeWeapon and CombatMode remain.
🪄 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: 611f12db-8fdf-4285-8dab-86df807e8588
📒 Files selected for processing (1)
Resources/Prototypes/_Maid/Entities/Mobs/onestar.yml
Описание
Добавлены с нуля One-Star
🆑 Командир Дынька
Summary by CodeRabbit