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

◆ GetBackgroundImage()

Asset< Texture2D > Terraria.GameContent.Bestiary.ModBiomeBestiaryInfoElement.GetBackgroundImage ( )
inline

Implements Terraria.GameContent.Bestiary.IBestiaryBackgroundImagePathAndColorProvider.

Definition at line 46 of file ModBiomeBestiaryInfoElement.cs.

47 {
48 //IL_001b: Unknown result type (might be due to invalid IL or missing references)
49 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
50 if (_backgroundPath == null || !ModContent.RequestIfExists(_backgroundPath, out Asset<Texture2D> asset, AssetRequestMode.ImmediateLoad))
51 {
52 return null;
53 }
54 if (asset.Size() == new Vector2(115f, 65f))
55 {
56 return asset;
57 }
58 _mod.Logger.Info((object)(_backgroundPath + " needs to be 115x65 pixels."));
59 return null;
60 }
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loa...
Definition ModContent.cs:38
ILog Logger
A logger with this mod's name for easy logging.
Definition Mod.cs:61

References Terraria.GameContent.Bestiary.ModBestiaryInfoElement._backgroundPath, Terraria.GameContent.Bestiary.ModBestiaryInfoElement._mod, and Terraria.ModLoader.Mod.Logger.