Removed a ton of deadcode
This commit is contained in:
1 parent
ef274091c2
commit
e3c4fd98ce
45 files changed
+38
-1511
No files matched your search
@@ -5318,7 +5318,7 @@ namespace CalamityMod.CalPlayer
|
||||
EnhancedDarknessSystem.lights.Add(new(lastDeerclopsPosition.Value, scale: DeerclopsAI.borderScale, texture: DeerclopsAI.ArenaTex.Value));
|
||||
|
||||
//we draw light around the player when far away so they have some visibility, although very small. This is especially nice in multiplayer. we scale opacity with distance bc it looks better
|
||||
EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / (409600 /*640^2*/), 0, 1)));
|
||||
EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / 409600, 0, 1)));
|
||||
|
||||
if (darknessIntensity == 0)
|
||||
{
|
||||
|
||||
@@ -556,7 +556,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)/* tModPorter If you don't need the Projectile, consider using ModifyHitNPC instead */
|
||||
public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (proj.npcProj || proj.trap)
|
||||
return;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region On Hit NPC
|
||||
public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Item, consider using OnHitNPC instead */
|
||||
public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (Player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
@@ -207,7 +207,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region On Hit NPC With Proj
|
||||
public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Projectile, consider using OnHitNPC instead */
|
||||
public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (Player.whoAmI != Main.myPlayer)
|
||||
return;
|
||||
|
||||
@@ -237,14 +237,6 @@ namespace CalamityMod.ILEditing
|
||||
dir = self.direction;
|
||||
dashing = true;
|
||||
|
||||
// CIT 16OCT2024: Commented this code out, as there's no reason for custom dash hotkey to use Player.dashTime
|
||||
// and was causing the return of Celestial Starboard's dash bug from early 1.4 versions
|
||||
/*if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1))
|
||||
{
|
||||
self.dashTime = 15;
|
||||
return;
|
||||
}*/
|
||||
|
||||
dashing = true;
|
||||
self.dashTime = 0;
|
||||
self.timeSinceLastDashStarted = 0;
|
||||
|
||||
@@ -1669,14 +1669,6 @@ namespace CalamityMod.Items
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Rainbow effect originally made for Orderbringer because it used to have a special rarity
|
||||
// But why did it have one in the first place??
|
||||
// Might be used for Miracle stuff later or something idk
|
||||
/*if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<Orderbringer>())
|
||||
{
|
||||
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -112,31 +112,6 @@ namespace CalamityMod.Items.Fishing
|
||||
}
|
||||
else
|
||||
CalamityMod.Log.Warn("Could not find either Marine Kelp or Marine Kelp Seeds from Thorium. These items will not be added to Stuffed Fish.");
|
||||
|
||||
// Ozzatron 30DEC2022: It is unlikely SoA will ever be ported to 1.4 and beyond. Commenting this out indefinitely.
|
||||
/*
|
||||
Mod soa = CalamityMod.Instance.soa;
|
||||
if (soa is not null)
|
||||
{
|
||||
try
|
||||
{
|
||||
itemLoot.Add(soa.Find<ModItem>("Welkinbell").Type, 4, herbMin, herbMax);
|
||||
itemLoot.Add(soa.Find<ModItem>("WelkinbellSeeds").Type, 10, seedMin, seedMax);
|
||||
|
||||
itemLoot.AddIf(() => Main.hardMode, soa.Find<ModItem>("Illumifern").Type, 4, herbMin, herbMax);
|
||||
itemLoot.AddIf(() => Main.hardMode, soa.Find<ModItem>("IllumifernSeeds").Type, 10, seedMin, seedMax);
|
||||
|
||||
// TODO -- There is no way to determine if SoA's Abaddon is dead without reflection.
|
||||
// Dan Yami has confirmed that downed calls will be added to SoA eventually.
|
||||
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("Enduflora").Type, 4, herbMin, herbMax);
|
||||
//itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find<ModItem>("EndufloraSeeds").Type, 10, seedMin, seedMax);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CalamityMod.Log.Debug("One of the items in this file got renamed internally. Please report this in the #bugs-read-pins channel of the official Calamity discord server.");
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
|
||||
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().disablePerfCystSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().disableHiveCystSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -61,45 +61,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().disableNaturalScourgeSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().noStupidNaturalARSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().disableAnahitaSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -62,45 +62,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker
|
||||
player.Calamity().disableVoodooSpawns |= Enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/VoodooDemonVoodooDoll").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //-
|
||||
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); //-
|
||||
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200
|
||||
realPlayerPos.Y += (float)(100 * i); //-=
|
||||
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ -
|
||||
|
||||
@@ -640,12 +640,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
string key = "Mods.CalamityMod.Status.Boss.DoGPhase2";
|
||||
Color messageColor = Color.Cyan;
|
||||
CalamityUtils.BroadcastLocalizedText(key, messageColor);
|
||||
/*
|
||||
var ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true);
|
||||
if (ctid < Main.maxCombatText)
|
||||
player.Calamity().subtitletext = Main.combatText[ctid];
|
||||
player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia };
|
||||
*/
|
||||
DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 2, 120, false, new BossText());
|
||||
}
|
||||
}
|
||||
@@ -1477,13 +1471,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
string key = "Mods.CalamityMod.Status.Boss.DoGSubphase1";
|
||||
Color messageColor = Color.Cyan;
|
||||
CalamityUtils.BroadcastLocalizedText(key, messageColor);
|
||||
|
||||
/*
|
||||
int ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true);
|
||||
if (ctid < Main.maxCombatText)
|
||||
player.Calamity().subtitletext = Main.combatText[ctid];
|
||||
player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia };
|
||||
*/
|
||||
DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 1, 120, false, new BossText());
|
||||
}
|
||||
|
||||
|
||||
@@ -504,14 +504,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
draedonAlive = true;
|
||||
}
|
||||
|
||||
// Prevent mechs from being respawned
|
||||
// CIT 08JUN2025: This code is pointless and makes me unable to work swapping the laser arm position. Commenting it out.
|
||||
/*if (otherExoMechWasFirst)
|
||||
{
|
||||
if (NPC.ai[3] < 1f)
|
||||
NPC.ai[3] = 1f;
|
||||
}*/
|
||||
|
||||
// Phases
|
||||
bool spawnOtherExoMechs = lifeRatio < 0.7f && NPC.ai[3] == 0f;
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
|
||||
@@ -194,21 +194,6 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
if (Supercharged)
|
||||
{
|
||||
//old
|
||||
/*
|
||||
Texture2D shieldTexture = ModContent.Request<Texture2D>("CalamityMod/NPCs/NormalNPCs/WulfrumRoverShield").Value;
|
||||
Rectangle frame = shieldTexture.Frame(1, 11, 0, (int)(Main.GlobalTimeWrappedHourly * 8) % 11);
|
||||
spriteBatch.Draw(shieldTexture,
|
||||
NPC.Center - screenPos + Vector2.UnitY * (NPC.gfxOffY + 6f),
|
||||
frame,
|
||||
Color.White * 0.625f,
|
||||
NPC.rotation,
|
||||
shieldTexture.Size() * 0.5f / new Vector2(1f, 11f),
|
||||
NPC.scale + (float)Math.Cos(Main.GlobalTimeWrappedHourly) * 0.1f,
|
||||
SpriteEffects.None,
|
||||
0f);
|
||||
*/
|
||||
|
||||
//0.6 : The noise upscale
|
||||
//0.15 the scale its drawn at usually, 0.2 on Zenith
|
||||
float scale = (Main.zenithWorld ? 0.2f : 0.15f) + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + NPC.whoAmI * 0.2f));
|
||||
|
||||
@@ -1805,83 +1805,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.noTileCollide = false;
|
||||
NPC.noGravity = false;
|
||||
NPC.damage = 0;
|
||||
|
||||
/*
|
||||
// Teleport back to the arena on defeat
|
||||
if (giveUpCounter == GiveUpCounterMax)
|
||||
{
|
||||
Dust.QuickDustLine(NPC.Center, initialRitualPosition + new Vector2(0, -30), 500f, permafrost ? Color.Cyan : Color.Red);
|
||||
NPC.Center = initialRitualPosition + new Vector2(0, -30);
|
||||
NPC.noTileCollide = false;
|
||||
NPC.noGravity = false;
|
||||
NPC.damage = 0;
|
||||
SoundEngine.PlaySound(GiveUpSound with { Volume = 1.7f }, NPC.Center);
|
||||
}
|
||||
if (giveUpCounter == 1010)
|
||||
{
|
||||
Particle pulse2 = new StaticPulseRing(NPC.Center, Vector2.Zero, Color.Red * 0.55f, new Vector2(1f, 1f), 0f, 5f, 0f, 47);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
}
|
||||
|
||||
if (shieldOpacity > 0f)
|
||||
shieldOpacity = 0;
|
||||
if (giveUpCounter > 1000)
|
||||
forcefieldScale = MathHelper.Lerp(forcefieldScale, 1.55f, 0.045f);
|
||||
else if (giveUpCounter > 960)
|
||||
forcefieldScale = MathHelper.Lerp(forcefieldScale, 0.4f, 0.085f);
|
||||
|
||||
if (giveUpCounter > 960)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 sparkVel = new Vector2(15, 15).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.1f);
|
||||
GlowOrbParticle orb = new GlowOrbParticle(NPC.Center + sparkVel * (8 * forcefieldScale), sparkVel * Utils.GetLerpValue(1200, 960, giveUpCounter, true), false, 60, Main.rand.NextFloat(0.7f, 1.7f) * Utils.GetLerpValue(1200, 960, giveUpCounter), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
|
||||
float vibrate = 15 * Utils.GetLerpValue(1200, 960, giveUpCounter, true);
|
||||
NPC.Center = (initialRitualPosition + new Vector2(0, -30)) + Main.rand.NextVector2Circular(vibrate, vibrate);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (giveUpCounter == 960)
|
||||
{
|
||||
NPC.Center = initialRitualPosition + new Vector2(0, -30);
|
||||
|
||||
Vector2 BurstFXDirection = new Vector2(0, 15);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
SparkParticle spark = new SparkParticle(NPC.Center, (BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
SparkParticle spark = new SparkParticle(NPC.Center, (-BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
Particle orb = new CustomPulse(NPC.Center, Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.2f, 1.1f, 13);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
Particle orb2 = new CustomPulse(NPC.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1f, 0.9f, 13);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Particle orb3 = new CustomPulse(NPC.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.9f, 0.8f, 13);
|
||||
GeneralParticleHandler.SpawnParticle(orb3);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
GlowOrbParticle burst = new GlowOrbParticle(NPC.Center, (new Vector2(30, 30).RotatedByRandom(100) + new Vector2(0, -2)) * Main.rand.NextFloat(0.1f, 1.2f), true, 120, Main.rand.NextFloat(1.7f, 2.7f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true);
|
||||
GeneralParticleHandler.SpawnParticle(burst);
|
||||
}
|
||||
|
||||
NPC.velocity = new Vector2(18 * NPC.spriteDirection, -12);
|
||||
giveUpCounter = GiveUpCounterMax;
|
||||
hasDoneDeathAnim = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -158,22 +158,6 @@ public class CrimsonEye : ModProjectile, ILocalizedModType
|
||||
|
||||
if (DistanceRatio > 0)
|
||||
{
|
||||
/*
|
||||
Main.spriteBatch.SetBlendState(BlendState.Additive);
|
||||
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Particles/HollowCircleHardEdge").Value;
|
||||
Color color = Color.Red * DistanceRatio;
|
||||
if (Time <= 65)
|
||||
color *= (Time - 45) / 20f;
|
||||
|
||||
if (Projectile.timeLeft <= 20)
|
||||
color *= Projectile.timeLeft / 20f;
|
||||
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, color, 0f, tex.Size() * 0.5f, 1.75f, 0);
|
||||
|
||||
Main.spriteBatch.SetBlendState(BlendState.AlphaBlend);
|
||||
*/
|
||||
|
||||
float opacity = DistanceRatio;
|
||||
if (Time <= 65)
|
||||
opacity *= (Time - 45) / 20f;
|
||||
|
||||
@@ -91,14 +91,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
return false;
|
||||
|
||||
/*
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor) => false;
|
||||
}
|
||||
}
|
||||
@@ -106,60 +106,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
return false;
|
||||
|
||||
/*
|
||||
Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
Texture2D mist = ModContent.Request<Texture2D>("CalamityMod/Particles/MediumMist").Value;
|
||||
|
||||
// The conga line of colors to sift through
|
||||
Color color1 = new Color(255, 110, 100, 200);
|
||||
Color color2 = new Color(255, 50, 50, 70);
|
||||
Color color3 = new Color(255, 100, 100, 100);
|
||||
Color color4 = new Color(200, 35, 30, 100);
|
||||
float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f);
|
||||
float vOffset = Math.Min(Time, 20f);
|
||||
float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time);
|
||||
float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f);
|
||||
|
||||
if (timeRatio >= 1f)
|
||||
return false;
|
||||
|
||||
for (float j = 1f; j >= 0f; j -= length)
|
||||
{
|
||||
// Color
|
||||
Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) :
|
||||
((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) :
|
||||
((timeRatio < 0.35f) ? color2 :
|
||||
((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) :
|
||||
((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) :
|
||||
Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio)))))));
|
||||
fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true);
|
||||
Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f);
|
||||
|
||||
// Positions and rotations
|
||||
Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j;
|
||||
float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length;
|
||||
float trailRot = MathHelper.PiOver4 - mainRot;
|
||||
|
||||
// Draw one backtrail
|
||||
Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f;
|
||||
Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None);
|
||||
|
||||
// Draw the main fire
|
||||
Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None);
|
||||
|
||||
// Draw the masking smoke
|
||||
Main.spriteBatch.SetBlendState(BlendState.Additive);
|
||||
Rectangle frame = mist.Frame(1, 3, 0, MistType);
|
||||
Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None);
|
||||
Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None);
|
||||
Main.spriteBatch.SetBlendState(BlendState.AlphaBlend);
|
||||
}
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor) => false;
|
||||
}
|
||||
}
|
||||
@@ -88,19 +88,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
modifiers.HideCombatText();
|
||||
|
||||
}
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
/*
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center, 267);
|
||||
dust.velocity = (Projectile.velocity * 3 * Projectile.scale).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1f);
|
||||
dust.scale = Main.rand.NextFloat(0.4f, 0.7f) * Projectile.scale;
|
||||
dust.noGravity = true;
|
||||
dust.color = Color.Red;
|
||||
}
|
||||
*/
|
||||
}
|
||||
public override void DrawBehind(int index, List<int> behindNPCsAndTiles, List<int> behindNPCs, List<int> behindProjectiles, List<int> overPlayers, List<int> overWiresUI)
|
||||
{
|
||||
overPlayers.Add(index);
|
||||
|
||||
@@ -89,17 +89,6 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
int projFrame = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type];
|
||||
int y6 = projFrame * Projectile.frame;
|
||||
|
||||
/*Main.spriteBatch.EnterShaderRegion(BlendState.Additive);
|
||||
Texture2D ring = ModContent.Request<Texture2D>("CalamityMod/Particles/HollowCircleHardEdge").Value;
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
for (int i = 2; i < 7; i += 2)
|
||||
{
|
||||
Main.spriteBatch.Draw(ring, Projectile.oldPos[i] + Projectile.Size / 2 - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), null, Color.Red * Projectile.Opacity, Projectile.velocity.ToRotation(), ring.Size() / 2, new Vector2(0.5f, 1) * 0.2f * MathHelper.Lerp(1f, 0.5f, (i - 2) / 3f), SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
Main.spriteBatch.ExitShaderRegion();*/
|
||||
return false;
|
||||
}
|
||||
public float SlashWidthFunction(float _, Vector2 vertexPos) => 16 * Utils.GetLerpValue(0f, 0.1f, _, true);
|
||||
|
||||
@@ -29,15 +29,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
/*
|
||||
Vector2 projPos = Projectile.position;
|
||||
projPos -= Projectile.velocity * 0.25f;
|
||||
int boltDust = Dust.NewDust(projPos, 1, 1, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 1.25f);
|
||||
Main.dust[boltDust].position = projPos;
|
||||
Main.dust[boltDust].scale = (float)Main.rand.Next(70, 110) * 0.013f;
|
||||
Main.dust[boltDust].velocity *= 0.1f;
|
||||
*/
|
||||
|
||||
if (Projectile.timeLeft == 500)
|
||||
{
|
||||
Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Aqua, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 3);
|
||||
|
||||
@@ -85,7 +85,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
}
|
||||
|
||||
// Main.dust[dust].velocity /= 2f;
|
||||
Vector2 current = Projectile.Center;
|
||||
if (target)
|
||||
{
|
||||
@@ -115,33 +114,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
|
||||
Projectile.position = current;
|
||||
|
||||
/*int tx = (int)(projectile.position.X / 16f);
|
||||
int ty = (int)(projectile.position.Y / 16f);
|
||||
|
||||
if (tx < 0)
|
||||
{
|
||||
tx = 0;
|
||||
}
|
||||
if (tx > Main.maxTilesX)
|
||||
{
|
||||
tx = Main.maxTilesX;
|
||||
}
|
||||
if (ty < 0)
|
||||
{
|
||||
ty = 0;
|
||||
}
|
||||
if (ty > Main.maxTilesY)
|
||||
{
|
||||
ty = Main.maxTilesY;
|
||||
}
|
||||
|
||||
if (Main.tile[tx, ty] != null && Main.tileSolid[(int)Main.tile[tx,ty].type] && Main.tile[tx, ty].wall == 0)
|
||||
{
|
||||
projectile.timeLeft -= 12;
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
|
||||
@@ -39,14 +39,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.velocity *= 0.1f;
|
||||
if (Projectile.velocity.Length() < 8)
|
||||
Projectile.velocity *= 1.01f;
|
||||
/*
|
||||
Vector2 dustVel = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.5f) * Main.rand.NextFloat(0.8f, 1.3f);
|
||||
Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(4, 4), ModContent.DustType<LightDust>(), dustVel * Main.rand.NextFloat(0.5f, 1.2f));
|
||||
dust.noGravity = !Main.rand.NextBool(3);
|
||||
dust.scale = Main.rand.NextFloat(0.45f, 0.6f);
|
||||
dust.color = Color.Gold;
|
||||
dust.noLightEmittence = true;
|
||||
*/
|
||||
|
||||
if (Projectile.timeLeft > 30)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
||||
@@ -110,11 +110,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
return true;
|
||||
}
|
||||
|
||||
/*public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(150, Main.DiscoG, 255, 127);
|
||||
}*/
|
||||
|
||||
// Only inflict Nightwither if not spawned from Icebreaker
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
|
||||
@@ -144,9 +144,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
DestroyTiles();
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the end of the laser position based on where it collides with something
|
||||
*/
|
||||
// Sets the end of the laser position based on where it collides with something
|
||||
private void SetLaserPosition(Player player)
|
||||
{
|
||||
Distance = MathHelper.Max(player.Distance(player.ClampedMouseWorld()) - 20f, MOVE_DISTANCE + 5f);
|
||||
@@ -228,9 +226,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override bool ShouldUpdatePosition() => false;
|
||||
|
||||
/*
|
||||
* Update CutTiles so the laser will cut tiles (like grass)
|
||||
*/
|
||||
// Update CutTiles so the laser will cut tiles (like grass)
|
||||
public override bool? CanCutTiles() => IsAtMaxCharge ? null : false;
|
||||
public override void CutTiles()
|
||||
{
|
||||
|
||||
@@ -368,25 +368,5 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(Projectile.timeLeft);
|
||||
writer.Write(Projectile.rotation);
|
||||
writer.Write(Projectile.localAI[2]);
|
||||
writer.Write(Projectile.localAI[0]);
|
||||
|
||||
writer.WriteFlags(stuckInTarget, thrown);
|
||||
}
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
Projectile.timeLeft = reader.Read();
|
||||
Projectile.rotation = reader.ReadSingle();
|
||||
Projectile.localAI[2] = reader.ReadSingle();
|
||||
Projectile.localAI[0] = reader.ReadSingle();
|
||||
|
||||
reader.ReadFlags(out stuckInTarget, out thrown);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -530,23 +530,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0);
|
||||
|
||||
/*
|
||||
if (PerformingPowerfulSlash)
|
||||
{
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, swingFX, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
float bouncyProgression = (float)Math.Sin(Progression * MathHelper.Pi);
|
||||
swingFX.Parameters["color"].SetValue(Color.MediumSpringGreen.ToVector4() with { W = bouncyProgression * 0.5f });
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Vector2 offset = (i / 4f * MathHelper.TwoPi + SwingAngleShift + MathHelper.PiOver4).ToRotationVector2() * 2f * Projectile.scale;
|
||||
Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition + offset, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
|
||||
@@ -55,18 +55,18 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
//more precise hitbox. makes the weapon harder to use but looks visually better: use it if you want.
|
||||
/*
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (HitTimer <= 0)
|
||||
{
|
||||
float size = Projectile.Size.Length();
|
||||
Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2;
|
||||
Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2;
|
||||
float useless = 0f;
|
||||
return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless);
|
||||
}
|
||||
return base.Colliding(projHitbox, targetHitbox);
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (HitTimer <= 0)
|
||||
{
|
||||
float size = Projectile.Size.Length();
|
||||
Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2;
|
||||
Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2;
|
||||
float useless = 0f;
|
||||
return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless);
|
||||
}
|
||||
return base.Colliding(projHitbox, targetHitbox);
|
||||
}
|
||||
*/
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -108,18 +108,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.6f, PitchVariance = 0.2f }, Projectile.Center);
|
||||
}
|
||||
|
||||
// Technically scrapped because the weapon is complex enough, but we might want to use this in the future
|
||||
/*
|
||||
if (timer % 60 == 0) // Fire Heal Stars at player (slightly predictive)
|
||||
{
|
||||
Vector2 vel = ((Projectile.Center - Owner.Center) - Owner.velocity * 8).SafeNormalize(Vector2.UnitX) * -10;
|
||||
Projectile healStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType<HolyLight>(), 0, Projectile.knockBack, Projectile.owner, 0, cloneYoyo ? 3 : 10, 5);
|
||||
healStar.extraUpdates = 2;
|
||||
SoundStyle fireHeal = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash");
|
||||
SoundEngine.PlaySound(fireHeal with { Volume = 0.9f, Pitch = 0.3f }, Projectile.Center);
|
||||
}
|
||||
*/
|
||||
|
||||
if (timer > 0)
|
||||
{
|
||||
timer--;
|
||||
|
||||
@@ -153,21 +153,11 @@ IL_6899:
|
||||
if (Projectile.tileCollide)
|
||||
{
|
||||
Projectile.hide = false;
|
||||
|
||||
//if (projectile.extraUpdates == 1)
|
||||
PreventFastfall();
|
||||
|
||||
/*Vector2 distance = Main.player[projectile.owner].Center - projectile.Center;
|
||||
if (distance.Length() < 100)
|
||||
projectile.extraUpdates = 0;
|
||||
else
|
||||
projectile.extraUpdates = 1;*/
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.hide = true;
|
||||
//projectile.extraUpdates = 1;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ChibiiDoggoFly>()] <= 0)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X, Projectile.position.Y, 0f, 0f, ModContent.ProjectileType<ChibiiDoggoFly>(), 0, 0f, Projectile.owner, (float)Projectile.identity);
|
||||
}
|
||||
|
||||
@@ -249,53 +249,6 @@ namespace CalamityMod.Projectiles.Pets
|
||||
}
|
||||
}
|
||||
|
||||
/*public override void PostDraw(Color lightColor)
|
||||
{
|
||||
if (!Main.gamePaused || Main.gameMenu)
|
||||
{
|
||||
Vector2 projDirect = projectile.position - Main.screenPosition;
|
||||
if ((float)Main.mouseX > projDirect.X && (float)Main.mouseX < projDirect.X + (float)projectile.width && (float)Main.mouseY > projDirect.Y && (float)Main.mouseY < projDirect.Y + (float)projectile.height)
|
||||
{
|
||||
int playerTileX = (int)(Main.player[projectile.owner].Center.X / 16f);
|
||||
int playerTileY = (int)(Main.player[projectile.owner].Center.Y / 16f);
|
||||
int projTileX = (int)projectile.Center.X / 16;
|
||||
int projTileY = (int)projectile.Center.Y / 16;
|
||||
int lastTileRangeX = Main.player[projectile.owner].lastTileRangeX;
|
||||
int lastTileRangeY = Main.player[projectile.owner].lastTileRangeY;
|
||||
if (playerTileX >= projTileX - lastTileRangeX && playerTileX <= projTileX + lastTileRangeX + 1 && playerTileY >= projTileY - lastTileRangeY && playerTileY <= projTileY + lastTileRangeY + 1)
|
||||
{
|
||||
Main.player[projectile.owner].noThrow = 2;
|
||||
Main.player[projectile.owner].cursorItemIconEnabled = true;
|
||||
Main.player[projectile.owner].cursorItemIconID = 3213;
|
||||
if (PlayerInput.UsingGamepad)
|
||||
{
|
||||
Main.player[projectile.owner].GamepadEnableGrappleCooldown();
|
||||
}
|
||||
if (Main.mouseRight && Main.mouseRightRelease && Player.StopMoneyTroughFromWorking == 0)
|
||||
{
|
||||
Main.mouseRightRelease = false;
|
||||
if (Main.player[projectile.owner].chest == -2)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item11, -1, -1);
|
||||
Main.player[projectile.owner].chest = -1;
|
||||
Recipe.FindRecipes();
|
||||
return;
|
||||
}
|
||||
Main.player[projectile.owner].GetCalamityPlayer().trashManChest = projectile.type;
|
||||
Main.player[projectile.owner].chest = -2;
|
||||
Main.player[projectile.owner].chestX = (int)(projectile.Center.X / 16f);
|
||||
Main.player[projectile.owner].chestY = (int)(projectile.Center.Y / 16f);
|
||||
Main.player[projectile.owner].talkNPC = -1;
|
||||
Main.npcShop = 0;
|
||||
Main.playerInventory = true;
|
||||
Main.PlaySound(SoundID.Item10, -1, -1);
|
||||
Recipe.FindRecipes();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
private bool HoleBelow() //pretty much the same as the one used in mantis
|
||||
{
|
||||
int tileWidth = 4;
|
||||
|
||||
@@ -78,15 +78,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.velocity.X *= 0.995f;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
|
||||
|
||||
// commented out sound because it was way too loud
|
||||
/*
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
Main.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, projectile.Center);
|
||||
}
|
||||
*/
|
||||
|
||||
if (Projectile.ai[0] >= 2f)
|
||||
{
|
||||
Projectile.alpha -= 25;
|
||||
|
||||
@@ -173,15 +173,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.ai[0] = 20f;
|
||||
}
|
||||
}
|
||||
|
||||
//doesn't look good
|
||||
/*Vector2 goreVec = new Vector2(projectile.Center.X, projectile.Center.Y - yAdjust - 10f);
|
||||
Vector2 goreVec = new Vector2(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y);
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
int smoke = Gore.NewGore(goreVec, default, Main.rand.Next(375, 378), 0.5f);
|
||||
Main.gore[smoke].behindTiles = true;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,25 +63,6 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
// Stay on the player's head
|
||||
Projectile.Center = (Owner.MountedCenter + new Vector2(0, -45));
|
||||
|
||||
Vector2 spawnPos = Projectile.Center + Main.rand.NextVector2Circular(5, 5);
|
||||
int lifetime = Main.rand.Next(3, 6);
|
||||
float scale = Main.rand.NextFloat(0.5f, 0.9f);
|
||||
Color color = Main.rand.NextBool(3) ? Color.LightGreen : Color.Khaki;
|
||||
/*
|
||||
SparkParticle spark1 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark1);
|
||||
SparkParticle spark2 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
SparkParticle spark3 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark3);
|
||||
SparkParticle spark4 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark4);
|
||||
SparkParticle spark5 = new SparkParticle(Projectile.Center + new Vector2(20, 0), new Vector2(Main.rand.NextFloat(7, 12), 0), false, lifetime, scale, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark5);
|
||||
SparkParticle spark6 = new SparkParticle(Projectile.Center + new Vector2(-20, 0), new Vector2(Main.rand.NextFloat(-7, -12), 0), false, lifetime, scale - 0.3f, color);
|
||||
GeneralParticleHandler.SpawnParticle(spark6);
|
||||
*/
|
||||
|
||||
// Emit some light
|
||||
Vector3 Light = new Vector3(0.251f, 0.255f, 0.219f);
|
||||
Lighting.AddLight(Projectile.Center, Light * 5);
|
||||
|
||||
@@ -142,33 +142,6 @@ public class WulfrumPingTileEffect : IPingedTileEffect, ILoadable
|
||||
Main.spriteBatch.Draw(emptyFrame, pos.ToWorldCoordinates() - Main.screenPosition, null, Color.White, 0, new Vector2(emptyFrame.Width / 2f, emptyFrame.Height / 2f), 16f, 0, 0);
|
||||
}
|
||||
|
||||
// CIT 16JUL2025: Tile lighting override is now applied via an On edit; this code is duplicated there, and thus is no longer needed here.
|
||||
/*public void EditDrawData(int i, int j, ref TileDrawInfo drawData)
|
||||
{
|
||||
float distanceFromCenter = (new Point(i, j).ToWorldCoordinates() - PingCenter).Length();
|
||||
float currentExpansion = MathHelper.Clamp(PingProgress * MaxPingLife / (float)MaxPingTravelTime, 0f, 1f) * MaxPingRadius;
|
||||
|
||||
if (distanceFromCenter - 8 > currentExpansion)
|
||||
return;
|
||||
|
||||
float brightness = 1f;
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
//Counteracts slopes and half tiles being too bright
|
||||
if (tile.Slope != SlopeType.Solid || tile.IsHalfBlock)
|
||||
brightness = 0.64f;
|
||||
|
||||
//Fade on the edges
|
||||
if (distanceFromCenter + 8 > currentExpansion)
|
||||
brightness *= 1 - (distanceFromCenter - currentExpansion + 8f) / 16f;
|
||||
|
||||
//Fade away with the effect
|
||||
brightness *= 1 - Math.Max(PingProgress - 0.9f, 0) / (0.1f);
|
||||
|
||||
if (drawData.tileLight.R < 200 * brightness) drawData.tileLight.R = (byte)(200 * brightness);
|
||||
if (drawData.tileLight.G < 200 * brightness) drawData.tileLight.G = (byte)(200 * brightness);
|
||||
if (drawData.tileLight.B < 200 * brightness) drawData.tileLight.B = (byte)(200 * brightness);
|
||||
}*/
|
||||
|
||||
public void UpdateEffect()
|
||||
{
|
||||
if (PingTimer > 0)
|
||||
|
||||
@@ -177,9 +177,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
#region 'Extra Drapes' Drawing
|
||||
private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
*/
|
||||
// If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
if (
|
||||
CheckTile(Type, false, 0, 1, i, j) ||
|
||||
(CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j))
|
||||
@@ -194,9 +192,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
|
||||
private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Ending the Extra when a wall is reached
|
||||
*/
|
||||
// Ending the Extra when a wall is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -220,9 +216,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
|
||||
private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
*/
|
||||
// Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -244,9 +238,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
|
||||
private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Hanging 'drapes' of the extra element
|
||||
*/
|
||||
// Hanging 'drapes' of the extra element
|
||||
|
||||
//Base
|
||||
if (
|
||||
@@ -325,113 +317,6 @@ namespace CalamityMod.Tiles.Crags
|
||||
{
|
||||
return Main.tile[i, j].TileFrameNumber * extraFrameWidth;
|
||||
}
|
||||
|
||||
/*
|
||||
private int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
Tile sourceTile = Main.tile[i, j];
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// Gets the tile variant to use. Returns -1 by default
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <param name="j"></param>
|
||||
/// <returns></returns>
|
||||
public int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
if (j % 3 < 2)
|
||||
{
|
||||
//We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks
|
||||
Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// Gets the tile variant to use. Returns -1 by default
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <param name="j"></param>
|
||||
/// <returns></returns>
|
||||
public int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
if (j % 3 < 2)
|
||||
{
|
||||
//We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks
|
||||
Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -82,9 +82,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
#region 'Extra Drapes' Drawing
|
||||
private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
*/
|
||||
// If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
if (
|
||||
CheckTile(Type, false, 0, 1, i, j) ||
|
||||
(CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j))
|
||||
@@ -99,9 +97,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
|
||||
private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Ending the Extra when a wall is reached
|
||||
*/
|
||||
// Ending the Extra when a wall is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -125,9 +121,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
|
||||
private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
*/
|
||||
// Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -149,9 +143,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
|
||||
private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Hanging 'drapes' of the extra element
|
||||
*/
|
||||
// Hanging 'drapes' of the extra element
|
||||
|
||||
//Base
|
||||
if (
|
||||
@@ -230,113 +222,6 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
{
|
||||
return Main.tile[i, j].TileFrameNumber * extraFrameWidth;
|
||||
}
|
||||
|
||||
/*
|
||||
private int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
Tile sourceTile = Main.tile[i, j];
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+4
-119
@@ -90,9 +90,7 @@ namespace CalamityMod.Tiles
|
||||
#region 'Extra Drapes' Drawing
|
||||
private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
*/
|
||||
// If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
if (
|
||||
CheckTile(Type, false, 0, 1, i, j) ||
|
||||
(CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j))
|
||||
@@ -107,9 +105,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Ending the Extra when a wall is reached
|
||||
*/
|
||||
// Ending the Extra when a wall is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -133,9 +129,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
*/
|
||||
// Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -157,9 +151,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Hanging 'drapes' of the extra element
|
||||
*/
|
||||
// Hanging 'drapes' of the extra element
|
||||
|
||||
//Base
|
||||
if (
|
||||
@@ -238,113 +230,6 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
return Main.tile[i, j].TileFrameNumber * extraFrameWidth;
|
||||
}
|
||||
|
||||
/*
|
||||
private int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
Tile sourceTile = Main.tile[i, j];
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+4
-119
@@ -199,9 +199,7 @@ namespace CalamityMod.Tiles
|
||||
#region 'Extra Drapes' Drawing
|
||||
private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
*/
|
||||
// If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface
|
||||
if (
|
||||
CheckTile(Type, false, 0, 1, i, j) ||
|
||||
(CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j))
|
||||
@@ -216,9 +214,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Ending the Extra when a wall is reached
|
||||
*/
|
||||
// Ending the Extra when a wall is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -242,9 +238,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
*/
|
||||
// Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached
|
||||
|
||||
//Left
|
||||
if (
|
||||
@@ -266,9 +260,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour)
|
||||
{
|
||||
/*
|
||||
Hanging 'drapes' of the extra element
|
||||
*/
|
||||
// Hanging 'drapes' of the extra element
|
||||
|
||||
//Base
|
||||
if (
|
||||
@@ -347,113 +339,6 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
return Main.tile[i, j].TileFrameNumber * extraFrameWidth;
|
||||
}
|
||||
|
||||
/*
|
||||
private int GetTileVariant(int i, int j)
|
||||
{
|
||||
int variant = 0; //Default to using variant 1
|
||||
Tile sourceTile = Main.tile[i, j];
|
||||
//Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using
|
||||
int frameX = sourceTile.frameX / 18;
|
||||
int frameY = sourceTile.frameY / 18;
|
||||
if (frameY < 3 && !(frameX >= 6 && frameX < 9))
|
||||
{
|
||||
int group = 0;
|
||||
int[] group1XPos = new int[] { 1, 2, 3 };
|
||||
int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 };
|
||||
foreach (int k in group1XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 1;
|
||||
}
|
||||
}
|
||||
foreach (int k in group2XPos)
|
||||
{
|
||||
if (frameX < k + 1 && frameX >= k)
|
||||
{
|
||||
group = 2;
|
||||
}
|
||||
}
|
||||
if (group == 1)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 3)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (group == 2)
|
||||
{
|
||||
if (frameY < 1)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameY < 2)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (frameX < 6 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 2)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 4)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 6 && frameX < 9)
|
||||
{
|
||||
if (frameX < 7)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 8)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
else if (frameX >= 9 && frameY >= 3)
|
||||
{
|
||||
if (frameX < 10)
|
||||
{
|
||||
variant = 0;
|
||||
}
|
||||
else if (frameX < 11)
|
||||
{
|
||||
variant = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
variant = 2;
|
||||
}
|
||||
}
|
||||
return (variant);
|
||||
}
|
||||
*/
|
||||
#endregion
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
|
||||
@@ -15,11 +15,6 @@ namespace CalamityMod.Walls.UnsafeWalls
|
||||
public static Asset<Texture2D> leafTexture = null;
|
||||
|
||||
public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12;
|
||||
/*public override bool Autoload(ref string name, ref string texture)
|
||||
{
|
||||
mod.AddWall("AstralGrassWallUnsafe", this, texture);
|
||||
return base.Autoload(ref name, ref texture);
|
||||
}*/
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -774,66 +774,5 @@ namespace CalamityMod.World
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
public static void PlaceTit(int x, int y, ushort type = 165)
|
||||
{
|
||||
if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y + 1].HasTile)
|
||||
{
|
||||
if (Main.tile[x, y - 1].TileType == (ushort)ModContent.TileType<Navystone>())
|
||||
{
|
||||
if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y + 2].HasTile)
|
||||
{
|
||||
int num2 = WorldGen.genRand.Next(3) * 18;
|
||||
Main.tile[x, y].TileType = type;
|
||||
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y].TileFrameX = (short)num2;
|
||||
Main.tile[x, y].TileFrameY = 72;
|
||||
}
|
||||
else
|
||||
{
|
||||
int num3 = WorldGen.genRand.Next(3) * 18;
|
||||
Main.tile[x, y].TileType = type;
|
||||
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y].TileFrameX = (short)num3;
|
||||
Main.tile[x, y].TileFrameY = 0;
|
||||
Main.tile[x, y + 1].TileType = type;
|
||||
Main.tile[x, y + 1].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y + 1].TileFrameX = (short)num3;
|
||||
Main.tile[x, y + 1].TileFrameY = 18;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WorldGen.SolidTile(x, y + 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y - 1].HasTile)
|
||||
{
|
||||
if (Main.tile[x, y + 1].TileType == (ushort)ModContent.TileType<Navystone>())
|
||||
{
|
||||
if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y - 2].HasTile)
|
||||
{
|
||||
int num13 = WorldGen.genRand.Next(3) * 18;
|
||||
Main.tile[x, y].TileType = type;
|
||||
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y].TileFrameX = (short)num13;
|
||||
Main.tile[x, y].TileFrameY = 90;
|
||||
}
|
||||
else
|
||||
{
|
||||
int num14 = WorldGen.genRand.Next(3) * 18;
|
||||
Main.tile[x, y - 1].TileType = type;
|
||||
Main.tile[x, y - 1].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y - 1].TileFrameX = (short)num14;
|
||||
Main.tile[x, y - 1].TileFrameY = 36;
|
||||
Main.tile[x, y].TileType = type;
|
||||
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[x, y].TileFrameX = (short)num14;
|
||||
Main.tile[x, y].TileFrameY = 54;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user