#DataHandler::loadships forces data/ships creation

6 messages · Page 1 of 1 (latest)

junior sinew
#

Playtime: 4 hours in-game, more modding
Version: 0.13.0.7
Mods: yes, the issue effects all mods

The directory.exists pattern found in DataHandler::LoadModJsons

if (!Directory.Exists(strFolderPath)){ return; }

is missing from DataHandler::LoadShips

This forces the creation of a data/ships folder in all mods.
Otherwise the following error occurs, and renders the main menu non-functioning.

DirectoryNotFoundException: Directory 'C:/Program Files (x86)/Steam/steamapps/common/Ostranauts/Ostranauts_Data/Mods\NoAge/data/ships' not found.
  at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0 
  at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0 
  at DataHandler.LoadShips (System.String strFolderPath, System.String[] aIgnorePatterns) [0x00000] in <filename unknown>:0 
  at DataHandler.LoadMod (System.String strFolderPath, System.String[] aIgnorePatterns, .JsonModInfo jmi) [0x00000] in <filename unknown>:0 
  at DataHandler.Init () [0x00000] in <filename unknown>:0 
  at MainMenu.Init () [0x00000] in <filename unknown>:0 
  at MainMenu.Start () [0x00000] in <filename unknown>:0
thorn scroll
#

IIRC this is noted in the community mod making guide. Every mod needs to have a Ships folder (even if it's empty)

junior sinew
#

DataHandler::LoadShips is also missing the PathSanitize, I'm not certain but it seems to me you could just use LoadModJsons for the ships like the rest of the files.
Perhaps not passing aIgnorePatterns if that functionallity is not desired for ships specifically.

junior sinew