* Verifies all `pointers` are enabled. * * @param pointers The pointers to check for.
(...pointers: ScriptPointer[])
| 185 | * @param pointers The pointers to check for. |
| 186 | */ |
| 187 | pointerCheck(...pointers: ScriptPointer[]) { |
| 188 | for (let i = 0; i < pointers.length; i++) { |
| 189 | const flag = 1 << pointers[i]; |
| 190 | if ((this.pointers & flag) != flag) { |
| 191 | throw new Error(`Required pointer: ${ScriptState.pointerPrint(flag)}, current: ${ScriptState.pointerPrint(this.pointers)}`); |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Pretty prints all enables flags using the names from `ScriptPointer`. |
no test coverage detected