From b85f0d0ee978f9f93ce11f23eca8795de4eef2bb Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:06:13 -0700 Subject: [PATCH] figured out why it was nulling (more TP support) --- Projectiles/Boss/SporeGasPlantera.cs | 8 ++++++-- Projectiles/Boss/SporeGasPlantera.png | Bin 520 -> 0 bytes Projectiles/Boss/SporeGasPlantera2.png | Bin 533 -> 0 bytes Projectiles/Boss/SporeGasPlantera3.png | Bin 489 -> 0 bytes Projectiles/Summon/PlantationStaffSeed.cs | 5 ++++- Projectiles/Summon/PlantationStaffSeed.png | Bin 389 -> 0 bytes Projectiles/Summon/PlantationStaffSeed2.png | Bin 381 -> 0 bytes 7 files changed, 10 insertions(+), 3 deletions(-) delete mode 100644 Projectiles/Boss/SporeGasPlantera.png delete mode 100644 Projectiles/Boss/SporeGasPlantera2.png delete mode 100644 Projectiles/Boss/SporeGasPlantera3.png delete mode 100644 Projectiles/Summon/PlantationStaffSeed.png delete mode 100644 Projectiles/Summon/PlantationStaffSeed2.png diff --git a/Projectiles/Boss/SporeGasPlantera.cs b/Projectiles/Boss/SporeGasPlantera.cs index ac7d85083d..99555ff1b0 100644 --- a/Projectiles/Boss/SporeGasPlantera.cs +++ b/Projectiles/Boss/SporeGasPlantera.cs @@ -3,6 +3,7 @@ using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -11,10 +12,13 @@ namespace CalamityMod.Projectiles.Boss public class SporeGasPlantera : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; + public override string Texture => "Terraria/Images/Projectile_" + ProjectileID.SporeGas; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 2; ProjectileID.Sets.TrailingMode[Type] = 0; + Main.instance.LoadProjectile(ProjectileID.SporeGas2); + Main.instance.LoadProjectile(ProjectileID.SporeGas3); } public override void SetDefaults() @@ -86,10 +90,10 @@ namespace CalamityMod.Projectiles.Boss case 0: break; case 1: - texture = ModContent.Request("CalamityMod/Projectiles/Boss/SporeGasPlantera2").Value; + texture = TextureAssets.Projectile[ProjectileID.SporeGas2].Value; break; case 2: - texture = ModContent.Request("CalamityMod/Projectiles/Boss/SporeGasPlantera3").Value; + texture = TextureAssets.Projectile[ProjectileID.SporeGas3].Value; break; default: break; diff --git a/Projectiles/Boss/SporeGasPlantera.png b/Projectiles/Boss/SporeGasPlantera.png deleted file mode 100644 index d96df4734e00981cf754aada8f25389144fd136a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmV+j0{8uiP)Px#1ZP1_K>z@;j|==^1poj56;Mo6MF0Q*9N1pX?^uu59smE={{Nv*^@-h&zy1IK z0g*{WK~z{r)t0eJ!%!54Q-=T~{T_3_AE%e4dBYX!mGH88OP1T9>_t>uYMGoOQpph@t4^81B*)%)^;#*A2%3a!hVtdT*v$ z3+(H)#;U3I2f&e?pT4QC2j$rX)CdsSO>Ns0v=(N&_of;->xSP6T^&t3Vza(w3Y>S< z6qL^a%`vq=UjQ7z2?(zb>lXf00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj56;Mo6MF0Q*9N1p||DnzASWoqd|NqyI*Bv9bvGf1{ z0iH=jK~z{r)t9kK13?r;cP&!H#?BOKn}AgiYy?59Yz+Q@zhGe@La-1U3k!e2AJ9}* zVlPN4A-2XsI~y(1MCP#v!qwqLP@FliTxK)7$-8ss?WXu^76!ZHa8$!6GnM{3Wu;%x zDxO;x(YfEj^-s-B8!tWHn8xmtt|M9rcooIqe%^KYIMRQ+HtoFDOsPyWr2N#m{C3UC z;E{a-9R}h;~l;3*)Q$wrOmBtkb6Fh(0^0gf%7`+F`v+@VRzY zB|S%a^CLTJx4 zM6B=R|2_iza?px2Gt)Yvr0)n7>obU5qPs~m1D+F*k0ahcKF}Px#1ZP1_K>z@;j|==^1poj56;Mo6MF0Q*9N1p}|JVNiq0R4DPxXn9*Bx?!Ft-2z z0dh%1K~z{r-IuXS15pq~Hz`tBr89-vMzD&4jbLMCCH{c_VWZ%u_yb~PWh2-Kl1k9l zSj5iCB28p3ITEgn`vL*q^E5Zh&U@Lp%*?)RRmR%$$#nKpylr0oi1`iHFS@Qh(?93? zsmWy2Kh^cLdXR3s+)6z|cMejWaOd)M*2?Z^rAD6K8~KGaJ@Q_4!Va@z(I(d zWc|^5N1C4_z!UGRZ|NE*aO(JTEWKLkNn6#fl$rwKSRXl)Z;d$a%-Lipb-YF(s4xkor%;Ru|?kLZZ$O*aw=#pi1Q8tdWYX@*4g*wyuZ0p*X? "Projectiles.Summon"; + public override string Texture => "Terraria/Images/Projectile_" + ProjectileID.SeedPlantera; public ref float RandomTexture => ref Projectile.ai[0]; @@ -18,6 +20,7 @@ namespace CalamityMod.Projectiles.Summon ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.TrailCacheLength[Type] = 3; + Main.instance.LoadProjectile(ProjectileID.PoisonSeedPlantera); } public override void SetDefaults() @@ -54,7 +57,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (RandomTexture == 0f) ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/PlantationStaffSeed2").Value; + Texture2D texture = (RandomTexture == 0f) ? Terraria.GameContent.TextureAssets.Projectile[ProjectileID.PoisonSeedPlantera].Value : TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/PlantationStaffSeed.png b/Projectiles/Summon/PlantationStaffSeed.png deleted file mode 100644 index 14abac4751244363632c2920df4f06d12267c0fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 389 zcmV;00eb$4P)m8-;Xk+D~%nf$Gy~kPq3n+V&e%5!ZV^0`Nl+xa6 zI(e@a1`{=p{%U(-=XD)`bTP7|bkZ%%+Y{xs%Z=zcX66VTxA-|805QJ~pX^us1kj$` zSQt!{lJ8Xe1@UwB`hEz&#R-3$tBVB3617B+=ka*!5P*k|$3lO@OSP~uQM_%QJ-egf z%0-#S%hkc&H&FH_z07l87)+GX-fA|zs}=?mHIKEzUlS!iB~QVUB*~Zaw!~7pxf`7Ae@(jxo2nd2~m%?tb zvPcn&^#vwzGTH2;@vrjp&&!t=X5N6Kj4`<}CU?!ZT?1cLgrYo+?g2RGDhG(;cq=SX zq=&(^wLtwPcNRIE$G!eB0L%2v>Y00ljfwI$=CpQUF*oF!5%qA;+Xt%N)N4*w61FC) zTz@r9KI(<7i7t;`;o8JS_PKgU>;>{x%r_<$=j?Y!jI-4aS=8C5%G;zjtX-&i z6f9T!Cx<}Qn|jT4hjjl}m#IhCn&|TA6|PMz-wj|VdAPenyInhCk_`VOMA-|_MXpBw bFIRs6u5+0*Zkm+Y00000NkvXXu0mjf?nSFh