Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LaunchLocalServer()

override void Terraria.Social.Steam.NetClientSocialModule.LaunchLocalServer ( Process process,
ServerMode mode )
inline

Definition at line 71 of file NetClientSocialModule.cs.

72 {
73 //IL_0039: Unknown result type (might be due to invalid IL or missing references)
74 WeGameHelper.WriteDebugString("LaunchLocalServer");
75 if (_lobby.State != 0)
76 {
77 _lobby.Leave();
78 }
79 ProcessStartInfo startInfo = process.StartInfo;
80 startInfo.Arguments = startInfo.Arguments + " -steam -localsteamid " + SteamUser.GetSteamID().m_SteamID;
81 if (mode.HasFlag(ServerMode.Lobby))
82 {
83 _hasLocalHost = true;
84 if (mode.HasFlag(ServerMode.FriendsCanJoin))
85 {
86 process.StartInfo.Arguments += " -lobby friends";
87 }
88 else
89 {
90 process.StartInfo.Arguments += " -lobby private";
91 }
92 if (mode.HasFlag(ServerMode.FriendsOfFriends))
93 {
94 process.StartInfo.Arguments += " -friendsoffriends";
95 }
96 }
97 SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame"));
98 Netplay.OnDisconnect += OnDisconnect;
99 process.Start();
100 }
ProcessStartInfo StartInfo
Definition Process.cs:556
static string GetTextValue(string key)
Definition Language.cs:15
static void WriteDebugString(string format, params object[] args)

References Terraria.Social.Steam.NetClientSocialModule._hasLocalHost, Terraria.Social.Steam.NetSocialModule._lobby, Terraria.Localization.Language.GetTextValue(), Terraria.Social.Steam.Lobby.Leave(), Terraria.Social.Steam.NetClientSocialModule.OnDisconnect(), System.Diagnostics.Process.Start(), System.Diagnostics.Process.StartInfo, Terraria.Social.Steam.Lobby.State, and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().