refactor: Artifact API, kill parallel arrays - #1406
Conversation
|
/review |
This comment was marked as resolved.
This comment was marked as resolved.
6f69a8c to
0629373
Compare
|
/review |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
/review Last time. I want to merge this already. Please god, help me. I don't want to fix anything else. |
|
Review complete. Verified against HEAD ( High
Medium
Minor
Direction is sound and the mechanical conversion is thorough; #1 (one-line guard) and a fail-loud legacy-save notice are the only merge blockers. |
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 30 unresolved issues from previous reviews.
Re-trigger cubic
10e3e46 to
abf48c1
Compare
Summary by cubic
Refactors the artifact system to a struct-based API centered on
ArtifactStruct, replacing parallel arrays, removing magic ship IDs, and tightening UI/events/equip flows to prevent crashes and bad state. Adds JSDoc annotations for clearer types and safer calls. Also removes legacy save migration.Refactors
ArtifactStructwith getters/setters; artifacts now live inobj_ini.artifact_mapand are read viafetch_artifact(id). ResetArtifactStruct.__next_idon custom init; added JSDoc types across scripts.scr_add_artifactintoscripts/artifact_functions(returns new artifact ID) and added helpers likebuild_sorted_artifact_ids(); Librarium derives counts and initial selection from sorted IDs.+500offsets; updated fleet moves, ship removal (uses stored index for shifts), and turn init to relocate artifacts and ensure location names..get_type_name(),.get_description(),.get_bearer_text(),.has_tag(),.is_equipped(),.is_heretical(); dropdown/tooltips append bearer info and event-display options derive fromNOT_EQUIPPABLE; corruption checks read artifact tags via struct.Migration
struct_get_names(obj_ini.artifact_map)and fetch viaobj_ini.artifact_map[$ key]orfetch_artifact(id); removed legacyartifact*arrays andfest_display_tags;fest_displayandmenu_artifactnow use -1.scr_add_artifact(..., ship_id)and manage location via struct setters.Written for commit abf48c1. Summary will update on new commits.