Skip to content

feat: add proper placeholder modules#76

Merged
lmProgramming merged 9 commits into
mainfrom
feat/add-proper-placeholder-modules
Jun 12, 2026
Merged

feat: add proper placeholder modules#76
lmProgramming merged 9 commits into
mainfrom
feat/add-proper-placeholder-modules

Conversation

@lmProgramming

@lmProgramming lmProgramming commented Jun 11, 2026

Copy link
Copy Markdown
Owner

resolves #71

Summary by CodeRabbit

  • New Features

    • Added two crew skill types (Captain, Janitor).
    • Engine thrust now factors an efficiency multiplier for stronger/adjustable thrust.
  • Bug Fixes

    • Explosion effects no longer run when the effects holder is disabled.
    • Laser beam rendering made more robust; missing renderer now logged and safely handled.
  • Chores

    • Reorganized and refreshed asset metadata and folder entries.
    • Refactored sprite-generation into a reusable pipeline; updated tooling for prefab generation and previews.
    • Ignore Python virtual envs and loosened local dependency pinning.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Reorganizes module prefab and SO metadata, introduces gameplay thrust scaling and test normalizations, refactors Laser and WeaponBase behavior, adds editor preview tooling and updated prefab generation, and modularizes the sprite-generator into callable steps with a pipeline entrypoint.

Changes

Gameplay Mechanics and Constants

Layer / File(s) Summary
Gameplay constants and core enums
Assets/Scripts/Core/Constants/GameplayConstants.cs, Assets/Scripts/Core/Ship/CrewSkillType.cs, Assets/Scripts/Core/Ship/Resources.cs
Adds EngineThrustEfficiencyMultiplier = 1000f, extends CrewSkillType with Captain and Janitor, and applies [Range(0, 30)] to Resources.crewNeeded.
Engine thrust efficiency implementation
Assets/Scripts/Ships/Modules/Engine.cs
Imports gameplay constants and updates MaxThrust getter to multiply by GameplayConstants.EngineThrustEfficiencyMultiplier in addition to existing efficiency modifiers.
Thrust test alignment
Assets/Scripts/E2E/E2ETestBase.cs, Assets/Scripts/Ships/Tests/*
Normalizes engine thrust magnitudes in E2E and multiple Ship tests to match the new constant scale.

Component Behavior and Runtime Guards

Layer / File(s) Summary
Laser beam dynamic rendering
Assets/Scripts/Ships/Modules/Laser.cs
Replaces serialized LineRenderer with a private _lineRenderer fetched in Awake(), disables component on missing renderer, and updates firing logic to set positions via _lineRenderer.
WeaponBase and Cannon adjustments
Assets/Scripts/Ships/Modules/WeaponBase.cs, Assets/Scripts/Ships/Modules/Cannon.cs
Adds public override ModuleType Type => ModuleType.Weapon; and ready handlers to WeaponBase; removes redundant Type override from Cannon.
Runtime safety checks
Assets/Scripts/Services/EffectsSpawner.cs, Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs
Early-return in SpawnExplosion when holder inactive and removes extra Debug.Log calls from a lifecycle test.

Editor Tools and Asset Reorganization

Layer / File(s) Summary
Editor window refactoring and custom inspectors
Assets/Scripts/Editor/Windows/GenerateModulePrefabs.cs, Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs, Assets/Scripts/Editor/Editor.asmdef, Assets/Scripts/Editor/ProjectExtensions.meta
Renames the prefab generator window, sets generated prefab Rigidbody2D.gravityScale = 0, adds ShipModuleSOEditor with reflection-based static preview rendering, and updates asmdef/meta references.
Prefab asset folder structure
Assets/Prefabs/Gameplay/Modules/*
Adds New, Resource, Weapons folder .meta files, updates prefab GUIDs, and clears obsolete Old prefab metadata.
Scriptable object folder structure
Assets/SOs/Modules/*
Adds folder and individual .asset.meta files for Command, Engine, Resource, and Weapons SOs.
Repo config
.gitignore
Appends a Python section and ignores .venv/.

Sprite Generation Pipeline Refactoring

Layer / File(s) Summary
Sprite generation function extraction
sprite_generator/raw_file_generator.py, sprite_generator/inputs_to_outputs.py
Encapsulates top-level scripts into generate_raw_file() and generate_pngs(), tokenizes matrix rows during parsing, and changes SAVE_DIR to Assets/Sprites/Generated/New.
Sprite generation pipeline orchestrator
sprite_generator/pipeline.py
Adds run_pipeline() that sequentially calls generate_raw_file() then generate_pngs().
Sprite generator dependencies
sprite_generator/requirements.txt
Replaces pinned pillow==... and types-Pillow==... with unpinned pillow and types-Pillow entries.

Sequence Diagram(s)

No sequence diagram generated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

"🐰
New folders hop into their place,
Sprites and prefabs find their space,
Engines hum with tuned-up might,
Lasers beam with lookup light,
Editor previews shine tonight."

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive Several changes appear tangential to placeholder module implementation: the .gitignore update for Python venv, sprite generator pipeline refactoring, test constant adjustments, and laser renderer refactoring lack direct connection to module asset organization. Clarify whether sprite generation pipeline changes and laser renderer refactoring are necessary for the placeholder module feature or should be separated into distinct PRs.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add proper placeholder modules' directly aligns with the changeset's primary focus: reorganizing game module assets into new folder structures (Engine, Command, Resource, Weapons) and updating related module configuration and gameplay logic.
Linked Issues check ✅ Passed The PR addresses issue #71 which requests 'add proper placeholder sprites and modules.' The changeset includes reorganization of module prefabs into categorized folders, creation of new module ScriptableObjects with proper metadata, updates to gameplay constants and crew skill types, and adjustments to physics and rendering behavior—all supporting the placeholder module implementation objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-proper-placeholder-modules

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: 6

🧹 Nitpick comments (5)
sprite_generator/raw_file_generator.py (2)

14-15: ⚡ Quick win

Replace exit() with exceptions in library functions (affects raw_file_generator.py and inputs_to_outputs.py).

Both generate_raw_file() and generate_pngs() use exit() to terminate on error, which is inappropriate for library functions and makes them untestable. Replace exit() calls with appropriate exceptions (FileNotFoundError) that the caller (pipeline orchestrator) can handle or propagate.

🤖 Prompt for 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.

In `@sprite_generator/raw_file_generator.py` around lines 14 - 15, The code
currently calls exit() in library functions which prevents callers from handling
errors; in raw_file_generator.py (function generate_raw_file) and
inputs_to_outputs.py (function generate_pngs) replace the exit() calls with
raising appropriate exceptions (e.g., raise FileNotFoundError with a clear
message including INPUT_FILE or the missing path) instead of printing and
exiting so the pipeline orchestrator can catch or propagate the error.

6-49: 💤 Low value

Consider returning status or parsed file count.

The function has no return value, making it harder to verify success in tests or provide feedback to callers. Consider returning the count of files generated or a success boolean.

🤖 Prompt for 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.

In `@sprite_generator/raw_file_generator.py` around lines 6 - 49,
generate_raw_file currently returns nothing which makes testing and callers
unable to verify success; modify generate_raw_file to compute and return a
meaningful result (e.g., an integer count of files written or a boolean success
flag). After the loop that writes files (where you use parsed_files and write to
filepath in SAVE_DIR), increment a counter for each file actually saved (skip
empty matrices as currently), and return that counter (or return True if >0,
False otherwise); ensure the function signature and callers handle the new
return value.
sprite_generator/pipeline.py (1)

4-6: 💤 Low value

Consider adding error handling and return status.

The pipeline silently propagates exceptions from the generator functions, which is acceptable, but consider wrapping in try-except to provide context or cleanup, and returning a status code for programmatic success detection.

🤖 Prompt for 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.

In `@sprite_generator/pipeline.py` around lines 4 - 6, Wrap run_pipeline in a
try/except that calls generate_raw_file() and generate_pngs() inside the try,
catch Exception as e to log or re-raise with contextual information (include
function names generate_raw_file and generate_pngs in the message), perform any
necessary cleanup in a finally block if applicable, and return an explicit
status indicator (e.g., return 0 on success, non-zero on failure) so callers can
detect success programmatically.
sprite_generator/requirements.txt (1)

1-2: ⚡ Quick win

Pin dependency versions for reproducibility.

Unpinned dependencies can introduce breaking changes or inconsistent behavior across environments. For build reproducibility and security auditing, pin to specific tested versions.

♻️ Recommended pinning
-pillow
-types-Pillow
+pillow==11.0.0
+types-Pillow==11.0.0.20241206

Note: Use specific versions tested with your pipeline. Run pip freeze after testing to capture working versions.

🤖 Prompt for 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.

In `@sprite_generator/requirements.txt` around lines 1 - 2, The requirements.txt
currently lists unpinned packages (pillow and types-Pillow); update those
entries to exact, tested versions by replacing "pillow" and "types-Pillow" with
pinned specs (e.g., pillow==<tested-version> and types-Pillow==<tested-version>)
that you verified in CI or locally, then run pip freeze to capture the full,
reproducible versions and commit the updated requirements.txt; target the lines
containing "pillow" and "types-Pillow" in requirements.txt when making the
change.
Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs (1)

18-18: 💤 Low value

Consider using IPixelatedSprite interface for better abstraction.

Line 18 directly references PixelatedRigidbody, while other parts of the codebase (e.g., ModulePaletteController.cs:104) use the IPixelatedSprite interface to retrieve sprites. Using the interface would make this code more flexible and consistent with existing patterns.

♻️ Proposed refactor to use interface
-var sprite = Item.Prefab?.GetComponent<PixelatedRigidbody>()?.GetSprite();
+var sprite = Item.Prefab?.GetComponent<IPixelatedSprite>()?.GetSprite();
🤖 Prompt for 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.

In `@Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs` at line 18,
The code is tightly coupled to PixelatedRigidbody; replace the concrete type
with the IPixelatedSprite abstraction so sprite retrieval uses
Item.Prefab?.GetComponent<IPixelatedSprite>()?.GetSprite() (or
GetComponentInChildren<IPixelatedSprite>() if other components host the sprite)
to match ModulePaletteController.cs usage; update the null-safe check
accordingly and ensure ShipModuleSOEditor references the IPixelatedSprite
interface instead of PixelatedRigidbody.
🤖 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 `@Assets/Scripts/Core/Constants/GameplayConstants.cs`:
- Line 14: EngineThrustEfficiencyMultiplier is amplifying serialized
Engine.maxThrust (~1–20) by ~1000x in Engine.MaxThrust (combined with
ShipModuleEfficiency), causing unexpectedly large forces given Rigidbody mass is
PixelCount * MassMultiplier; update the constant handling by documenting the
units and rationale (what units maxThrust represents and why 1000f is required)
in the declaration of EngineThrustEfficiencyMultiplier, and either reduce or
make the multiplier configurable (expose as a tunable constant/serialized
setting) so it can be adjusted without code changes; also verify/annotate that
ShipModuleEfficiency scaling and default MassMultiplier = 1 keep acceleration in
stable ranges (check code paths using ShipModuleEfficiency, PixelCount, and
MassMultiplier) and add a sanity-check test or validation to prevent runaway
thrust values.

In `@Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs`:
- Around line 31-33: Replace the incorrect reflection invocation that passes the
method name string as the target with a null target for the static method:
change the call using MethodInfo variable "method" (the static
"RenderStaticPreview" invocation) to invoke with a null first argument and the
existing argument array (sprite, Color.white, width, height) so
MethodInfo.Invoke(null, new object[] { sprite, Color.white, width, height }) is
used.

In `@Assets/Scripts/Ships/Modules/Laser.cs`:
- Line 155: In the Laser class replace the silent early-return "if
(!_lineRenderer) return;" with a hard failure that surfaces the missing required
component: check _lineRenderer and if null call Debug.LogError with a clear
message and then throw an InvalidOperationException (or use
UnityEngine.Assertions.Assert.IsNotNull) so firing cannot proceed with an
invalid runtime state; reference the _lineRenderer field and the method
containing that check (e.g., Fire or Update) when making the change.
- Line 52: Remove the redundant assignment inside Laser.Awake(): delete the line
that sets Type = ModuleType.Weapon; because Laser already overrides the property
via public override ModuleType Type => ModuleType.Weapon; and the base virtual
auto-property in Module is unused by the override; edit the Laser.Awake() method
to omit that assignment so only the override getter defines the Module type.

In `@sprite_generator/inputs_to_outputs.py`:
- Around line 62-106: The generate_pngs function writes PNGs to SAVE_DIR but
never ensures that directory exists; before saving any files (e.g., at the start
of generate_pngs, before the loop or before calling img.save), create the output
directory using os.makedirs(SAVE_DIR, exist_ok=True) (or equivalent) so
img.save(png_path) cannot raise FileNotFoundError; update generate_pngs to
ensure SAVE_DIR exists and optionally handle potential save errors around
img.save.
- Around line 80-81: The code assumes uniform row widths by using width =
len(matrix[0]) and height = len(matrix); add a validation step after computing
height/width to verify every row in matrix has length == width (e.g., check
any(len(row) != width for row in matrix)) and raise a clear exception
(ValueError) or return a handled error if a mismatch is found; include the
offending row index and its length in the error message so callers can diagnose
malformed input.

---

Nitpick comments:
In `@Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs`:
- Line 18: The code is tightly coupled to PixelatedRigidbody; replace the
concrete type with the IPixelatedSprite abstraction so sprite retrieval uses
Item.Prefab?.GetComponent<IPixelatedSprite>()?.GetSprite() (or
GetComponentInChildren<IPixelatedSprite>() if other components host the sprite)
to match ModulePaletteController.cs usage; update the null-safe check
accordingly and ensure ShipModuleSOEditor references the IPixelatedSprite
interface instead of PixelatedRigidbody.

In `@sprite_generator/pipeline.py`:
- Around line 4-6: Wrap run_pipeline in a try/except that calls
generate_raw_file() and generate_pngs() inside the try, catch Exception as e to
log or re-raise with contextual information (include function names
generate_raw_file and generate_pngs in the message), perform any necessary
cleanup in a finally block if applicable, and return an explicit status
indicator (e.g., return 0 on success, non-zero on failure) so callers can detect
success programmatically.

In `@sprite_generator/raw_file_generator.py`:
- Around line 14-15: The code currently calls exit() in library functions which
prevents callers from handling errors; in raw_file_generator.py (function
generate_raw_file) and inputs_to_outputs.py (function generate_pngs) replace the
exit() calls with raising appropriate exceptions (e.g., raise FileNotFoundError
with a clear message including INPUT_FILE or the missing path) instead of
printing and exiting so the pipeline orchestrator can catch or propagate the
error.
- Around line 6-49: generate_raw_file currently returns nothing which makes
testing and callers unable to verify success; modify generate_raw_file to
compute and return a meaningful result (e.g., an integer count of files written
or a boolean success flag). After the loop that writes files (where you use
parsed_files and write to filepath in SAVE_DIR), increment a counter for each
file actually saved (skip empty matrices as currently), and return that counter
(or return True if >0, False otherwise); ensure the function signature and
callers handle the new return value.

In `@sprite_generator/requirements.txt`:
- Around line 1-2: The requirements.txt currently lists unpinned packages
(pillow and types-Pillow); update those entries to exact, tested versions by
replacing "pillow" and "types-Pillow" with pinned specs (e.g.,
pillow==<tested-version> and types-Pillow==<tested-version>) that you verified
in CI or locally, then run pip freeze to capture the full, reproducible versions
and commit the updated requirements.txt; target the lines containing "pillow"
and "types-Pillow" in requirements.txt when making the change.
🪄 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 Plus

Run ID: c6330172-63fd-42c0-b02b-6a822cd1dfe6

📥 Commits

Reviewing files that changed from the base of the PR and between d6affce and 9e9e58b.

⛔ Files ignored due to path filters (78)
  • Assets/Prefabs/Gameplay/Modules/Command/player_command_medium_24x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Command/player_command_small_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_big_40x32.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_medium_32x24.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_small_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_cannon_medium_1_32x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_cannon_medium_2_32x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_cannon_small_3_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_command_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_medium_1_16x32.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_3_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_laser_big_1_32x32.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Resource/player_battery_small_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Resource/player_crew_medium_24x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Resource/player_crew_small_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Resource/player_power_medium_24x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Resource/player_power_small_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_large_32x32.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_medium_24x24.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_small_1_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_small_2_16x16.prefab is excluded by !**/*.prefab
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_laser_small_16x16.prefab is excluded by !**/*.prefab
  • Assets/SOs/ModulePrefabLibrary.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Command/CommandModule 1.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Command/CommandModule 2.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Engine/Engine 1.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Engine/Engine 2.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Engine/Engine 3.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Engine/Engine 4.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Resource/Crew 1.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Resource/Crew 2.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Resource/Power 1.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Resource/Power 2.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Resource/Power.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Weapons/CannonBig.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Weapons/CannonSmall 1.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Weapons/CannonSmall 2.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Weapons/CannonSmall 3.asset is excluded by !**/*.asset
  • Assets/SOs/Modules/Weapons/CannonSmall.asset is excluded by !**/*.asset
  • Assets/Scenes/ShipFactory.unity is excluded by !**/*.unity
  • Assets/Sprites/Generated/New.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_battery_small_16x16.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_battery_small_16x16.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_battery_small_16x16_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_battery_small_16x16_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_large_32x32.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_large_32x32.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_large_32x32_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_large_32x32_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_medium_24x24.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_medium_24x24.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_medium_24x24_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_medium_24x24_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_1_16x16.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_1_16x16.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_1_16x16_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_1_16x16_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_2_16x16.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_2_16x16.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_2_16x16_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_cannon_small_2_16x16_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_engine_big_40x32.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_engine_big_40x32.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_engine_big_40x32_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_engine_big_40x32_armor.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_laser_small_16x16.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_laser_small_16x16.png.meta is excluded by !**/generated/**
  • Assets/Sprites/Generated/player_laser_small_16x16_armor.png is excluded by !**/*.png, !**/generated/**
  • Assets/Sprites/Generated/player_laser_small_16x16_armor.png.meta is excluded by !**/generated/**
📒 Files selected for processing (77)
  • .gitignore
  • Assets/Prefabs/Gameplay/Modules/Command.meta
  • Assets/Prefabs/Gameplay/Modules/Command/player_command_medium_24x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Command/player_command_small_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Engine.meta
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_big_40x32.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_medium_32x24.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Engine/player_engine_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/New.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_cannon_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_command_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_command_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_medium_1_16x32.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_laser_big_1_32x32.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_laser_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Resource.meta
  • Assets/Prefabs/Gameplay/Modules/Resource/player_battery_small_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Resource/player_crew_medium_24x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Resource/player_crew_small_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Resource/player_power_medium_24x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Resource/player_power_small_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_large_32x32.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_medium_24x24.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_cannon_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Weapons/player_laser_small_16x16.prefab.meta
  • Assets/Resources/ShipSnapshots/Enemy.json
  • Assets/Resources/ShipSnapshots/Friend.json
  • Assets/SOs/Modules/Command.meta
  • Assets/SOs/Modules/Command/CommandModule 1.asset.meta
  • Assets/SOs/Modules/Command/CommandModule 2.asset.meta
  • Assets/SOs/Modules/Engine.meta
  • Assets/SOs/Modules/Engine/Engine 1.asset.meta
  • Assets/SOs/Modules/Engine/Engine 2.asset.meta
  • Assets/SOs/Modules/Engine/Engine 3.asset.meta
  • Assets/SOs/Modules/Engine/Engine 4.asset.meta
  • Assets/SOs/Modules/Resource.meta
  • Assets/SOs/Modules/Resource/Crew 1.asset.meta
  • Assets/SOs/Modules/Resource/Crew 2.asset.meta
  • Assets/SOs/Modules/Resource/Power 1.asset.meta
  • Assets/SOs/Modules/Resource/Power 2.asset.meta
  • Assets/SOs/Modules/Resource/Power.asset.meta
  • Assets/SOs/Modules/Weapons.meta
  • Assets/SOs/Modules/Weapons/CannonBig.asset.meta
  • Assets/SOs/Modules/Weapons/CannonSmall 1.asset.meta
  • Assets/SOs/Modules/Weapons/CannonSmall 2.asset.meta
  • Assets/SOs/Modules/Weapons/CannonSmall 3.asset.meta
  • Assets/SOs/Modules/Weapons/CannonSmall.asset.meta
  • Assets/Scripts/Core/Constants/GameplayConstants.cs
  • Assets/Scripts/Core/Ship/CrewSkillType.cs
  • Assets/Scripts/Core/Ship/Resources.cs
  • Assets/Scripts/Editor/Editor.asmdef
  • Assets/Scripts/Editor/ProjectExtensions.meta
  • Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs
  • Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs.meta
  • Assets/Scripts/Editor/Windows/GenerateModulePrefabs.cs
  • Assets/Scripts/Editor/Windows/GenerateModulePrefabs.cs.meta
  • Assets/Scripts/Services/EffectsSpawner.cs
  • Assets/Scripts/Ships/Modules/Engine.cs
  • Assets/Scripts/Ships/Modules/Laser.cs
  • Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs
  • sprite_generator/inputs_to_outputs.py
  • sprite_generator/pipeline.py
  • sprite_generator/raw_file_generator.py
  • sprite_generator/requirements.txt
💤 Files with no reviewable changes (17)
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_1_16x16.prefab.meta
  • Assets/Scripts/Ships/Tests/ModuleJointLifecycleTests.cs
  • Assets/Prefabs/Gameplay/Modules/Old/player_cannon_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_command_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_command_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_power_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_small_3_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_crew_small_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_conn_unarmored_2_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_laser_big_1_32x32.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_laser_small_1_16x16.prefab.meta
  • Assets/Prefabs/Gameplay/Modules/Old/player_engine_medium_1_16x32.prefab.meta

Comment thread Assets/Scripts/Core/Constants/GameplayConstants.cs
Comment thread Assets/Scripts/Editor/ProjectExtensions/ShipModuleSOEditor.cs
Comment thread Assets/Scripts/Ships/Modules/Laser.cs Outdated
Comment thread Assets/Scripts/Ships/Modules/Laser.cs Outdated
Comment thread sprite_generator/inputs_to_outputs.py
Comment thread sprite_generator/inputs_to_outputs.py

@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.

♻️ Duplicate comments (1)
sprite_generator/inputs_to_outputs.py (1)

83-84: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add validation for consistent matrix row width.

The code assumes all rows have the same width (line 83 uses len(matrix[0])), but malformed input could have inconsistent row lengths, causing visual corruption or index errors.

🛡️ Proposed validation
         width = len(matrix[0])
         height = len(matrix)
+        
+        if not all(len(row) == width for row in matrix):
+            print(f"WARNING: Inconsistent row widths in {filename}, skipping.")
+            continue
🤖 Prompt for 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.

In `@sprite_generator/inputs_to_outputs.py` around lines 83 - 84, The code
computes width = len(matrix[0]) and assumes every row matches that length; add a
validation step before that to verify all rows in matrix have identical lengths
(e.g., compare len(row) for each row against len(matrix[0])) and if any mismatch
is found raise a clear exception (ValueError) with context (e.g., include
expected width and the index/length of the bad row) so the calling code can
detect malformed input; implement this check just before the existing
width/height calculation that references matrix[0].
🤖 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.

Duplicate comments:
In `@sprite_generator/inputs_to_outputs.py`:
- Around line 83-84: The code computes width = len(matrix[0]) and assumes every
row matches that length; add a validation step before that to verify all rows in
matrix have identical lengths (e.g., compare len(row) for each row against
len(matrix[0])) and if any mismatch is found raise a clear exception
(ValueError) with context (e.g., include expected width and the index/length of
the bad row) so the calling code can detect malformed input; implement this
check just before the existing width/height calculation that references
matrix[0].

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 687d3306-2c77-4346-bff8-e52d5696b5bf

📥 Commits

Reviewing files that changed from the base of the PR and between 83dbd4d and eecdc94.

📒 Files selected for processing (4)
  • Assets/Scripts/Ships/Modules/Cannon.cs
  • Assets/Scripts/Ships/Modules/Laser.cs
  • Assets/Scripts/Ships/Modules/WeaponBase.cs
  • sprite_generator/inputs_to_outputs.py
💤 Files with no reviewable changes (1)
  • Assets/Scripts/Ships/Modules/Cannon.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Assets/Scripts/Ships/Modules/Laser.cs

@lmProgramming lmProgramming merged commit 1f902b5 into main Jun 12, 2026
3 checks passed
@lmProgramming lmProgramming deleted the feat/add-proper-placeholder-modules branch June 12, 2026 12:19
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.

add proper placeholder sprites and modules

1 participant