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

Function checkedHandler

server/engine/src/engine/script/ScriptPointer.ts:47–56  ·  view source on GitHub ↗
(pointer: ScriptPointer | ScriptPointer[], handler: CommandHandler)

Source from the content-addressed store, hash-verified

45 * @param handler The handler to run after checking the pointer.
46 */
47export function checkedHandler(pointer: ScriptPointer | ScriptPointer[], handler: CommandHandler) {
48 return function (state: ScriptState) {
49 if (typeof pointer === 'number') {
50 state.pointerCheck(pointer);
51 } else {
52 state.pointerCheck(pointer[state.intOperand]);
53 }
54 handler(state);
55 };
56}
57
58export default ScriptPointer;

Callers 4

LocOps.tsFile · 0.85
NpcOps.tsFile · 0.85
PlayerOps.tsFile · 0.85
InvOps.tsFile · 0.85

Calls 1

pointerCheckMethod · 0.80

Tested by

no test coverage detected