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

◆ Unload()

static bool Terraria.ModLoader.ModLoader.Unload ( )
inlinestaticpackage

Definition at line 270 of file ModLoader.cs.

271 {
272 try
273 {
275 Mods_Unload();
277 return true;
278 }
279 catch (Exception e)
280 {
281 string msg = Language.GetTextValue("tModLoader.UnloadError");
282 if (e.Data.Contains("mod"))
283 {
284 msg = msg + "\n" + Language.GetTextValue("tModLoader.DefensiveUnload", e.Data["mod"]);
285 }
286 Logging.tML.Fatal((object)msg, e);
288 return false;
289 }
290 }
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 DisplayLoadError(string msg, Exception e, bool fatal, bool continueIsRetry=false)
Definition ModLoader.cs:333
static WeakReference< Mod >[] GetWeakModRefs()
Definition ModLoader.cs:298
static void WarnModsStillLoaded(IReadOnlyList< WeakReference< Mod > > weakModRefs)
Definition ModLoader.cs:318

References Terraria.ModLoader.ModLoader.DisplayLoadError(), Terraria.Localization.Language.GetTextValue(), Terraria.ModLoader.ModLoader.GetWeakModRefs(), Terraria.ModLoader.ModLoader.Mods_Unload(), Terraria.ModLoader.Logging.tML, and Terraria.ModLoader.ModLoader.WarnModsStillLoaded().

Referenced by Terraria.ModLoader.ModLoader.Load().

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