Skip to content

Commit

Permalink
1.3.4 code
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdks committed Jan 24, 2019
1 parent cc3ad42 commit 1eb2066
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 27 deletions.
10 changes: 5 additions & 5 deletions code/KF2ServerTool.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectGuid>{9B3AECDB-8B01-414C-B11B-E80D00D1C83B}</ProjectGuid>
<ProjectVersion>18.3</ProjectVersion>
<MainSource>KF2ServerTool.dpr</MainSource>
<Config Condition="'$(Config)'==''">Release</Config>
<Config Condition="'$(Config)'==''">Debug</Config>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<FrameworkType>VCL</FrameworkType>
<Base>True</Base>
Expand Down Expand Up @@ -189,10 +189,10 @@
<Platform value="Win64">False</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png" Configuration="Release" Class="UWP_DelphiLogo150">
<DeployFile LocalName="$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png" Configuration="Release" Class="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets\</RemoteDir>
<RemoteName>Logo150x150.png</RemoteName>
<RemoteName>Logo44x44.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand All @@ -208,10 +208,10 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png" Configuration="Release" Class="UWP_DelphiLogo44">
<DeployFile LocalName="$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png" Configuration="Release" Class="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets\</RemoteDir>
<RemoteName>Logo44x44.png</RemoteName>
<RemoteName>Logo150x150.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand Down
Binary file modified code/KF2ServerTool.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions code/KF2ServerTool.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ OnlyShowItemsFromConfig=0
Language=BR
Theme=Killing Floor 2 DKS
AutoWebAdminLogin=1
WindowHeight=1056
WindowWidth=1936
WindowHeight=630
WindowWidth=701
FontSize=10
Maximized=1
Maximized=0
AutoCheckForUpdates=0
ListViewMode=0
[SERVERPROFILE1]
Expand Down
Binary file modified code/KF2ServerTool.res
Binary file not shown.
30 changes: 22 additions & 8 deletions code/interface/AddItem.pas
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,17 @@ procedure TFormAdd.btnFindMapRedirectNamesClick(Sender: TObject);
begin
with TOpenDialog.Create(Self) do
begin
Filter := 'Killing Floor 2 Map file (*.kfm)|*.kfm';
if Execute() then
edtItemName.Text := FileName;
begin
if Pos('KF', UpperCase(ExtractFileName(FileName))) <> 1 then
raise Exception.Create
(FormMain._s
('Invalid prefix name in the file map. Must be KF*.kfm'))
else
edtItemName.Text := FileName;
end;
Destroy;
DefaultExt := '.kfm';
Filter := '*.kfm';

end;
end;
end;
Expand Down Expand Up @@ -172,8 +177,17 @@ procedure TFormAdd.btnOkClick(Sender: TObject);
end
else
begin
addMapCycle := chkAddMapCycle.Checked and chkDownloadItem.Checked;
addMapENtry := chkAddMapEntry.Checked and chkDownloadItem.Checked;
if FrmItemType = LocalItem then
begin
addMapCycle := chkAddMapCycle.Checked;
addMapENtry := chkAddMapEntry.Checked;
end
else
begin
addMapCycle := chkAddMapCycle.Checked and chkDownloadItem.Checked;
addMapENtry := chkAddMapEntry.Checked and chkDownloadItem.Checked;

end;

end;
ItemID := edtID.Text;
Expand Down Expand Up @@ -413,12 +427,12 @@ procedure TFormAdd.FormShow(Sender: TObject);
begin
pnlWorkshopID.Visible := false;
pnlRedirectURL.Visible := false;
pnl3.Visible := True;
pnl3.Visible := true;
Self.Caption := FormMain._s('Local item');
chkDownloadItem.Checked := false;
chkDownloadItem.Visible := false;

lblPn3.Caption := FormMain._s('Map File:');
lblPn3.Caption := FormMain._s('Map File:');
chkAddWorkshopRedirect.Checked := false;
chkAddWorkshopRedirect.Visible := false;

Expand Down
6 changes: 3 additions & 3 deletions code/interface/Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ object FormMain: TFormMain
Margins.Top = 2
Margins.Right = 2
Margins.Bottom = 2
ActivePage = tsDebug
ActivePage = tsServer
Align = alClient
TabOrder = 1
OnChange = jvpgcntrl1Change
Expand Down Expand Up @@ -1945,7 +1945,7 @@ object FormMain: TFormMain
Left = 632
Top = 168
Bitmap = {
494C010106000800740010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
494C010106000800780010001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000002000000001002000000000000020
0000000000000000000000000000000000000000000000000000000000000000
0000070707302A2A2A962D2D30D8212023F9201F22F82E2D30D6282829920606
Expand Down Expand Up @@ -2355,7 +2355,7 @@ object FormMain: TFormMain
Left = 636
Top = 221
Bitmap = {
494C010102000800C000DC008000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
494C010102000800C400DC008000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
00000000000036000000280000007003000080000000010020000000000000E0
0600000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Expand Down
6 changes: 4 additions & 2 deletions code/interface/Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ procedure TFormMain.AddManualEntryClick(Sender: TObject);
progressForm.Close;
ShowMessage(_s('Finished!'));
finally
progressForm.Free;
FreeAndNil(progressForm);
end;
end;
finally
frmAdd.Free;
FreeAndNil(frmAdd);
end;
finally
LoadItensToLv('');
Expand Down Expand Up @@ -3291,6 +3291,7 @@ procedure TFormMain.jvpgcntrl1Change(Sender: TObject);
btnReinstall.Visible := True;
btnUpdate.Visible := True;
lvClick(Sender);
AddManualEntry.Visible := True;
end;
if jvpgcntrl1.ActivePage = tsMods then
begin
Expand All @@ -3299,6 +3300,7 @@ procedure TFormMain.jvpgcntrl1Change(Sender: TObject);
btnAddNew.Visible := True;
btnReinstall.Visible := True;
btnUpdate.Visible := True;
AddManualEntry.Visible := False;
lvClick(Sender);
end;
if jvpgcntrl1.ActivePage = tsUnknowed then
Expand Down
1 change: 0 additions & 1 deletion code/interface/Queue.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ object frmQueue: TfrmQueue
AutoSize = True
Caption = 'Status'
end>
GridLines = True
IconOptions.Arrangement = iaLeft
MultiSelect = True
ReadOnly = True
Expand Down
23 changes: 18 additions & 5 deletions code/units/KFServerTool.pas
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ TKFServerTool = class(TObject)
function NewRedirectItem(downURL, ItemName: String;
DownloadNow, MapCycle, MapEntry: Boolean; var dlManager: TDownloadManager;
ItemType: TKFRedirectItemType): Boolean;
Procedure InstallLocalItem(FilePath: String;
MapCycle, MapEntry: Boolean);
Procedure InstallLocalItem(FilePath: String; MapCycle, MapEntry: Boolean);
function RemoveItem(ItemName: string; itemID: string;
rmvMapEntry, rmvMapCycle, rmvSubcribe, rmvLocalFile: Boolean;
ItemSource: TKFSource; ItemType: TKFItemType): Boolean;
Expand All @@ -131,8 +130,14 @@ TKFServerTool = class(TObject)

const

SERVERTOOLVERSION = '1.3.3';
SERVERTOOLVERSION = '1.3.4';

{
CHANGE LOG VERSION 1.3.4
- Added manual item installation (Local kfm files)
- Spanish language updated
CHANGE LOG VERSION 1.3.3
- New help tip for fields
- Small corrections in text formation of translated strings
Expand Down Expand Up @@ -554,6 +559,7 @@ function TKFServerTool.ImportItemsList(inputPath: string): Integer;
FileName: string;
ItemName: string;
filesL: TStringList;
dstFilePath: String;
begin

FileName := ExtractFileName(FilePath);
Expand All @@ -562,9 +568,16 @@ function TKFServerTool.ImportItemsList(inputPath: string): Integer;
raise Exception.Create('Invalid File');
filesL := TStringList.Create;
try
dstFilePath := IncludeTrailingPathDelimiter(kfApplicationPath) +
KF_LOCALMAPSSUBFOLDER + FileName;
if FileExists(dstFilePath) then
begin
filesL.Add(dstFilePath);
FileOperation(filesL, '', 3 { FO_DELETE } );
end;
filesL.Clear;
filesL.Add(FilePath);
FileOperation(filesL, IncludeTrailingBackslash(kfApplicationPath) +
KF_LOCALMAPSSUBFOLDER + FileName, 2 { FO_COPY } );
FileOperation(filesL, dstFilePath, 2 { FO_COPY } );
if MapCycle then
AddMapCycle(ItemName, CycleSortType, CycleSortSeparators);
if MapEntry then
Expand Down

0 comments on commit 1eb2066

Please sign in to comment.