setModifiers method

  1. @override
void setModifiers(
  1. int x,
  2. int y,
  3. int mod
)
override

Sets modifiers at coordinates.

Performance Warning: Invoking individual property setters (setCharacter, setForeground, etc.) inside a per-cell hot render loop causes severe thrashing due to redundant bounds checking and method overhead. Prefer using setCell to write all attributes at once. For massive regional updates, manipulate the raw 1D arrays (characters and attributes) directly via List.setRange().

Implementation

@override
void setModifiers(int x, int y, int mod) {
  if (x >= 0 && x < bounds.width && y >= 0 && y < bounds.height) {
    parent.setModifiers(bounds.x + x, bounds.y + y, mod);
  }
}