Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prime Multiple Verbs to Conjugate for gActor #3

Open
inventor200 opened this issue Jan 7, 2023 · 0 comments
Open

Prime Multiple Verbs to Conjugate for gActor #3

inventor200 opened this issue Jan 7, 2023 · 0 comments

Comments

@inventor200
Copy link

inventor200 commented Jan 7, 2023

Problem Statement

When using tokens in strings to automatically conjugate verbs, there is a case where a verb will "reset" the context of the sentence, causing following verbs to conjugate according to a default "it" noun.

The following demonstrates this behavior:

"{I} {hold} onto the ledge, drop{s/?ed},
and land{s/ed} on the floor below.";

creates:

I hold onto the ledge, drops, and lands on the floor below.

Solution

To fix this, the following code provides a new conjugation token (written as {aac}). Simply add or include this code before the rest of your project to make use of it:

/*
 * Actor Action Continuer (AAC)
 * Joseph Cramsey
 */
actorActionContinuer_: dummy_ {
    person = (gActor == nil ? 3 : gActor.person)
    plural = (gActor == nil ? nil : gActor.plural)
}

// A modified englishMessageParams will have our new token.
modify englishMessageParams {
    construct() {
        // Add the simplified message token
        params = params.append(['aac', { ctx, params:
            cmdInfo(ctx, actorActionContinuer_, &dummyName, vSubject)
        }]);

        inherited();
    }
}

With this, we now have the following behavior for all strings:

"{I} {hold} onto the ledge,{aac} drop{s/?ed},{aac}
and land{s/ed} on the floor below.";

creates:

I hold onto the ledge, drop, and land on the floor below.

As long as the {aac} token precedes a verb, the verb will be conjugated according to the gActor of the current action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant