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

◆ GetWorkshopFolder()

static string Terraria.Social.Steam.WorkshopHelper.GetWorkshopFolder ( AppId_t app)
inlinestatic

Definition at line 1039 of file WorkshopHelper.cs.

1040 {
1041 //IL_003b: Unknown result type (might be due to invalid IL or missing references)
1042 if (Program.LaunchParameters.TryGetValue("-steamworkshopfolder", out var workshopLocCustom))
1043 {
1044 if (Directory.Exists(workshopLocCustom))
1045 {
1046 return workshopLocCustom;
1047 }
1048 Logging.tML.Warn((object)("-steamworkshopfolder path not found: " + workshopLocCustom));
1049 }
1050 string steamClientPath = null;
1051 if (SteamedWraps.SteamClient)
1052 {
1053 SteamApps.GetAppInstallDir(app, ref steamClientPath, 1000u);
1054 }
1055 if (steamClientPath == null)
1056 {
1057 steamClientPath = ".";
1058 }
1059 steamClientPath = Path.Combine(steamClientPath, "..", "..", "workshop");
1060 if (SteamedWraps.SteamClient || (!SteamedWraps.SteamAvailable && !Program.LaunchParameters.ContainsKey("-nosteam") && Directory.Exists(steamClientPath)))
1061 {
1062 return steamClientPath;
1063 }
1064 return Path.Combine("steamapps", "workshop");
1065 }

References Terraria.Program.LaunchParameters, Terraria.Social.Steam.SteamedWraps.SteamAvailable, Terraria.Social.Steam.SteamedWraps.SteamClient, and Terraria.ModLoader.Logging.tML.

Referenced by Terraria.Social.Steam.WorkshopBrowserModule.EnsureInstallationComplete(), Terraria.Social.Steam.WorkshopHelper.UGCBased.Downloader.GetListOfSubscribedItemsPaths(), and Terraria.Social.SocialAPI.Initialize().

+ Here is the caller graph for this function: