Replies: 1 comment
-
|
Yep... 😇 This was slightly buggy. For some reason, ENTER IT calls So, now I use this: var usingPronoun = false
parser.findInScope = function(s, scopes, cmdParams) {
parser.msg("Now matching: " + s)
// First handle IT etc.
for (const key in lang.pronouns) {
if (s === lang.pronouns[key].objective && parser.pronouns[lang.pronouns[key].objective]) {
// Modified to check scope
if (!window.usingPronoun) msg("(" + lang.getName(parser.pronouns[lang.pronouns[key].objective], {noLink:true, article:DEFINITE}) + ")", {}, 'parser')
window.usingPronoun = true
s = lang.getName(parser.pronouns[lang.pronouns[key].objective], {noLink:true}).toLowerCase()
// End of mod
}
}
for (let i = 0; i < scopes.length; i++) {
parser.msg("..Looking for a match for: " + s + " (scope " + (i + 1) + ")")
const objList = this.findInList(s, scopes[i], cmdParams);
if (objList.length > 0) {
return [objList, scopes.length - i];
}
}
return [[], 0];
}createItem("resetUsingPronounTurnscript",
{
eventPeriod:1,
eventActive:true,
eventScript:function() {
window.usingPronoun = false
}
}
)This is probably also buggy. So continue to not try this at home just yet. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I also changed the error message.
After fixing it to check the scope of the pronoun's target object, the default when the command was EXAMINE IT and IT was no longer in scope was
"There doesn't seem to be anything you might call 'it' here."I fixed that to print the name of the object, and quickly disapproved. By happenstance, I examined a sign in the first room, rendering that sign IT. Then, after changing rooms twice, I tried X IT. It said
"There doesn't seem to be anything you might call 'it' here."Only problem was there was a different sign in the current location, so that made no sense. So, I changed it to Quest 5's default "You can't see that here."This probably still has issues, so don't put it in any games just yet. =)
Beta Was this translation helpful? Give feedback.
All reactions