MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / LocalModsRoot

Function LocalModsRoot

engine/Poseidon/UI/OptionsUIApp.cpp:1232–1238  ·  view source on GitHub ↗

The mods root the MODS screen scans for local @ folders: the explicit --mods-dir (tests / power users) when given, else the managed mods root. The two managed mod roots. Local mods (the user's own) live under --mods-dir or GamePaths::ModsDir(); downloaded (workshop) mods under --workshop-dir or GamePaths::WorkshopDir(). Keeping them apart preserves each mod's source across launches — a downlo

Source from the content-addressed store, hash-verified

1230// The mods root the MODS screen scans for local @<mod> folders: the explicit
1231// --mods-dir (tests / power users) when given, else the managed mods root.
1232// The two managed mod roots. Local mods (the user's own) live under --mods-dir or
1233// GamePaths::ModsDir(); downloaded (workshop) mods under --workshop-dir or
1234// GamePaths::WorkshopDir(). Keeping them apart preserves each mod's source across
1235// launches — a downloaded mod stays "workshop" because it sits in the workshop root.
1236static std::string LocalModsRoot()
1237{
1238 const RString& cli = AppConfig::Instance().GetModsDir();
1239 if (cli.GetLength() > 0)
1240 return (const char*)cli;
1241 return Foundation::GamePaths::Instance().ModsDir();

Callers 3

ScanModRowsFunction · 0.85
OnButtonClickedMethod · 0.85
OnChildDestroyedMethod · 0.85

Calls 1

GetLengthMethod · 0.45

Tested by

no test coverage detected