Jump to content

How Can I create a server that ServerListingScreen will show it client mods disabled?


Recommended Posts

ServerListingScreen.lua  function JoinServer
    if server_listing.client_mods_disabled and
        not IsMigrating() and
        (server_listing.dedicated or not server_listing.owner) and
        AreAnyClientModsEnabled() then
 
        local client_mod_msg = PopupDialogScreen(STRINGS.UI.SERVERLISTINGSCREEN.CLIENT_MODS_DISABLED_TITLE, STRINGS.UI.SERVERLISTINGSCREEN.CLIENT_MODS_DISABLED_BODY,
            {{ text=STRINGS.UI.SERVERLISTINGSCREEN.CONTINUE, cb = function()
                        TheFrontEnd:PopScreen()
                        after_client_mod_message()
            end }})
 
        TheFrontEnd:PushScreen( client_mod_msg )
    else
        after_client_mod_message()
    end
Edited by fanhua_haitang
Link to comment
Share on other sites

Networking.lua function DownloadMods

    if server_listing.client_mods_disabled then
        --temp disable all the client enabled mods
        for _,mod_name in pairs(KnownModIndex:GetClientModNames()) do
            print("Temp disabling client mod", mod_name)
            KnownModIndex:TempDisable(mod_name)
        end
    end
Link to comment
Share on other sites

whether can I use a arg in it to enable server's client_mods_disabled or ?
 
TheSystemService:StartDedicatedServers(self.save_slot, is_multi_level, cluster_info, encode_user_path, use_legacy_session_path, save_to_cloud, use_zip_format)
Edited by fanhua_haitang
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...