lesser greater luck icons
This commit is contained in:
1 parent
e12b5c5207
commit
81d60f69df
4 files changed
+27
-1
No files matched your search
@@ -860,12 +860,27 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
private void MiscEffects()
|
||||
{
|
||||
// Update Carpet textures
|
||||
// Update textures
|
||||
if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Asset<Texture2D> carpetAuric = ExtraTextureRefs.FlyingCarpetAuric;
|
||||
Asset<Texture2D> carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla;
|
||||
TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal);
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
if (Player.buffType[l] != BuffID.Lucky)
|
||||
continue;
|
||||
|
||||
if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(600f))
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconGreater;
|
||||
else if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(300f))
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconVanilla;
|
||||
else
|
||||
TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconLesser;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate/reset DoG cart rotations based on whether the DoG cart is in use.
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ExtraTextures
|
||||
@@ -32,6 +33,11 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> FlyingCarpetVanilla;
|
||||
public static Asset<Texture2D> FlyingCarpetAuric;
|
||||
|
||||
// Lucky Buff icon replacements
|
||||
public static Asset<Texture2D> LuckIconGreater;
|
||||
public static Asset<Texture2D> LuckIconVanilla;
|
||||
public static Asset<Texture2D> LuckIconLesser;
|
||||
|
||||
// Boss Heads
|
||||
// I know it's not exactly a Texture2D but it belongs to ExtraTextures.
|
||||
public static int BossHeadIndex_ChadPrime;
|
||||
@@ -60,6 +66,10 @@ namespace CalamityMod.ExtraTextures
|
||||
|
||||
FlyingCarpetVanilla = TextureAssets.FlyingCarpet;
|
||||
FlyingCarpetAuric = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuricCarpet", AssetRequestMode.AsyncLoad);
|
||||
|
||||
LuckIconGreater = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyGreater", AssetRequestMode.AsyncLoad);
|
||||
LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky];
|
||||
LuckIconLesser = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad);
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
@@ -67,6 +77,7 @@ namespace CalamityMod.ExtraTextures
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
TextureAssets.FlyingCarpet = FlyingCarpetVanilla;
|
||||
TextureAssets.Buff[BuffID.Lucky] = LuckIconVanilla;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 622 B |
Binary file not shown.
|
After Width: | Height: | Size: 612 B |
Reference in new issue
Block a user