Skip to content

Can't twiddle the same metadata more than once per turn #106

@Auroriax

Description

@Auroriax

Describe the bug
If you change the same metadata two or more times per turn, only the first twiddle of that turn is actually enacted. (Seemingly because of an optimization that makes perfect sense in vanilla PS, but can cause some weird edge cases like this in PS+.)

There are use cases for twiddling multiple times per turn I think (the one that was reported had a "gameplay" time and a "victory" time, and if later in the turn you detect victory, you can just change it a second time instead of doing a weird workaround like saving it to an object or something, like I did for Sorting of Sorts).

Reproduction Steps

  1. Load the "Basic" PS example
  2. Replace the rules with:
[ >  Player | Crate ] -> again_interval 0.5
[ >  Player | Crate ] -> again_interval 0.8
  1. Run the game with verbose logging, then walk into a crate. You'll see that only the first command is reported and executed.

What did you expect would happen?
Either a warning or simply being allowed to change the same metadata field multiple times per turn.

OS & Browser version, desktop/mobile
Windows 10, Firefox

Screenshots, example projects, other relevant issues, etc.
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions