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

Function ModDisplayName

engine/Poseidon/Core/ModCollection.cpp:68–75  ·  view source on GitHub ↗

Display name: the mod.json "name" when present, else the folder name with a leading '@' (the OFP convention) trimmed for readability.

Source from the content-addressed store, hash-verified

66
67// Display name: the mod.json "name" when present, else the folder name with a
68// leading '@' (the OFP convention) trimmed for readability.
69std::string ModDisplayName(const std::string& folder, const std::string& jsonName)
70{
71 if (!jsonName.empty())
72 return jsonName;
73 if (!folder.empty() && folder[0] == '@')
74 return folder.substr(1);
75 return folder;
76}
77
78// Last path component, verbatim (keeps the '@' and case). Handles both '/' and '\'

Callers 2

ScanModsRootFunction · 0.85
ActiveModsFromMountPathFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected