CnCNet / xna-cncnet-client

XNA / MonoGame based client for playing classic Command & Conquer games both online and offline with a CnCNet game spawner.
Other
226 stars 87 forks source link

Enhancement: Show "Custom" game mode if a map is added to the Maps/Custom/ folder while the client is running #352

Open alexlambson opened 2 years ago

alexlambson commented 2 years ago

I noticed that the Custom gamemode doesn't appear if the Maps/Custom folder was empty at client start, even if I use /downloadmap and it downloads successfully or I add a map file to the folder using my OS.

Perhaps we should add some kind of file-watcher to the Maps/Custom folder to constantly check if we need to update the Custom maps list and game mode dropdown.

Reproduction:

Expected: Custom is added to the game mode dropdown after a successful map download or adding a .map file to the Maps/Custom folder. The newly added map is listed as an option in the Custom map list.

Actual: Custom remains hidden even though there are maps in the folder now.

Metadorius commented 2 years ago

Yeah this would be a good improvement, I actually suggested that too some time before. Could set up a file watcher that would update the custom map list.

alexlambson commented 2 years ago

I can give it a shot after work if everyone else is okay with adding this. I think we'd only need it for Custom

Metadorius commented 2 years ago

Yeah previously everyone else agreed it would be a nice addition. Non-custom maps are loaded from a pre-made list anyway.

alexlambson commented 2 years ago

I'll definitely give it a shot then