xna-cncnet-client icon indicating copy to clipboard operation
xna-cncnet-client copied to clipboard

#352: Add custom map directory file watcher

Open alexlambson opened this issue 2 years ago • 3 comments

  • Add a file watcher that will detect when a map is added or deleted, then update the game mode dropdown according to the new map list
  • Add and use CustomMapsDirectory field to MapLoader to avoid hard coded strings.
  • Add GetLoadedMapBySha1 to remove some duplicate GameModeMaps.Find().
  • Add a function RefreshGameModeDropdown to modify the dropdown after client is loaded. The function is a bit complicated due to doing inline modifications to the items and keeping the selected mode.

Issue: https://github.com/CnCNet/xna-cncnet-client/issues/352

alexlambson avatar Aug 02 '22 03:08 alexlambson

Nightly build for this pull request:

  • artifacts.zip This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.

github-actions[bot] avatar Aug 02 '22 03:08 github-actions[bot]

I think I addressed all the feedback

alexlambson avatar Oct 16 '22 02:10 alexlambson

Does this currently handle a case where existing custom maps are modified? If that is done, the SHA1 for the map in question needs to be recalculated. See FileSystemWatcher.Changed event.

It does not, but the map will still load if you try to play it. The Client can already handle that case. I often just save the map in FA2 then just click "play" and it works.

alexlambson avatar Nov 04 '22 04:11 alexlambson