diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt index 6d76de3f..d5e2f1d2 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt @@ -21,6 +21,7 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a "DIALOG_AUTHENTICATING_MASTERSERVER" "Authenticating to master server." "AUTHENTICATIONAGREEMENT_NO" "You have chosen not to authenticate with Northstar. You can view the agreement in the Mods menu." + "HAS_NON_VANILLA_MODS" "You currently have mods enabled (marked with a \"!\") that break vanilla compatibility. You can disable them in the Mods menu." "MENU_TITLE_SERVER_BROWSER" "Server Browser" "NS_SERVERBROWSER_NOSERVERS" "No servers found" @@ -373,6 +374,8 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a "TOGGLE_PROGRESSION" "Toggle Progression" "Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON|]% Toggle Progression" + "PROGRESSION_TOGGLE_VANILLA" "Progression cannot be disabled on vanilla servers." + "PROGRESSION_TOGGLE_ENABLED_HEADER" "Disable Progression?" "PROGRESSION_TOGGLE_ENABLED_BODY" "Titans, Weapons, Factions, Skins, etc. will all be unlocked and usable at any time.\n\nThis can be changed at any time in the multiplayer lobby." diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ingame.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ingame.nut index ac617a9c..46f68584 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ingame.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ingame.nut @@ -85,9 +85,11 @@ void function InitInGameMPMenu() var gameHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MENU_HEADER_GAME" ) var leaveButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#LEAVE_MATCH" ) Hud_AddEventHandler( leaveButton, UIE_CLICK, OnLeaveButton_Activate ) - var teamChangeButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#SWITCH_TEAMS" ) - Hud_AddEventHandler( teamChangeButton, UIE_CLICK, OnRequestTeamSwitch ) - thread UpdateTeamSwitchButton_Threaded( teamChangeButton ) + #if !VANILLA + var teamChangeButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#SWITCH_TEAMS" ) + Hud_AddEventHandler( teamChangeButton, UIE_CLICK, OnRequestTeamSwitch ) + thread UpdateTeamSwitchButton_Threaded( teamChangeButton ) + #endif #if DEV var devButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "Dev" ) Hud_AddEventHandler( devButton, UIE_CLICK, AdvanceMenuEventHandler( GetMenu( "DevMenu" ) ) ) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut index 23dae99d..7d52d479 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut @@ -230,16 +230,24 @@ void function InitLobbyMenu() void function ShowToggleProgressionDialog( var button ) { - bool enabled = Progression_GetPreference() + #if VANILLA + DialogData dialogData + dialogData.menu = GetMenu( "AnnouncementDialog" ) + dialogData.header = "#PROGRESSION_TOGGLE_ENABLED_HEADER" + dialogData.message = "#PROGRESSION_TOGGLE_VANILLA" + dialogData.image = $"ui/menu/common/dialog_announcement_1" + #else + bool enabled = Progression_GetPreference() - DialogData dialogData - dialogData.menu = GetMenu( "AnnouncementDialog" ) - dialogData.header = enabled ? "#PROGRESSION_TOGGLE_ENABLED_HEADER" : "#PROGRESSION_TOGGLE_DISABLED_HEADER" - dialogData.message = enabled ? "#PROGRESSION_TOGGLE_ENABLED_BODY" : "#PROGRESSION_TOGGLE_DISABLED_BODY" - dialogData.image = $"ui/menu/common/dialog_announcement_1" + DialogData dialogData + dialogData.menu = GetMenu( "AnnouncementDialog" ) + dialogData.header = enabled ? "#PROGRESSION_TOGGLE_ENABLED_HEADER" : "#PROGRESSION_TOGGLE_DISABLED_HEADER" + dialogData.message = enabled ? "#PROGRESSION_TOGGLE_ENABLED_BODY" : "#PROGRESSION_TOGGLE_DISABLED_BODY" + dialogData.image = $"ui/menu/common/dialog_announcement_1" - AddDialogButton( dialogData, "#NO" ) - AddDialogButton( dialogData, "#YES", enabled ? DisableProgression : EnableProgression ) + AddDialogButton( dialogData, "#NO" ) + AddDialogButton( dialogData, "#YES", enabled ? DisableProgression : EnableProgression ) + #endif OpenDialog( dialogData ) } @@ -288,21 +296,32 @@ void function SetupComboButtonTest( var menu ) int buttonIndex = 0 file.playHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MENU_HEADER_PLAY" ) - // server browser - file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_SERVER_BROWSER" ) - file.lobbyButtons.append( file.findGameButton ) - Hud_SetLocked( file.findGameButton, true ) - Hud_AddEventHandler( file.findGameButton, UIE_CLICK, OpenServerBrowser ) + #if VANILLA + file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_FIND_GAME" ) + file.lobbyButtons.append( file.findGameButton ) + Hud_AddEventHandler( file.findGameButton, UIE_CLICK, BigPlayButton1_Activate ) - // private match - file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#PRIVATE_MATCH" ) - Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, StartPrivateMatch ) + file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_ROOM" ) + Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, DoRoomInviteIfAllowed ) + #else + // server browser + file.findGameButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_SERVER_BROWSER" ) + file.lobbyButtons.append( file.findGameButton ) + Hud_SetLocked( file.findGameButton, true ) + Hud_AddEventHandler( file.findGameButton, UIE_CLICK, OpenServerBrowser ) + + // private match + file.inviteRoomButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#PRIVATE_MATCH" ) + Hud_AddEventHandler( file.inviteRoomButton, UIE_CLICK, StartPrivateMatch ) + #endif file.inviteFriendsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_FRIENDS" ) Hud_AddEventHandler( file.inviteFriendsButton, UIE_CLICK, InviteFriendsIfAllowed ) - Hud_SetEnabled( file.inviteFriendsButton, false ) - Hud_SetVisible( file.inviteFriendsButton, false ) + #if !VANILLA + Hud_SetEnabled( file.inviteFriendsButton, false ) + Hud_SetVisible( file.inviteFriendsButton, false ) + #endif // file.toggleMenuModeButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LOBBY_SWITCH_FD" ) // Hud_AddEventHandler( file.toggleMenuModeButton, UIE_CLICK, ToggleLobbyMode ) @@ -1268,7 +1287,9 @@ function UpdateLobbyUI() thread UpdateLobbyType() thread UpdateMatchmakingStatus() thread UpdateChatroomThread() - //thread UpdateInviteJoinButton() + #if VANILLA + thread UpdateInviteJoinButton() + #endif thread UpdateInviteFriendsToNetworkButton() thread UpdatePlayerInfo() diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut index a99057c7..84d412ef 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut @@ -75,7 +75,9 @@ void function OnMainMenu_Open() Signal( uiGlobal.signalDummy, "EndOnMainMenu_Open" ) EndSignal( uiGlobal.signalDummy, "EndOnMainMenu_Open" ) +#if !VANILLA SetConVarString( "communities_hostname", "" ) // disable communities due to crash exploits that are still possible through it +#endif UpdatePromoData() // On script restarts this gives us the last data until the new request is complete RequestMainMenuPromos() // This will be ignored if there was a recent request. "infoblock_requestInterval" diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut index 109eed12..3c3e89a5 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_mode_select.nut @@ -17,6 +17,9 @@ global enum eModeMenuModeCategory } // List of blocked modes due to them being unfinished +#if VANILLA +const array blockedModes = [] +#else const array blockedModes = [ "fd_easy", @@ -25,6 +28,7 @@ const array blockedModes = "fd_master", "fd_insane" ] +#endif struct ListEntry_t { string mode diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut index 34ad4f77..36281af2 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_custom_match_settings.nut @@ -1,6 +1,12 @@ global function AddNorthstarCustomMatchSettingsMenu global function SetNextMatchSettingsCategory +#if VANILLA +const string OVERRIDE_COMMAND = "setplaylistvaroverrides" +#else +const string OVERRIDE_COMMAND = "PrivateMatchSetPlaylistVarOverride" +#endif + const string SETTING_ITEM_TEXT = " " // this is long enough to be the same size as the textentry field struct { @@ -120,7 +126,7 @@ void function OnSettingButtonPressed( var button ) file.enumRealValues[ int( Hud_GetScriptID( button ) ) ] = enumVal Hud_SetText( textPanel, setting.enumNames[ enumVal ] ) - ClientCommand( "PrivateMatchSetPlaylistVarOverride " + setting.playlistVar + " " + setting.enumValues[ enumVal ] ) + ClientCommand( OVERRIDE_COMMAND + " " + setting.playlistVar + " " + setting.enumValues[ enumVal ] ) } else { @@ -137,5 +143,7 @@ void function SendTextPanelChanges( var textPanel ) // enums don't need to do this if ( !setting.isEnumSetting ) - ClientCommand( "PrivateMatchSetPlaylistVarOverride " + setting.playlistVar + " " + Hud_GetUTF8Text( textPanel ) ) -} \ No newline at end of file + { + ClientCommand( OVERRIDE_COMMAND + " " + setting.playlistVar + " " + Hud_GetUTF8Text( textPanel ) ) + } +} diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut index e3c1f268..be97a036 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut @@ -271,6 +271,12 @@ void function SetupComboButtons( var menu, var navUpButton, var navDownButton ) file.matchSettingsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_MATCH_SETTINGS" ) Hud_AddEventHandler( file.matchSettingsButton, UIE_CLICK, OnSelectMatchSettings_Activate ) + #if VANILLA + var friendsButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_TITLE_INVITE_FRIENDS" ) + file.inviteFriendsButton = friendsButton + Hud_AddEventHandler( friendsButton, UIE_CLICK, InviteFriendsIfAllowed ) + #endif + headerIndex++ buttonIndex = 0 file.customizeHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MENU_HEADER_LOADOUTS" ) @@ -565,12 +571,18 @@ function UpdatePrivateMatchButtons() Hud_SetLocked( file.selectMapButton, true ) Hud_SetLocked( file.selectModeButton, true ) Hud_SetLocked( file.matchSettingsButton, true ) + #if VANILLA + Hud_SetLocked( file.inviteFriendsButton, true ) + #endif } else { RHud_SetText( file.startMatchButton, "#START_MATCH" ) Hud_SetLocked( file.selectMapButton, false ) Hud_SetLocked( file.selectModeButton, false ) + #if VANILLA + Hud_SetLocked( file.inviteFriendsButton, false ) + #endif string modeName = PrivateMatch_GetSelectedMode() bool settingsLocked = IsFDMode( modeName ) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut b/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut index f91231b6..633d4848 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/openinvites.nut @@ -202,8 +202,10 @@ void function UpdateOpenInvite_Thread() void function UICodeCallback_OpenInviteUpdated() { - // don't support on northstar - return + #if !VANILLA + // don't support on northstar + return + #endif if ( file.openInviteVisible ) return diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 330cd0d6..dd2b8400 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -81,12 +81,19 @@ void function InitMainMenuPanel() headerIndex++ buttonIndex = 0 var multiplayerHeader = AddComboButtonHeader( comboStruct, headerIndex, "#MULTIPLAYER_ALLCAPS" ) - // "Launch Multiplayer" button removed because we don't support vanilla yet :clueless: - //file.mpButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MULTIPLAYER_LAUNCH" ) - //Hud_AddEventHandler( file.mpButton, UIE_CLICK, OnPlayMPButton_Activate ) - file.fdButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LAUNCH_NORTHSTAR" ) - Hud_AddEventHandler( file.fdButton, UIE_CLICK, OnPlayFDButton_Activate ) - Hud_SetLocked( file.fdButton, true ) + #if VANILLA + file.mpButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MULTIPLAYER_LAUNCH" ) + Hud_AddEventHandler( file.mpButton, UIE_CLICK, OnPlayMPButton_Activate ) + file.fdButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#GAMEMODE_COOP" ) + Hud_AddEventHandler( file.fdButton, UIE_CLICK, OnPlayFDButton_Activate ) + #else + // "Launch Multiplayer" button removed because we don't support vanilla yet :clueless: + //file.mpButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MULTIPLAYER_LAUNCH" ) + //Hud_AddEventHandler( file.mpButton, UIE_CLICK, OnPlayMPButton_Activate ) + file.fdButton = AddComboButton( comboStruct, headerIndex, buttonIndex++, "#MENU_LAUNCH_NORTHSTAR" ) + Hud_AddEventHandler( file.fdButton, UIE_CLICK, OnPlayNSButton_Activate ) + Hud_SetLocked( file.fdButton, true ) + #endif headerIndex++ buttonIndex = 0 @@ -137,7 +144,7 @@ void function InitMainMenuPanel() //AddPanelFooterOption( file.panel, BUTTON_BACK, "", "", ClosePostGameMenu ) thread TrackInstallProgress() - UpdateCustomMainMenuPromos() + thread UpdateCustomMainMenuPromos() } void function OnShowMainMenuPanel() @@ -170,9 +177,11 @@ void function OnShowMainMenuPanel() #endif // PS4_PROG UpdateSPButtons() - // dont try and update the launch multiplayer button, because it doesn't exist - //thread UpdatePlayButton( file.mpButton ) + #if VANILLA + thread UpdatePlayButton( file.mpButton ) + #else thread UpdatePlayButton( file.fdButton ) + #endif thread MonitorTrialVersionChange() #if DURANGO_PROG @@ -402,55 +411,68 @@ void function UpdatePlayButton( var button ) buttonText = "#MULTIPLAYER_LAUNCH" message = "" - if ( !isOriginConnected ) - { - message = "#ORIGIN_IS_OFFLINE" - file.mpButtonActivateFunc = null - } - else if ( !isStryderAuthenticated ) - { - message = "#CONTACTING_RESPAWN_SERVERS" - file.mpButtonActivateFunc = null - } - else if ( button == file.mpButton && !isMPAllowed ) - { - message = "#MULTIPLAYER_NOT_AVAILABLE" - file.mpButtonActivateFunc = null - } - else if ( button == file.mpButton && !hasLatestPatch ) - { - message = "#ORIGIN_UPDATE_AVAILABLE" - file.mpButtonActivateFunc = null - } - else if ( button == file.fdButton && GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN ) - { - message = "#AUTHENTICATIONAGREEMENT_NO" - file.mpButtonActivateFunc = null - } - else if ( button == file.mpButton ) - { - // restrict non-vanilla players from accessing official servers - bool hasNonVanillaMods = false - foreach ( ModInfo mod in NSGetModsInformation() ) + #if VANILLA + if ( !isOriginConnected ) { - if ( mod.enabled && mod.requiredOnClient ) + message = "#ORIGIN_IS_OFFLINE" + file.mpButtonActivateFunc = null + } + else if ( !isStryderAuthenticated ) + { + message = "#CONTACTING_RESPAWN_SERVERS" + file.mpButtonActivateFunc = null + } + else if ( !isMPAllowed ) + { + message = "#MULTIPLAYER_NOT_AVAILABLE" + file.mpButtonActivateFunc = null + } + else if ( !hasLatestPatch ) + { + message = "#ORIGIN_UPDATE_AVAILABLE" + file.mpButtonActivateFunc = null + } + else + { + // restrict non-vanilla players from accessing official servers + bool hasNonVanillaMods = false + foreach ( ModInfo mod in NSGetModsInformation() ) { - hasNonVanillaMods = true - break + if ( mod.enabled && mod.requiredOnClient ) + { + hasNonVanillaMods = true + break + } + } + + if ( hasNonVanillaMods ) + { + message = "#HAS_NON_VANILLA_MODS" + file.mpButtonActivateFunc = null + } + else + { + file.mpButtonActivateFunc = LaunchMP } } - - if ( hasNonVanillaMods ) + #else + if ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN ) + { + message = "#AUTHENTICATIONAGREEMENT_NO" file.mpButtonActivateFunc = null + } else + { file.mpButtonActivateFunc = LaunchMP - } + } + #endif isLocked = file.mpButtonActivateFunc == null ? true : false - if( button == file.fdButton ) + #if !VANILLA thread TryUnlockNorthstarButton() - else + #else Hud_SetLocked( button, isLocked ) + #endif #endif if ( Script_IsRunningTrialVersion() && !IsTrialPeriodActive() && file.mpButtonActivateFunc != LaunchGamePurchase ) @@ -461,11 +483,26 @@ void function UpdatePlayButton( var button ) message = "" } - // dont try and update the launch multiplayer button, because it doesn't exist - //ComboButton_SetText( file.mpButton, buttonText ) + #if VANILLA + ComboButton_SetText( file.mpButton, buttonText ) - ComboButton_SetText( file.fdButton, "#MENU_LAUNCH_NORTHSTAR" ) - //Hud_SetEnabled( file.fdButton, false ) + if ( Hud_IsLocked( button ) || buttonText == "#MENU_GET_THE_FULL_GAME" ) + { + ComboButton_SetText( file.fdButton, "" ) + Hud_SetEnabled( file.fdButton, false ) + } + else + { + ComboButton_SetText( file.fdButton, "#MULTIPLAYER_LAUNCH_FD" ) + Hud_SetEnabled( file.fdButton, true ) + } + #else + // dont try and update the launch multiplayer button, because it doesn't exist + //ComboButton_SetText( file.mpButton, buttonText ) + + ComboButton_SetText( file.fdButton, "#MENU_LAUNCH_NORTHSTAR" ) + //Hud_SetEnabled( file.fdButton, false ) + #endif if ( file.installing ) message = "" @@ -530,7 +567,20 @@ void function TryUnlockNorthstarButton() Hud_SetLocked( file.fdButton, false ) } -void function OnPlayFDButton_Activate( var button ) // repurposed for launching northstar lobby +void function OnPlayFDButton_Activate( var button ) +{ + if ( file.mpButtonActivateFunc == null ) + printt( "file.mpButtonActivateFunc is null" ) + + if ( !Hud_IsLocked( button ) && file.mpButtonActivateFunc != null ) + { + Lobby_SetAutoFDOpen( true ) + // Lobby_SetFDMode( true ) + thread file.mpButtonActivateFunc() + } +} + +void function OnPlayNSButton_Activate( var button ) { if ( !Hud_IsLocked( button ) ) { @@ -796,9 +846,12 @@ void function TrackInstallProgress() bool function IsStryderAuthenticated() { - // We don't actually need to wait for Stryder response, because we don't care about it anyway - return true - //return GetConVarInt( "mp_allowed" ) != -1 + #if VANILLA + return GetConVarInt( "mp_allowed" ) != -1 + #else + // We don't actually need to wait for Stryder response, because we don't care about it anyway + return true + #endif } bool function IsStryderAllowingMP() @@ -851,6 +904,8 @@ enum eMainMenuPromoDataProperty void function UpdateCustomMainMenuPromos() { + // HACK: wait a frame, so that autoexec_ns_client.cfg has taken effect and changed the masterserver hostname + WaitFrame() NSRequestCustomMainMenuPromos() thread UpdateCustomMainMenuPromosThreaded() diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_items.nut b/Northstar.CustomServers/mod/scripts/vscripts/_items.nut index dbfa2e92..d93ab64a 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_items.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_items.nut @@ -5703,11 +5703,13 @@ bool function IsSubItemLocked( entity player, string ref, string parentRef ) if ( DevEverythingUnlocked( player ) ) return false + #if !VANILLA if ( IsItemPurchasableEntitlement( ref, parentRef ) ) return false if ( GetItemType( ref ) == eItemTypes.PRIME_TITAN || GetSubitemType( parentRef, ref ) == eItemTypes.PRIME_TITAN ) return false + #endif if ( IsItemInEntitlementUnlock( ref, parentRef ) ) { @@ -5828,11 +5830,13 @@ bool function IsItemLocked( entity player, string ref ) if ( DevEverythingUnlocked( player ) ) return false + #if !VANILLA if ( IsItemPurchasableEntitlement( ref ) ) return false if ( GetItemType( ref ) == eItemTypes.PRIME_TITAN ) return false + #endif if ( IsItemInEntitlementUnlock( ref ) ) { @@ -10096,7 +10100,11 @@ void function InitUnlockAsEntitlement( string itemRef, string parentRef, int ent unlock = file.entitlementUnlocks[fullRef] } +#if VANILLA + unlock.entitlementIds.append( entitlementId ) +#else unlock.entitlementIds.append( 1 ) // Using `1` here instead of the huge DLC check I did previously. Having the `1` seems to keep all paid cosmetics unlocked with progression enabled. +#endif } array function GetEntitlementIds( string itemRef, string parentRef = "" ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut index 307548d7..71dd8f75 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut @@ -60,7 +60,9 @@ bool function ProgressionEnabledForPlayer( entity player ) #if SERVER void function OnPlaying() { - SetUIVar( level, "penalizeDisconnect", false ) // dont show the "you will lose merits thing" + #if !VANILLA + SetUIVar( level, "penalizeDisconnect", false ) // dont show the "you will lose merits thing" + #endif } void function OnClientDisconnected( entity player ) @@ -132,16 +134,22 @@ void function Progression_SetPreference( bool enabled ) { SetConVarBool( "ns_progression_enabled", enabled ) - #if CLIENT - GetLocalClientPlayer().ClientCommand( "ns_progression " + enabled.tointeger() ) - #else // UI - ClientCommand( "ns_progression " + enabled.tointeger() ) + #if !VANILLA + #if CLIENT + GetLocalClientPlayer().ClientCommand( "ns_progression " + enabled.tointeger() ) + #else // UI + ClientCommand( "ns_progression " + enabled.tointeger() ) + #endif #endif } bool function Progression_GetPreference() { + #if VANILLA + return true + #else return GetConVarBool( "ns_progression_enabled" ) + #endif } void function UpdateCachedLoadouts_Delayed()