FAForever / FAForeverMapEditor

A community-made map editor for the game Supreme Commander Forged Alliance
MIT License
3 stars 2 forks source link

Implement file system watcher for textures (strata / decals) #22

Open MrRowey opened 6 months ago

MrRowey commented 6 months ago

@Garanas could you please provide a short description on the how the desired outcome would look

Garanas commented 6 months ago

It would need something such as this:

Which allows you to receive events when a file is changed on disk. Files are changed often when using procedural software such as Gaea, usually decals and/or map-wide content that are prime candidates for this.

Based on the reload function here:

https://github.com/FAForever/FAForeverMapEditor/blob/ef338393d099e18e2640e3b2f773e7ce0df1573f/Assets/Scripts/UI/Tools/Stratum/StratumInfo.cs#L327-L372

The current data is defined here:

https://github.com/FAForever/FAForeverMapEditor/blob/ef338393d099e18e2640e3b2f773e7ce0df1573f/Assets/Scripts/Ozone%20SCMAP%20Code/ScmapEditor.cs#L16C16-L16C27

With the terrain textures defined here:

https://github.com/FAForever/FAForeverMapEditor/blob/ef338393d099e18e2640e3b2f773e7ce0df1573f/Assets/Scripts/Ozone%20SCMAP%20Code/ScmapEditor.cs#L38

With the class responsible for the textures being here:

https://github.com/FAForever/FAForeverMapEditor/blob/ef338393d099e18e2640e3b2f773e7ce0df1573f/Assets/Scripts/Ozone%20SCMAP%20Code/ScmapEditor.cs#L50-L60

My suggestion would be to do the following steps, in separate pull requests:

I hope that gives you a direction. Note that I have not worked with the code that much, which means that the suggestions may be wrong.