Skip to content

Commit

Permalink
fixed 2 problem
Browse files Browse the repository at this point in the history
Fixed loss of NPC and Ship's Assistant voice
Added additional check in specifying the path to the game executable file
  • Loading branch information
Shin0by committed Oct 27, 2023
1 parent 2cca0c2 commit f547883
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
6 changes: 4 additions & 2 deletions StarCitizen Helper/Controls/WL_Modification.vb
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then
Dim _USER As New Class_INI
_USER.SkipInvalidLines = True
_USER._FSO = MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath
_USER._Write(Nothing, _VARS.g_language, Me.Localization, _VARS.utf8NoBom)
If _USER._Write(Nothing, _VARS.g_language, Me.Localization, System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
If _USER._Write(Nothing, _VARS.g_languageAudio, "english", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub


_Update()

Expand All @@ -406,7 +408,7 @@ Finalize: If Me.sGameExeFileName IsNot Nothing Then
Dim _USER As New Class_INI
_USER.SkipInvalidLines = True
_USER._FSO = MAIN_THREAD.WL_Pack.Property_FilePath_User
_USER._Write(Nothing, _VARS.g_language, "", _VARS.utf8NoBom)
If _USER._Write(Nothing, _VARS.g_language, "", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub


'_FSO._DeleteFile(Me.Property_PatchDstFilePath)
Expand Down
14 changes: 8 additions & 6 deletions StarCitizen Helper/Controls/WL_Pack.vb
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,15 @@ Finalize: If result.Err._Flag = True Then
Next

If MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath IsNot Nothing Then
Dim _USER As New Class_INI()
_USER.SkipInvalidLines = True
_USER._FSO = MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath

If _FSO._FileExits(MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath) = False Then
_FSO._WriteTextFile(_VARS.g_language & " = ", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath, System.Text.Encoding.UTF8)
Else
Dim _USER_CFG As New Class_INI()
_USER_CFG.SkipInvalidLines = True
_USER_CFG._FSO = MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath
_USER_CFG._Write(Nothing, _VARS.g_language, Nothing, _VARS.utf8NoBom)
If _USER._Write(Nothing, _VARS.g_language, "", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
If _USER._Write(Nothing, _VARS.g_languageAudio, "english", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
Else
_USER._Write(Nothing, _VARS.g_language, Nothing, _VARS.utf8NoBom)
End If
End If

Expand Down
3 changes: 2 additions & 1 deletion StarCitizen Helper/Modules/Module_HELPER.vb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ Module Module_HELPER


If _FSO._FileExits(MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath) = False Then
If _FSO._WriteTextFile(_VARS.g_language & " = ", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath, System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
If _USER._Write(Nothing, _VARS.g_language, "", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
If _USER._Write(Nothing, _VARS.g_languageAudio, "english", System.Text.Encoding.UTF8) = False Then _LOG._sAdd("LoadUserCfgFile", _LANG._Get("File_MSG_CannotWriteCheckPermission", MAIN_THREAD.WL_Mod.Property_GameUserCfgFilePath),, 1) : Exit Sub
End If

Dim _USER_CFG As New Class_INI()
Expand Down
5 changes: 4 additions & 1 deletion StarCitizen Helper/Modules/Module_MAIN.vb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ Module Module_MAIN
Public OldPatcher_File_Name As String = Nothing
Public LoginDataToken_SoureFileName As String = Nothing
Public LoginDataToken_DestFileName As String = Nothing
Public g_language As String = "g_language"
Public LocalizationFolderName As String = Nothing
Public LanguageFolderDelimeter = Nothing
Public LanguageFolderDefault = Nothing
Expand Down Expand Up @@ -287,6 +286,10 @@ Module Module_MAIN
Public URL_App_Api As String = Nothing
Public URL_App_Release As String = Nothing

'User.cfg
Public g_language As String = "g_language"
Public g_languageAudio As String = "g_languageAudio"

Public Property UpdateStatus() As String
Get
Return Me.sUpdateStatus
Expand Down
4 changes: 2 additions & 2 deletions StarCitizen Helper/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.9.26.136")>
<Assembly: AssemblyFileVersion("1.9.26.136")>
<Assembly: AssemblyVersion("1.9.26.137")>
<Assembly: AssemblyFileVersion("1.9.26.137")>
Binary file modified install/package/Input/StarCitizen Helper.exe
Binary file not shown.
Binary file modified install/package/Output/mysetup.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion install/package/install.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[Setup]
AppVersion=1.9.26.136
AppVersion=1.9.26.137
AppName=StarCitizen Helper
DefaultDirName={userappdata}\StarCitizen Helper
DefaultGroupName=StarCitizen Helper
Expand Down
Binary file modified install/setup.exe
Binary file not shown.

0 comments on commit f547883

Please sign in to comment.