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

Directional again doesn't work #117

Closed Unexian closed 1 year ago

Unexian commented 1 year ago

Describe the bug If you have a rule with a direction and again, puzzlescript refuses to acknowledge either.

Reproduction Steps

  1. Create a rule with a direction and again (such as again down [ player | no wall ] -> [ | player ])
  2. Compile the project (and optionally try the rule)

What did you expect would happen? The rule gets compiled as you would expect it to

OS & Browser version, desktop/mobile Opera GX Level 4 core 99.0.4788.75 early access using chromium 113.0.5672.127 64x windows 10 home 21H2 build 19044.3086 from Windows Feature Experience Pack 1000.19041.1000.0 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz

Screenshots, example projects, other relevant issues, etc. Example project

Auroriax commented 1 year ago

Again is a command and should always be on the right-hand side of a rule (like down [ player | no wall ] -> [ | player ] again. Although I agree it's a bit weird that the syntax highlighting is correct even if used on the left-hand side. It seems I get the same behavior for vanilla PS so please consider also reporting it there.

Unexian commented 1 year ago

Again is a command and should always be on the right-hand side of a rule (like down [ player | no wall ] -> [ | player ] again. Although I agree it's a bit weird that the syntax highlighting is correct even if used on the left-hand side. It seems I get the same behavior for vanilla PS so please consider also reporting it there.

That is actually how it works

david-pfx commented 1 year ago

Not clear. Is this a compile error (PS not raising an error for again used as a rule prefix), or is there an actual bug when again is used correctly?

Unexian commented 1 year ago

Not clear. Is this a compile error (PS not raising an error for again used as a rule prefix), or is there an actual bug when again is used correctly?

both