Today I had to figure out some stuff about how prototypes are supposed to work. Since they have a 1:1 relationship to the files which store their data, when and how they get written is super important to make consistent so I don’t find myself in a situation where they’re unexpectedly out of sync.
The way it works now: When the game is started, all of the prototypes in the prototype directory are loaded into the game for use. These can be modified in any way, and when they are the changes aren’t saved until a savePrototype command is called. HOWEVER, if a prototype is renamed, both it and its file will immediately be renamed to reflect this change — this behavior is slightly inconsistent, but it should be easy enough to get used to.
I should also make it so that when the prototype is saved it automatically saves the old copy as a backup. That seems like a good idea.