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

◆ FindReferencedMods() [2/2]

void Terraria.ModLoader.Core.ModCompile.FindReferencedMods ( BuildProperties properties,
Dictionary< string, LocalMod > existingMods,
Dictionary< string, LocalMod > mods,
bool requireWeak )
inlineprivate

Definition at line 336 of file ModCompile.cs.

337 {
338 foreach (string refName in properties.RefNames(includeWeak: true))
339 {
340 if (mods.ContainsKey(refName))
341 {
342 continue;
343 }
344 bool isWeak = properties.weakReferences.Any((BuildProperties.ModReference r) => r.mod == refName);
345 LocalMod mod;
346 try
347 {
348 if (!existingMods.TryGetValue(refName, out mod))
349 {
350 throw new FileNotFoundException("Could not find \"" + refName + ".tmod\" in your subscribed Workshop mods nor the Mods folder");
351 }
352 }
354 {
355 continue;
356 }
357 catch (Exception ex)
358 {
359 throw new BuildException(Language.GetTextValue("tModLoader.BuildErrorModReference", refName), ex);
360 }
361 mods[refName] = mod;
363 }
364 }
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
List< LocalMod > FindReferencedMods(BuildProperties properties)

References Terraria.ModLoader.Core.ModCompile.FindReferencedMods(), Terraria.Localization.Language.GetTextValue(), and Terraria.ModLoader.Core.LocalMod.properties.

+ Here is the call graph for this function: