MCPcopy Create free account
hub / github.com/MaxBittker/rs-sdk / pointerCheck

Method pointerCheck

server/engine/src/engine/script/ScriptState.ts:187–194  ·  view source on GitHub ↗

* Verifies all `pointers` are enabled. * * @param pointers The pointers to check for.

(...pointers: ScriptPointer[])

Source from the content-addressed store, hash-verified

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`.

Callers 1

checkedHandlerFunction · 0.80

Calls 1

pointerPrintMethod · 0.80

Tested by

no test coverage detected