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

◆ LaunchLocalServer()

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

Definition at line 79 of file NetClientSocialModule.cs.

80 {
81 //IL_0038: Unknown result type (might be due to invalid IL or missing references)
82 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
83 WeGameHelper.WriteDebugString("LaunchLocalServer");
84 if (_lobby.State != 0)
85 {
86 _lobby.Leave();
87 }
89 startInfo.Arguments = startInfo.Arguments + " -steam -localsteamid " + SteamUser.GetSteamID().m_SteamID;
90 if (mode.HasFlag(ServerMode.Lobby))
91 {
92 _hasLocalHost = true;
93 if (mode.HasFlag(ServerMode.FriendsCanJoin))
94 {
95 process.StartInfo.Arguments += " -lobby friends";
96 }
97 else
98 {
99 process.StartInfo.Arguments += " -lobby private";
100 }
101 if (mode.HasFlag(ServerMode.FriendsOfFriends))
102 {
103 process.StartInfo.Arguments += " -friendsoffriends";
104 }
105 }
106 SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame"));
107 Netplay.OnDisconnect += OnDisconnect;
108 process.Start();
109 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
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(), Terraria.Social.Steam.Lobby.State, and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().

+ Here is the call graph for this function: