ChivalryServerLauncher/source/Resources.pas
Mark van Renswoude 47129c0b32 Added: map preview
Added: changing active game
2014-07-01 21:18:07 +00:00

40 lines
849 B
ObjectPascal

unit Resources;
interface
const
AssetsPath = 'assets\';
AssetChivalryMedievalWarfareMapListFileName = 'Chivalry.MedievalWarfare.MapList.ini';
AssetMapPreviewPath = 'maps\';
AssetMapPreviewExtension = '.jpg';
UserDataPath = 'Chivalry Server Launcher\';
UserGamesFileName = 'Games.json';
function GetAssetPath(const AAsset: string): string;
function GetUserDataPath(const AAsset: string): string;
implementation
uses
System.SysUtils,
X2UtApp;
function GetAssetPath(const AAsset: string): string;
begin
Result := App.UserPath + UserDataPath + AssetsPath + AAsset;
if not FileExists(Result) then
Result := App.Path + AssetsPath + AAsset;
end;
function GetUserDataPath(const AAsset: string): string;
begin
Result := App.UserPath + UserDataPath + AAsset;
end;
end.