GridData has no identity attribute, so a projection cannot say which map it came from #403
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#403
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while implementing
GridData.observe()/mcrfpy.VisibilityMaskfor the simulation-harness observation seam (seesrc/PyGridDataMethods.cpp:PyGridData::py_observe,src/PyVisibilityMask.{h,cpp}).UIGridView/Gridhas a.nameproperty (inherited fromUIDrawable), butGridData— the non-drawable data objectobserve()is a method on, and the typeentity.gridreturns since the Grid/GridView/GridData 1.0 split — has no name or identity attribute at all (confirmed: no"name"getter anywhere inPyGridData*/GridData.h).This matters for
observe()/VisibilityMaskspecifically: aVisibilityMask(seesrc/PyVisibilityMask.h) is meant to be "an immutable, storable record of which cells were visible, from where, at which frame" — suitable for fog-of-war persistence or replaying observation history. But nothing in the mask or theobserve()return dict records which grid/map the snapshot was taken from. A caller storing multiple snapshots (e.g. one per level, or one per simulation arm) has no way to recover the source map's identity from the snapshot alone — they must separately track a live view object alongside every storedVisibilityMask/dict, which defeats some of the point of an inert, storable record.Suggested fix: add a
name(or similar identity) property toGridDataitself, independent of anyUIGridViewcurrently pointing at it, and haveobserve()include it in the returned dict / consider stamping it onVisibilityMask.