From 3ac9451bef8e809cac8f88bb8e3b673f7b1d254d Mon Sep 17 00:00:00 2001 From: edo999 Date: Mon, 27 May 2024 13:48:04 +0100 Subject: [PATCH] =?UTF-8?q?Rename=20object=20scripts=20property=20?= =?UTF-8?q?=F0=9F=8F=A1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/parser/parseRooms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/parser/parseRooms.js b/src/lib/parser/parseRooms.js index 280390d..bf5603a 100644 --- a/src/lib/parser/parseRooms.js +++ b/src/lib/parser/parseRooms.js @@ -267,7 +267,7 @@ const parseRooms = (arrayBuffer, i = 0, offset = 0, characters = {}) => { const objectScriptOffsParser = new Parser( arrayBuffer.slice(objectOffs + 0x0f, objectOffs + objectSize), ); - const objScripts = []; + const scripts = []; while (objectScriptOffsParser.pointer < objectSize) { const verbId = objectScriptOffsParser.getUint8(); if (verbId === 0) { @@ -285,7 +285,7 @@ const parseRooms = (arrayBuffer, i = 0, offset = 0, characters = {}) => { ); const script = parseScriptCode(scriptOffsParser, 0, 0); - objScripts.push([verbs[verbId] ?? `(${verbId})`, script]); + scripts.push([verbs[verbId] ?? `(${verbId})`, script]); } // Parse object images. @@ -335,7 +335,7 @@ const parseRooms = (arrayBuffer, i = 0, offset = 0, characters = {}) => { // Calculate the number of object script given the value of object name offset. const calculatedObjScriptNum = (objNameOffs - 16) / 2; assert( - calculatedObjScriptNum === objScripts.length, + calculatedObjScriptNum === scripts.length, 'Unknown data before object name offset.', ); @@ -357,7 +357,7 @@ const parseRooms = (arrayBuffer, i = 0, offset = 0, characters = {}) => { actorDir: objActorDir, nameOffs: objNameOffs, name: objName, - objScripts, + scripts, }); }