ArrayRuleSource
ldtk.rules.ArrayRuleSource (Class)
RuleSource over a flat IntGrid array (same layout as the intGridCsv JSON field: row major, 0 = empty).
Keeps per-area value counters so that the engine prefilter can skip irrelevant rules, exactly like the LDtk editor does.
IntGrid groups are counted under their rule value (groupUid+1)*1000.
Static Members
Build a value to group table from a list of (value, groupUid) pairs
Instance Members
getGroupUidOfValue(v: Int): Int
containsIntGridValueOrGroup(v: Int): Bool
Change a cell value and keep the prefilter counters up to date
Recount everything from the current intGrid content (existing counters are reused, not reallocated)
Recount only the areas intersecting a rectangle of cells. Use it after the shared intGrid array was modified
directly (not through setIntGrid) in that rectangle.
Private Members
valueGroupUids[value] = group uid of the IntGrid value, or -1 (index 0 unused)