Auroriax / PuzzleScriptPlus

Puzzlescript Plus: Open Source HTML5 Puzzle Game Engine (with lots of extra functionality)
https://auroriax.github.io/PuzzleScript/
34 stars 4 forks source link

Games without `level_select` flag open level select at after the last room #5

Closed Auroriax closed 2 years ago

Auroriax commented 3 years ago

I ran into a weird issue where, after doing a Ctrl+Click on the last level in the editor, and after solving it, it would not toss me back onto the main menu, but instead toss me into an (empty) level select, even though this project does not have the level_select flag or any sections set. I think this only impacts the editor. This was the code I managed to trigger it with:

title PushTOOL
author Tom Hermans [@Auroriax]

========
OBJECTS
========

background .
#444

Player P
Pink
.000.
0.0.0
00000
00000
.000.

Wall #
#222

RedCrate 1
Red

RedThrough 2
#ff000088
0.0.0
.0.0.
0.0.0
.0.0.
0.0.0

BlueCrate 4
Blue

CollapsedL
White
.....
.0...
00...
.0...
.....

ExtendedL
white
.....
0....
00...
0....
.....

NoPushL
white
0....
.....
0....
.....
0....

CollapsedR
White
.....
...0.
...00
...0.
.....

ExtendedR
white
.....
....0
...00
....0
.....

NoPushR
white
....0
.....
....0
.....
....0

Target O
Blue
00000
0...0
0...0
0...0
00000

=======
LEGEND
=======

Crates = RedCrate or BlueCrate
Through = RedThrough

Collapsed = CollapsedL or CollapsedR
Extended = ExtendedL or ExtendedR
NoPush = NoPushL or NoPushR
Symbol = Collapsed or Extended or NoPush

RedPropagation = RedCrate or RedThrough

A = RedCrate and CollapsedL
B = RedCrate and ExtendedL
C = RedCrate and NoPushL

D = RedCrate and CollapsedR
E = RedCrate and ExtendedR
F = RedCrate and NoPushR

=======
SOUNDS
=======

================
COLLISIONLAYERS
================

background
Crates Wall
RedThrough
Collapsed
Extended
NoPush
Target
Player 

======
RULES
======

right [< Player | Crates CollapsedL] -> [< Player Crates ExtendedL | Crates]
right [> Player | Crates ExtendedL | Crates] -> [> Player | | Crates CollapsedL]
right [> Player | NoPushL] -> [Player | NoPushL]

left [< Player | Crates CollapsedR] -> [< Player Crates ExtendedR | Crates]
left [> Player | Crates ExtendedR | Crates] -> [> Player | | Crates CollapsedR]
left [> Player | NoPushR] -> [Player | NoPushR]

[> Player | Crates] -> [> Player | > Crates]

[moving RedPropagation | stationary RedPropagation] -> [moving RedPropagation | moving RedPropagation] (QQQ Cancel if not possible)

[moving Crates stationary Symbol] -> [moving Crates moving Symbol]

late [Player Crates] -> cancel

==============
WINCONDITIONS
==============

All Target on Crates
All Crates on Target
Some Target

=======
LEVELS
=======

...
...

.........
....121..
.p.b121e.
....121..
.........

########
#......#
#.d....#
#..##..#
#...oo.#
#......#
########
Auroriax commented 3 years ago

Seems to have been fixed by engine.js changes in PR #6 ? See https://github.com/Auroriax/PuzzleScript/pull/6/files#diff-99ffb48e756fc14d7ef5fadc12f980bf0e66ffecd38f84c138dacdfc80c6ef21 around row 283

Auroriax commented 2 years ago

Although I haven't tested it extensively, it is a rare bug and seems to have been fixed by the goto PR, so I am closing this card too.