| Search |
|---|
| ID | Rating | Category | Description | Screenshot | Date |
|---|---|---|---|---|---|
| 4705 | 🙂 | General | It would be nice if programs could have some different start point for when a controller is restarted vs when a controller starts the first time in a building that has been copy-pasted. I use copy paste often to build some kinds of facilities. I look to a nearby one, hit c, hit v, click, done. This can be much faster and more convenient than navigating my whole design library. The neat thing about copy paste is that it copies all settings and registers as well as programs and equipment. The problem with copy paste is... sometimes I don't want that, because I want the new building to wait until I have a chance to configure it before it begins to act! And we can't easy have a program that zeros its configuration on first launch, because changes to the program cause it to start again too. So here, pictured in the screenshot, is my best workaround so far. I have a register with no purpose except to remember (across program restarts!) what the current unit is. On program start, if that persistent register *does not* match the *actual* current unit, then the program realizes it's been copy-pasted, and then proceeds to clear its configuration. This works, but wow, it's a lot of program. --- So the above suggestion is: consider giving optional different entry points for program first-time start and re-start. Or something to hook building completion (same thing). But also, I would like to take this opportunity to note... if I wanted to take my program piece pictured, and turn it into a subroutine... it's very difficult to do so. There are two reasons: 1. We can't make subroutines that offer a branch of output flow. That's a quite horrible limit ;) 2. A persistent register to store data across program restart is only available to the top-level routine (not subroutines) or if one uses the unit base parameters (which is quite limited). Maybe challenge #2 there is quite understandable (not letting users create non-visible persistent state is probably wise!). But challenge #1 is super nasty. Please let us make subroutines that can branch flow after themselves! | 2024-09-12 11:33:10 |
| ID | Reply | Author | Date |
|---|