Mise à jour de 'SOTF_FixCompanions.ps1'

This commit is contained in:
2023-03-11 12:39:54 +01:00
parent c347c27a49
commit c6c8c7d6a4

View File

@@ -1,6 +1,7 @@
# CHACHA 2023
# V1.0
# CC BY-NC-SA
$ErrorActionPreference = "Stop"
$MaxUniqueID=380000
@@ -8,10 +9,10 @@ $AppDataPath = [Environment]::GetFolderPath('ApplicationData') | split-path
$SavesPath = [IO.Path]::Combine($AppDataPath,"LocalLow","Endnight","SonsOfTheForest","Saves")
$SaveDirPartial = Get-ChildItem -Path $SavesPath | Sort-Object -Property LastWriteTime -Descending | Select Name -First 1 -ExpandProperty Name
$SaveDirPartial = Get-ChildItem -Path $SavesPath | ?{ $_.PSIsContainer } | Sort-Object -Property LastWriteTime -Descending | Select Name -First 1 -ExpandProperty Name
$SaveDirPartial = [IO.Path]::Combine($SavesPath,$SaveDirPartial,"Multiplayer")
$SaveDir = Get-ChildItem -Path $SaveDirPartial | Sort-Object -Property LastWriteTime -Descending | Select Name -First 1 -ExpandProperty Name
$SaveDir = Get-ChildItem -Path $SaveDirPartial| ?{ $_.PSIsContainer } | Sort-Object -Property LastWriteTime -Descending | Select Name -First 1 -ExpandProperty Name
$SaveDir = [IO.Path]::Combine($SaveDirPartial,$SaveDir)
############################