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

◆ PublishMod()

void Terraria.ModLoader.UI.UIModSourceItem.PublishMod ( UIMouseEvent evt,
UIElement listeningElement )
inlineprivate

Definition at line 389 of file UIModSourceItem.cs.

390 {
392 try
393 {
394 Mod result;
396 {
397 Utils.ShowFancyErrorMessage(Language.GetTextValue("tModLoader.SteamPublishingLimit"), 10001);
398 }
399 else if (!ModLoader.TryGetMod(_builtMod.Name, out result))
400 {
401 if (!_builtMod.Enabled)
402 {
403 _builtMod.Enabled = true;
404 }
405 Main.menuMode = 10006;
406 ModLoader.OnSuccessfulLoad = (Action)Delegate.Combine(ModLoader.OnSuccessfulLoad, (Action)delegate
407 {
408 Main.QueueMainThreadAction(delegate
409 {
410 PublishMod(null, null);
411 });
412 });
413 }
414 else
415 {
416 string icon = Path.Combine(_mod, "icon_workshop.png");
417 if (!File.Exists(icon))
418 {
419 icon = Path.Combine(_mod, "icon.png");
420 }
422 }
423 }
424 catch (WebException e)
425 {
427 }
428 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
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 LogModBrowserException(Exception e, int returnToMenu)
void PublishMod(UIMouseEvent evt, UIElement listeningElement)
static void PublishMod(LocalMod mod, string iconPath)

References Terraria.ModLoader.UI.UIModSourceItem._builtMod, Terraria.ModLoader.UI.UIModSourceItem._mod, Terraria.Localization.Language.GetTextValue(), Terraria.ModLoader.UI.ModBrowser.UIModBrowser.LogModBrowserException(), Terraria.ModLoader.ModLoader.OnSuccessfulLoad, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Social.Steam.WorkshopHelper.PublishMod(), Terraria.ModLoader.UI.UIModSourceItem.PublishMod(), Terraria.Main.QueueMainThreadAction(), Terraria.Utils.ShowFancyErrorMessage(), Terraria.Social.Steam.SteamedWraps.SteamClient, and Terraria.ModLoader.ModLoader.TryGetMod().

Referenced by Terraria.ModLoader.UI.UIModSourceItem.UIModSourceItem(), and Terraria.ModLoader.UI.UIModSourceItem.PublishMod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: