Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

My fix right now is to remove the initial check (that was copied in the previous post). This avoids looking for spaces to detect the presence of a subject when `sorgente` is the set of verbs.

Then, right before the following return statement

// Rirotno un oggetto contenente l'azione e i soggetti
return {
    verb: chiave,
    actionObject: obj,
    command: sorgente == this.commands, //patternEsatto == true,
    subjects: subjects
}

I added the subject check:

if(
    sorgente != this.commands &&
    override != this.override.commands &&
    (obj.singolo === undefined || obj.singolo == false)
) {
    if( subjects.length == 0)
        return input;
}
// Rirotno un oggetto contenente l'azione e i soggetti

Ok I think your solution can work... just test it :)

Thanks for validating!

I did a play-through with no issues, this solution should be good to go for any other languages that have the same problem 😊

perfect :D