$Display = Get-PrimaryDisplay
Write-ReplaceContentInFile -Pattern '^\$pref::Video::fullScreen = "(.+)";' -Substitution "`$pref::Video::fullScreen = ""1"";" -FilePath "$InstallDirectory\config\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Video::resolution = "(.+)";' -Substitution "`$pref::Video::resolution = ""$($Display.Bounds.Width) $($Display.Bounds.Height) 32"";" -FilePath "$InstallDirectory\config\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Player::LANName = "(.+)";' -Substitution "`$pref::Player::LANName = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\config\client\prefs.cs"
Write-ReplaceContentInFile -Pattern '^\$pref::Player::LANName = "(.+)";' -Substitution "`$pref::Player::LANName = ""$NewPlayerAlias"";" -FilePath "$InstallDirectory\base\client.cs"
Get-ChildItem "$InstallDirectory\config\client\AvatarFavorites" -Filter *.cs |
Foreach-Object {
Write-ReplaceContentInFile -Pattern '^\$pref::Player::LANName = "(.+)";' -Substitution "`$pref::Player::LANName = ""$NewPlayerAlias"";" -FilePath $_.FullName
}