Moved AuricCarpet Replacement to ExtraTextureRefs
This commit is contained in:
1 parent
9bfc1eaba1
commit
8a7bbdc80e
3 files changed
+16
-13
No files matched your search
@@ -13,6 +13,7 @@ using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.ExtraTextures;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Ammo;
|
||||
@@ -787,8 +788,8 @@ namespace CalamityMod.CalPlayer
|
||||
// Update Carpet textures
|
||||
if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Asset<Texture2D> carpetAuric = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuricCarpet");
|
||||
Asset<Texture2D> carpetOriginal = CalamityMod.carpetOriginal;
|
||||
Asset<Texture2D> carpetAuric = ExtraTextureRefs.FlyingCarpetAuric;
|
||||
Asset<Texture2D> carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla;
|
||||
TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,6 @@ namespace CalamityMod
|
||||
public static int ghostKillCount = 0;
|
||||
public static int sharkKillCount = 0;
|
||||
|
||||
public static Asset<Texture2D> carpetOriginal;
|
||||
|
||||
// Holds the Texture Arrays for all the lava textures.
|
||||
// These are used for the lava styles. They are seperate from Textureasset.Instance._liquidTexture as they will conflict with ModWaterStyle
|
||||
// Can hold up to 255 lava styles (more than enough) (excluding the normal lava texture which is liquidTexture 1)
|
||||
@@ -125,8 +123,6 @@ namespace CalamityMod
|
||||
#region Load
|
||||
public override void Load()
|
||||
{
|
||||
carpetOriginal = TextureAssets.FlyingCarpet;
|
||||
|
||||
// Initialize the CalamityLists as this is coupled in tons of other type
|
||||
CalamityLists.Load();
|
||||
|
||||
@@ -204,12 +200,6 @@ namespace CalamityMod
|
||||
Main.OnPreDraw -= PrepareRenderTargets;
|
||||
});
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
TextureAssets.FlyingCarpet = carpetOriginal;
|
||||
}
|
||||
|
||||
carpetOriginal = null;
|
||||
_Instance = null;
|
||||
base.Unload();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ExtraTextures
|
||||
@@ -24,6 +26,10 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
|
||||
public static Asset<Texture2D> WallOfFleshDemonSickleTexture;
|
||||
|
||||
// Flying Carpet Replacements
|
||||
public static Asset<Texture2D> FlyingCarpetVanilla;
|
||||
public static Asset<Texture2D> FlyingCarpetAuric;
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
DestroyerGlowmasks[0] = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerHeadGlow", AssetRequestMode.AsyncLoad);
|
||||
@@ -37,11 +43,17 @@ namespace CalamityMod.ExtraTextures
|
||||
|
||||
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
|
||||
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
|
||||
|
||||
FlyingCarpetVanilla = TextureAssets.FlyingCarpet;
|
||||
FlyingCarpetAuric = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuricCarpet", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
TextureAssets.FlyingCarpet = FlyingCarpetVanilla;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user