KoBeWi / Godot-Project-Builds

Graphical automation tool for building and publishing Godot games.
https://godotengine.org/asset-library/asset/2925
MIT License
172 stars 3 forks source link

Sub-routines are sometimes set automatically #6

Closed svetogam closed 4 weeks ago

svetogam commented 1 month ago

The routines that sub-routine tasks are set to run are sometimes set automatically. This can lead to accidentally executing something.

Case 1:

  1. Add 2 routines (Routine 1 and Routine 2) with different tasks
  2. Add a new routine (Routine 3) with sub-routine task, and select "Routine 1"
  3. Delete Routine 1
    • (Running Routine 3 at this point does nothing and gives the error: Sub-Routine::Invalid routine name or no tasks)
  4. Edit Routine 3, don't do anything, and exit.
  5. Run Routine 3. This executes Routine 2 despite it never being selected. (Though the user can see that the sub-routine task in Routine 3 was set to execute Routine 2.)

Case 2:

  1. When there are no other routines, add a new routine with sub-routine task
  2. Add a second routine with some task
  3. Execute the first routine. It will execute the second routine despite it never being selected.

This also happens whenever a sub-routine task is added and other routines exist. But in this case the user can easily see it and select the correct routine for sub-routine task.

This problem could be fixed if there was a "None" option in the sub-routine task's dropdown menu. It should default to this option when first created, and it should switch to this option when the routine it previously referenced is deleted.

A related usability improvement would be to give a confirmation popup when the user tries to delete a routine that is referenced by some sub-routine. This would be like the note the Godot editor gives when trying to delete a script that is used somewhere. But this is less important than preventing accidental execution.

KoBeWi commented 4 weeks ago

2174d9b