tyoeer / Chaoshead

A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead
Apache License 2.0
4 stars 1 forks source link

Allow chaoshead to generally be able to load any .lhs file #114

Closed slothybutt closed 1 year ago

slothybutt commented 1 year ago

I tried to do some scripting stuff on another computer that doesn't have Levelhead today. I got some .lhs files for testing, and I ended up needing to replicate the /PlatformerBuilder/UserData/(profilecode)/Stages directory to put the file in, but Chaoshead still didn't recognize it. After testing, this seems to be because you need a save_data folder (with the correct data about the .lhs files) one level down for CH to be able to see the level.

For this, I think it would be nice if Chaoshead could just open any .lhs file, with a file prompt window like many other windows programs. I don't know if there's any essential data contained in the save_data file that is needed for the reading of the .lhs file, but if there is not, it would be nice to have Chaoshead not be completely dependent on the save_data file to do its main job.

tyoeer commented 1 year ago

If there's no save_data file, CH should just list the .lhs files in /PlatformerBuilder/UserData/(profilecode/whatever you want)/ (though not yet in subdirectories).

A file prompt isn't directly supported by LÖVE and would be a lot of work, but letting files be able to get dropped on the CH window to open them should be possible. It also might be possible to make CH able to be used to open LHS files directly from the file explorer, but that would probably open a new CH window for every file.

tyoeer commented 1 year ago

Added in af28aff89506bf378c2e073895003ea4a1f11b42 and 5d3977851e411b41d530855ad98321a7f4459b03