Skip to content

Aliases in stages do not work if the steps to the referenced stage are added after the alias #58

Open
@shakty

Description

@shakty

Example:

This does not work:

  stager
        .next('instructions')
        .next('quiz')
        .repeat('game', settings.REPEAT)
        .repeat('game AS game2', settings.REPEAT)
        .repeat('game AS game3', settings.REPEAT)
        .next('questionnaire')
        .next('end')
        .gameover();

    stager.extendStage('game', {
        steps: ['bid', 'results']
    });

This works:

  stager
        .next('instructions')
        .next('quiz')
        .repeat('game', settings.REPEAT)

    
    stager.extendStage('game', {
        steps: ['bid', 'results']
    });
    
    stager.repeat('game AS game2', settings.REPEAT)
        .repeat('game AS game3', settings.REPEAT)
        .next('questionnaire')
        .next('end')
        .gameover();

When it does not work, node.game.plot.getStep fails because inside the sequence the aliasing stage has empty steps array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions