Jump to content

SM1 PLS make client mod to skip the "DATACOLLECTION_LOGIN" PopupDialogScreen


Recommended Posts

When modding I have data collection disabled since I don't want to spend 30-60 seconds waiting to connect Klei's dam servers. This pop-up is annoying as **** after you see it for the hundredth time while trying to figure out why your mod is crashing the game I can't take it ANYMORE!!! :mad-new:

I tried to do it myself, but it ended up doing nothing... I HATE THAT POP-UP (AND THE ONE WHICH IS SAYS YOUR WORLD IS OFFLINE BLAH-BLAH YOU CANT USE SKINS BLAH-BLAH IF SM1 knows how to get rid of that too it would so damn amazing)... :blue:

Spoiler

local G = GLOBAL
local STRINGS = GLOBAL.STRINGS

local PopupDialogScreen = require "screens/redux/popupdialog"
local MultiplayerMainScreen = require "screens/redux/multiplayermainscreen"

local PLAY_BUTTON_FADE_TIME = 1.0

local function GoToMultiplayerMainMenu(self, offline)
	G.TheFrontEnd:SetOfflineMode(offline)
	GLOBAL.CacheCurrentVanityItems(self.profile)

	if push_mp_main_screen then
		local function session_mapping_cb(data)
			G.TheFrontEnd:FadeToScreen( self, function() return MultiplayerMainScreen(self, self.profile, offline, data) end, function(new_screen) new_screen:FinishedFadeIn() end, "swipe" )
		end
		if not G.TheNet:DeserializeAllLocalUserSessions(session_mapping_cb) then
			session_mapping_cb()
		end
	else
		G.TheFrontEnd:Fade(FADE_OUT, PLAY_BUTTON_FADE_TIME, function()
				G.TheFrontEnd:Fade(FADE_IN, PLAY_BUTTON_FADE_TIME, nil, nil, nil, "alpha")
		end, nil, nil, "alpha")
	end
end

AddClassPostConstruct("screens/redux/mainscreen", function(self)
	local old_OnLoginButton = self.OnLoginButton
	self.OnLoginButton = function(self, ...)
		
		if G.TheSim:GetDataCollectionSetting() == false then
			G.TheFrontEnd:PopScreen()
			GoToMultiplayerMainMenu(self, true)
		end
		
		old_OnLoginButton(self, ...)
	end
end)

 

Edited by . . .
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...