diff --git a/assets/Chivalry.MedievalWarfare.MapList.ini b/assets/Chivalry.MedievalWarfare.MapList.ini index 39901e5..5261385 100644 --- a/assets/Chivalry.MedievalWarfare.MapList.ini +++ b/assets/Chivalry.MedievalWarfare.MapList.ini @@ -4,6 +4,8 @@ AOCTO-Darkforest_p=Dark forest AOCTO-Hillside_P=Hillside AOCTO-Stoneshill_P=Stoneshill AOCTO-Citadel_p=Citadel +AOCTO-Coldfront_p=Coldfront +AOCTO-Outpost_p=Outpost [Capture the Flag] AOCCTF-Frigid_p=Frigid @@ -47,6 +49,13 @@ AOCLTS-Ruins_P=Ruins AOCLTS-Ruins_Large_P=Ruins Large AOCLTS-StoneshillVillage_P=Stoneshill Village AOCLTS-ThroneRoom_P=Throne Room +AOCLTS-Bridge_p=Bridge +AOCLTS-Cistern_p=Cistern +AOCLTS-Courtyard_p=Courtyard +AOCLTS-Dininghall_p=Dining Hall +AOCLTS-FrostPeak_p=Frostpeak +AOCLTS-Mines_p=Mines +AOCLTS-Shipyard_p=Shipyard [Free for All] AOCFFA-Arena3_p=Arena @@ -58,6 +67,13 @@ AOCFFA-Moor_p=Moor AOCFFA-Ruins_P=Ruins AOCFFA-ThroneRoomXL_P=Throne Room XL AOCFFA-StoneshillVillage_P=Stoneshill Village +AOCFFA-Bridge_p=Bridge +AOCFFA-Cistern_p=Cistern +AOCFFA-Courtyard_p=Courtyard +AOCFFA-Dininghall_p=Dining Hall +AOCFFA-FrostPeak_p=Frostpeak +AOCFFA-Mines_p=Mines +AOCFFA-Shipyard_p=Shipyard [Team Deathmatch] AOCTD-Frigid_p=Frigid @@ -73,4 +89,11 @@ AOCTD-HillsidePyre_P=Hillside Pyre AOCTD-Darkforest_XL_p=Dark forest XL AOCTD-Darkforest_Valley_p=Dark forest Valley AOCTD-Moor_Large_p=Moor Large -AOCTD-Ruins_Large_P=Ruins Large \ No newline at end of file +AOCTD-Ruins_Large_P=Ruins Large +AOCTD-Bridge_p=Bridge +AOCTD-Cistern_p=Cistern +AOCTD-Courtyard_p=Courtyard +AOCTD-Dininghall_p=Dining Hall +AOCTD-FrostPeak_p=Frostpeak +AOCTD-Mines_p=Mines +AOCTD-Shipyard_p=Shipyard \ No newline at end of file diff --git a/assets/maps/AOCFFA-Bridge_p.jpg b/assets/maps/AOCFFA-Bridge_p.jpg new file mode 100644 index 0000000..9183e19 Binary files /dev/null and b/assets/maps/AOCFFA-Bridge_p.jpg differ diff --git a/assets/maps/AOCFFA-Cistern_p.jpg b/assets/maps/AOCFFA-Cistern_p.jpg new file mode 100644 index 0000000..f33fd9a Binary files /dev/null and b/assets/maps/AOCFFA-Cistern_p.jpg differ diff --git a/assets/maps/AOCFFA-Courtyard_p.jpg b/assets/maps/AOCFFA-Courtyard_p.jpg new file mode 100644 index 0000000..6fc606b Binary files /dev/null and b/assets/maps/AOCFFA-Courtyard_p.jpg differ diff --git a/assets/maps/AOCFFA-Dininghall_p.jpg b/assets/maps/AOCFFA-Dininghall_p.jpg new file mode 100644 index 0000000..08ff463 Binary files /dev/null and b/assets/maps/AOCFFA-Dininghall_p.jpg differ diff --git a/assets/maps/AOCFFA-FrostPeak_p.jpg b/assets/maps/AOCFFA-FrostPeak_p.jpg new file mode 100644 index 0000000..3e3c4e6 Binary files /dev/null and b/assets/maps/AOCFFA-FrostPeak_p.jpg differ diff --git a/assets/maps/AOCFFA-Mines_p.jpg b/assets/maps/AOCFFA-Mines_p.jpg new file mode 100644 index 0000000..6cacc86 Binary files /dev/null and b/assets/maps/AOCFFA-Mines_p.jpg differ diff --git a/assets/maps/AOCFFA-Shipyard_p.jpg b/assets/maps/AOCFFA-Shipyard_p.jpg new file mode 100644 index 0000000..c0693e8 Binary files /dev/null and b/assets/maps/AOCFFA-Shipyard_p.jpg differ diff --git a/assets/maps/AOCLTS-Bridge_p.jpg b/assets/maps/AOCLTS-Bridge_p.jpg new file mode 100644 index 0000000..9183e19 Binary files /dev/null and b/assets/maps/AOCLTS-Bridge_p.jpg differ diff --git a/assets/maps/AOCLTS-Cistern_p.jpg b/assets/maps/AOCLTS-Cistern_p.jpg new file mode 100644 index 0000000..f33fd9a Binary files /dev/null and b/assets/maps/AOCLTS-Cistern_p.jpg differ diff --git a/assets/maps/AOCLTS-Courtyard_p.jpg b/assets/maps/AOCLTS-Courtyard_p.jpg new file mode 100644 index 0000000..6fc606b Binary files /dev/null and b/assets/maps/AOCLTS-Courtyard_p.jpg differ diff --git a/assets/maps/AOCLTS-Dininghall_p.jpg b/assets/maps/AOCLTS-Dininghall_p.jpg new file mode 100644 index 0000000..08ff463 Binary files /dev/null and b/assets/maps/AOCLTS-Dininghall_p.jpg differ diff --git a/assets/maps/AOCLTS-FrostPeak_p.jpg b/assets/maps/AOCLTS-FrostPeak_p.jpg new file mode 100644 index 0000000..3e3c4e6 Binary files /dev/null and b/assets/maps/AOCLTS-FrostPeak_p.jpg differ diff --git a/assets/maps/AOCLTS-Mines_p.jpg b/assets/maps/AOCLTS-Mines_p.jpg new file mode 100644 index 0000000..6cacc86 Binary files /dev/null and b/assets/maps/AOCLTS-Mines_p.jpg differ diff --git a/assets/maps/AOCLTS-Shipyard_p.jpg b/assets/maps/AOCLTS-Shipyard_p.jpg new file mode 100644 index 0000000..c0693e8 Binary files /dev/null and b/assets/maps/AOCLTS-Shipyard_p.jpg differ diff --git a/assets/maps/AOCTD-Bridge_p.jpg b/assets/maps/AOCTD-Bridge_p.jpg new file mode 100644 index 0000000..9183e19 Binary files /dev/null and b/assets/maps/AOCTD-Bridge_p.jpg differ diff --git a/assets/maps/AOCTD-Cistern_p.jpg b/assets/maps/AOCTD-Cistern_p.jpg new file mode 100644 index 0000000..f33fd9a Binary files /dev/null and b/assets/maps/AOCTD-Cistern_p.jpg differ diff --git a/assets/maps/AOCTD-Courtyard_p.jpg b/assets/maps/AOCTD-Courtyard_p.jpg new file mode 100644 index 0000000..6fc606b Binary files /dev/null and b/assets/maps/AOCTD-Courtyard_p.jpg differ diff --git a/assets/maps/AOCTD-Dininghall_p.jpg b/assets/maps/AOCTD-Dininghall_p.jpg new file mode 100644 index 0000000..08ff463 Binary files /dev/null and b/assets/maps/AOCTD-Dininghall_p.jpg differ diff --git a/assets/maps/AOCTD-FrostPeak_p.jpg b/assets/maps/AOCTD-FrostPeak_p.jpg new file mode 100644 index 0000000..3e3c4e6 Binary files /dev/null and b/assets/maps/AOCTD-FrostPeak_p.jpg differ diff --git a/assets/maps/AOCTD-Mines_p.jpg b/assets/maps/AOCTD-Mines_p.jpg new file mode 100644 index 0000000..6cacc86 Binary files /dev/null and b/assets/maps/AOCTD-Mines_p.jpg differ diff --git a/assets/maps/AOCTD-Shipyard_p.jpg b/assets/maps/AOCTD-Shipyard_p.jpg new file mode 100644 index 0000000..c0693e8 Binary files /dev/null and b/assets/maps/AOCTD-Shipyard_p.jpg differ diff --git a/source/model/Game.Base.pas b/source/model/Game.Base.pas index 4f77fea..6d2b756 100644 --- a/source/model/Game.Base.pas +++ b/source/model/Game.Base.pas @@ -28,6 +28,7 @@ type function GetExecutable: string; virtual; abstract; function GetParameters: string; virtual; function GetCommandLine: string; virtual; + function GetConfigPath: string; virtual; property Loaded: Boolean read FLoaded; property Location: string read FLocation; @@ -108,6 +109,12 @@ begin end; +function TCustomGame.GetConfigPath: string; +begin + Result := ExtractFilePath(GetExecutable); +end; + + procedure TCustomGame.PropertyChanged(const APropertyName: string); begin if not FModified then diff --git a/source/model/Game.Chivalry.pas b/source/model/Game.Chivalry.pas index f7fbac6..9bc211d 100644 --- a/source/model/Game.Chivalry.pas +++ b/source/model/Game.Chivalry.pas @@ -36,6 +36,7 @@ type function GetExecutable: string; override; function GetParameters: string; override; + function GetConfigPath: string; override; { IGameNetwork } function GetServerPort: Integer; @@ -102,7 +103,9 @@ uses const - GameSettingsFileName = 'UDKGame\Config\PCServer-UDKGame.ini'; + GameSettingsPath = 'UDKGame\Config\'; + + GameSettingsFileName = GameSettingsPath + 'PCServer-UDKGame.ini'; GameURL = 'URL'; GameURLPort = 'Port'; GameURLPortDefault = 7777; GameURLPeerPort = 'PeerPort'; GameURLPeerPortDefault = 7778; @@ -119,7 +122,7 @@ const GameAccessControlAdminPassword = 'AdminPassword'; - EngineSettingsFileName = 'UDKGame\Config\PCServer-UDKEngine.ini'; + EngineSettingsFileName = GameSettingsPath + 'PCServer-UDKEngine.ini'; EngineSteam = 'OnlineSubsystemSteamworks.OnlineSubsystemSteamworks'; EngineSteamQueryPort = 'QueryPort'; EngineSteamQueryPortDefault = 27015; @@ -181,6 +184,12 @@ begin end; +function TChivalryGame.GetConfigPath: string; +begin + Result := Location + GameSettingsPath; +end; + + procedure TChivalryGame.DoLoad; var gameSettings: TUDKIniFile; diff --git a/source/view/Forms.Main.dfm b/source/view/Forms.Main.dfm index da0994f..1f4b97b 100644 --- a/source/view/Forms.Main.dfm +++ b/source/view/Forms.Main.dfm @@ -2581,6 +2581,10 @@ object MainForm: TMainForm Caption = '&Revert changes' OnExecute = actRevertExecute end + object actOpenConfigFolder: TAction + Caption = '&Open server configuration folder' + OnExecute = actOpenConfigFolderExecute + end end object pmnLaunch: TPopupMenu Left = 144 @@ -2588,6 +2592,12 @@ object MainForm: TMainForm object pmnLaunchCopyCmdLine: TMenuItem Action = actCopyCmdLine end + object pmnLaunchSep1: TMenuItem + Caption = '-' + end + object pmnLaunchOpenConfigFolder: TMenuItem + Action = actOpenConfigFolder + end end object alMapList: TActionList Images = glToolbar diff --git a/source/view/Forms.Main.pas b/source/view/Forms.Main.pas index 3b5ee4c..09211ac 100644 --- a/source/view/Forms.Main.pas +++ b/source/view/Forms.Main.pas @@ -145,6 +145,9 @@ type lblAdminPassword: TLabel; edtAdminPassword: TEdit; cbShowPasswords: TCheckBox; + pmnLaunchSep1: TMenuItem; + actOpenConfigFolder: TAction; + pmnLaunchOpenConfigFolder: TMenuItem; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); @@ -176,6 +179,7 @@ type procedure actMapUpExecute(Sender: TObject); procedure actMapDownExecute(Sender: TObject); procedure cbShowPasswordsClick(Sender: TObject); + procedure actOpenConfigFolderExecute(Sender: TObject); private type TBindingExpressionList = TList; TPageMenuDictionary = TDictionary; @@ -946,6 +950,15 @@ begin end; +procedure TMainForm.actOpenConfigFolderExecute(Sender: TObject); +begin + if not Assigned(ActiveGame) then + exit; + + ShellExecute(Self.Handle, 'explore', PChar(ActiveGame.GetConfigPath), nil, nil, SW_SHOWNORMAL); +end; + + procedure TMainForm.actMapAddExecute(Sender: TObject); var gameMapList: IGameMapList; diff --git a/source/view/Forms.Map.dfm b/source/view/Forms.Map.dfm index 900a845..015e638 100644 --- a/source/view/Forms.Map.dfm +++ b/source/view/Forms.Map.dfm @@ -81,6 +81,7 @@ object MapForm: TMapForm TabOrder = 1 TreeOptions.PaintOptions = [toHideFocusRect, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages] TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect] + OnChange = vstMapChange OnCollapsing = vstMapCollapsing OnCompareNodes = vstMapCompareNodes OnFocusChanged = vstMapFocusChanged diff --git a/source/view/Forms.Map.pas b/source/view/Forms.Map.pas index cde7420..e89adea 100644 --- a/source/view/Forms.Map.pas +++ b/source/view/Forms.Map.pas @@ -39,6 +39,7 @@ type procedure vstMapPaintText(Sender: TBaseVirtualTree; const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType); procedure vstMapFocusChanging(Sender: TBaseVirtualTree; OldNode, NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex; var Allowed: Boolean); procedure vstMapFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex); + procedure vstMapChange(Sender: TBaseVirtualTree; Node: PVirtualNode); procedure vstMapCollapsing(Sender: TBaseVirtualTree; Node: PVirtualNode; var Allowed: Boolean); procedure vstMapCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer); procedure edtMapNameChange(Sender: TObject); @@ -300,6 +301,16 @@ begin end; +procedure TMapForm.vstMapChange(Sender: TBaseVirtualTree; Node: PVirtualNode); +const + EditColor: array[Boolean] of TColor = (clBtnFace, clWindow); + +begin + edtMapName.Enabled := (Sender.selectedCount <= 1); + edtMapName.Color := EditColor[edtMapName.Enabled]; +end; + + procedure TMapForm.vstMapCollapsing(Sender: TBaseVirtualTree; Node: PVirtualNode; var Allowed: Boolean); begin Allowed := False;