ubc-minetest-classroom / minetest_classroom

Repo for Mintest Classroom game
GNU General Public License v3.0
10 stars 6 forks source link

Tutorial rewards fail after tutorial is edited or completed #215

Open pauldpickell opened 1 year ago

pauldpickell commented 1 year ago

Describe the bug Rewards can be edited after a tutorial is created or completed, but

To Reproduce Steps to reproduce the behavior:

  1. Open the tutorial recording tool and record some event.
  2. In the tutorial save window, add any item, tool, or node as a reward for completing the tutorial, then press Finish and save.
  3. Open the tutorial tool, select the tutorial, start the tutorial, and complete the tutorial then receive the reward.
  4. Open the tutorial tool, select the tutorial, edit the tutorial, change the reward to another item, tool, or node, then press Finish and save.
  5. Open the tutorial tool, select the tutorial, start the tutorial, and complete the tutorial then receive nothing.

Expected behavior If the reward has not changed when the tutorial is edited, then do not grant any additional quantity of items, tools, or nodes beyond what the tutorial already permits. This is roughly the current behaviour, although perhaps unintended. We do not want to allow players to continue to complete the tutorial and accumulate more items, tools, or nodes than intended.

If the reward is changed when the tutorial is edited, then grant that new reward when the tutorial is completed again. If dealing with a tool, then the tool manager should also be checked/updated to ensure that the player does not currently have any tools in their inventory that is(are) not currently allowed by the tutorial/classroom.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.