Hiranus

Steam SB Mod Unpacker

Jan 8th, 2019
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Mod
  2. {
  3.     $FullPath
  4.     $ModId
  5.  
  6.     Mod($file) {
  7.  
  8.         $this.FullPath = $file.FullName;
  9.         $this.ModId = $file.Directory.BaseName;
  10.     }
  11. }
  12.  
  13. $mods = New-Object System.Collections.ArrayList
  14.  
  15. Get-ChildItem -Path $args[1] -Filter *.pak -Recurse -File | ForEach-Object {
  16.     $mods.Add([Mod]::new($_));
  17. }
  18.  
  19. foreach ($mod in $mods)
  20. {
  21.     Write-Host Unpacking mod $mod.ModId
  22.     $path = Join-Path $args[2] $mod.ModId
  23.     &$args[0] $mod.FullPath $path
  24.     Write-Host
  25. }
Advertisement
Add Comment
Please, Sign In to add comment