Bugfix api call

This commit is contained in:
BubbaGumpShrump 2024-12-05 07:25:43 -05:00
parent 53d552a95e
commit e6055ab110
3 changed files with 15 additions and 4 deletions

View file

@ -8,6 +8,7 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<Configurations>Debug;Release;Test</Configurations> <Configurations>Debug;Release;Test</Configurations>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<ApplicationIcon>AutoTrackR2.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -24,6 +25,10 @@
<None Remove="KillTrackR_MainScript.ps1" /> <None Remove="KillTrackR_MainScript.ps1" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="AutoTrackR2.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Assets\D3VL.png"> <Resource Include="Assets\D3VL.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

BIN
AutoTrackR2/AutoTrackR2.ico Normal file

Binary file not shown.

After

(image error) Size: 257 KiB

View file

@ -34,24 +34,30 @@ if ($offlineMode -eq 1){
} else { } else {
$offlineMode = $false $offlineMode = $false
} }
Write-Output "PlayerName=OfflineMode: $offlineMode"
if ($videoRecord -eq 1){ if ($videoRecord -eq 1){
$videoRecord = $true $videoRecord = $true
} else { } else {
$videoRecord = $false $videoRecord = $false
} }
Write-Output "PlayerName=VideoRecord: $videoRecord"
if ($visorWipe -eq 1){ if ($visorWipe -eq 1){
$visorWipe = $true $visorWipe = $true
} else { } else {
$visorWipe = $false $visorWipe = $false
} }
Write-Output "PlayerName=VisorWipe: $visorWipe"
If (Test-Path $logFilePath) { If (Test-Path $logFilePath) {
Write-Output "PlayerName=Logfile found" Write-Output "PlayerName=Logfile found"
} else { } else {
Write-Output "Logfile not found." Write-Output "Logfile not found."
} }
If ($null -ne $apiUrl){
Write-output "PlayerName=$apiURL"
}
# Ship Manufacturers # Ship Manufacturers
$prefixes = @( $prefixes = @(
@ -277,7 +283,7 @@ function Read-LogEntry {
# Send to API # Send to API
# Define the data to send # Define the data to send
If ($apiUrl -eq $true -and $offlineMode -eq $false){ If ($null -ne $apiUrl -and $offlineMode -eq $false){
$data = @{ $data = @{
victim_ship = $enemyShip victim_ship = $enemyShip
victim = $enemyPilot victim = $enemyPilot
@ -286,9 +292,9 @@ function Read-LogEntry {
weapon = $weapon weapon = $weapon
method = $damageType method = $damageType
loadout_ship = $ship loadout_ship = $ship
#gameVersion = $GameVersion gameVersion = $GameVersion
#gameMode = $GameMode gameMode = $GameMode
#trackrVersion = $TrackRver trackrVersion = $TrackRver
} }
# Headers which may or may not be necessary # Headers which may or may not be necessary