Skip to content

Add object identity fields with on-canvas info display#20

Merged
SilicoBen merged 1 commit into
mainfrom
feat/object-identity-fields
May 19, 2026
Merged

Add object identity fields with on-canvas info display#20
SilicoBen merged 1 commit into
mainfrom
feat/object-identity-fields

Conversation

@SilicoBen

Copy link
Copy Markdown
Contributor

Summary

  • Objects placed in Object mode get four identity fields — GlobalID, TypeID, CustomID, Name.
    • GlobalID runs 0,1,2… across the apparatus; TypeID runs 0,1,2… within each object type.
    • CustomID defaults to {GlobalID}_{TypeID}; Name defaults to {TypeName}_{GlobalID}_{TypeID}.
    • All four are editable from the object inspector; uniqueness is not enforced.
  • Default counters derive from the highest existing numeric value, so they survive save/load and undo without extra state. Pre-existing project files get sequential defaults backfilled on load.
  • A Show item info toggle in the Object-types panel draws each object's four fields beside its icon. Lines render green normally, red when the value overlaps another object — TypeID overlap is scoped per type, the rest globally.

Dependency

Requires OpenApparatus/core#5 (adds the fields to RoomObject and the serialization layer). Merge that first.

Test plan

  • Place several objects of mixed types; confirm GlobalID/TypeID sequences.
  • Edit each field in the inspector; confirm edits persist and repaint.
  • Toggle "Show item info"; confirm labels appear and overlap detection colours correctly.
  • Save/reload and undo/redo; confirm identity fields are stable.
  • Load a project saved before this change; confirm defaults backfill.

Objects placed in Object mode now get four identity fields — GlobalID,
TypeID, CustomID and Name. GlobalID runs 0,1,2… across the apparatus;
TypeID runs 0,1,2… within each object type. CustomID and Name default
to "{GlobalID}_{TypeID}" and "{TypeName}_{GlobalID}_{TypeID}". All four
are editable from the object inspector and uniqueness is not enforced.

Default counters derive from the highest existing numeric value, so
they survive save/load and undo without extra state. Project files
saved before this change get sequential defaults backfilled on load.

A "Show item info" toggle in the Object-types panel draws each object's
four fields beside its icon. Each line is green normally and red when
its value overlaps another object; TypeID overlap is scoped per type.
@SilicoBen SilicoBen merged commit c5a8cf9 into main May 19, 2026
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