More misc errors. 740
This commit is contained in:
1 parent
0a81cc0cf5
commit
5e3db37979
112 files changed
+245
-329
No files matched your search
@@ -39,7 +39,7 @@ namespace CalamityMod.Events
|
||||
|
||||
// A partially bright pale-ish cyan with a hint of yellow.
|
||||
|
||||
public static readonly Color TextColor = new Color(115, 194, 147);
|
||||
public static readonly Color TextColor = new(115, 194, 147);
|
||||
|
||||
// How long the invasion persists, in frames, if nothing is killed.
|
||||
public const int InvasionNoKillPersistTime = 9000;
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Events
|
||||
public const float BloodwormSpawnRate = 0.1f;
|
||||
|
||||
// Not a readonly collection so that if anyone else wants to add stuff in here with their own mod, they can.
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesPreHM = new Dictionary<int, AcidRainSpawnData>()
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesPreHM = new()
|
||||
{
|
||||
{ ModContent.NPCType<NuclearToad>(), new AcidRainSpawnData(1, 0.75f, AcidRainSpawnRequirement.Anywhere) },
|
||||
{ ModContent.NPCType<AcidEel>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Events
|
||||
};
|
||||
|
||||
// Note: Irradiated Slimes spawn naturally
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesAS = new Dictionary<int, AcidRainSpawnData>()
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesAS = new()
|
||||
{
|
||||
{ ModContent.NPCType<Radiator>(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<AcidEel>(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) },
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Events
|
||||
{ ModContent.NPCType<SulfurousSkater>(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) }
|
||||
};
|
||||
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesPolter = new Dictionary<int, AcidRainSpawnData>()
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesPolter = new()
|
||||
{
|
||||
{ ModContent.NPCType<Radiator>(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<AcidEel>(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) },
|
||||
@@ -84,12 +84,12 @@ namespace CalamityMod.Events
|
||||
{ ModContent.NPCType<GammaSlime>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) }
|
||||
};
|
||||
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleMinibossesAS = new Dictionary<int, AcidRainSpawnData>()
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleMinibossesAS = new()
|
||||
{
|
||||
{ ModContent.NPCType<CragmawMire>(), new AcidRainSpawnData(5, 0.08f, AcidRainSpawnRequirement.Water) }
|
||||
};
|
||||
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleMinibossesPolter = new Dictionary<int, AcidRainSpawnData>()
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleMinibossesPolter = new()
|
||||
{
|
||||
{ ModContent.NPCType<CragmawMire>(), new AcidRainSpawnData(4, 0.08f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<Mauler>(), new AcidRainSpawnData(4, 0.07f, AcidRainSpawnRequirement.Water) },
|
||||
@@ -167,7 +167,7 @@ namespace CalamityMod.Events
|
||||
Main.numCloudsTemp = Main.maxClouds;
|
||||
Main.numClouds = Main.numCloudsTemp;
|
||||
Main.windSpeedCurrent = 0.72f;
|
||||
Main.windSpeedTarget = Main.windSpeedTarget;
|
||||
Main.windSpeedTarget = Main.windSpeedCurrent;
|
||||
Main.weatherCounter = 60 * 60 * 10; // 10 minutes of rain. Remember, once the rain goes away, so does the invasion.
|
||||
Main.rainTime = Main.weatherCounter;
|
||||
Main.maxRaining = 0.89f;
|
||||
@@ -246,7 +246,7 @@ namespace CalamityMod.Events
|
||||
Main.numCloudsTemp = Main.maxClouds;
|
||||
Main.numClouds = Main.numCloudsTemp;
|
||||
Main.windSpeedTarget = 0.72f;
|
||||
Main.windSpeedCurrent = Main.windSpeedCurrent;
|
||||
Main.windSpeedCurrent = Main.windSpeedTarget;
|
||||
Main.weatherCounter = 60 * 60 * 10; // 10 minutes of rain. Remember, once the rain goes away, so does the invasion.
|
||||
Main.rainTime = Main.weatherCounter;
|
||||
Main.maxRaining = 0.89f;
|
||||
@@ -294,7 +294,7 @@ namespace CalamityMod.Events
|
||||
Main.numCloudsTemp = Main.rand.Next(5, 20 + 1);
|
||||
Main.numClouds = Main.numCloudsTemp;
|
||||
Main.windSpeedCurrent = Main.rand.NextFloat(0.04f, 0.25f);
|
||||
Main.windSpeedTarget = Main.windSpeedTarget;
|
||||
Main.windSpeedTarget = Main.windSpeedCurrent;
|
||||
Main.maxRaining = 0f;
|
||||
if (win)
|
||||
{
|
||||
|
||||
@@ -450,15 +450,15 @@ namespace CalamityMod.Items
|
||||
#region Saving And Loading
|
||||
public override void SaveData(Item item, TagCompound tag)
|
||||
{
|
||||
tag.Add("rogue" = rogue);
|
||||
tag.Add("timesUsed" = timesUsed);
|
||||
tag.Add("rarity") = (int)customRarity;
|
||||
tag.Add("charge") = Charge;
|
||||
tag.Add("reforgeTier") = reforgeTier;
|
||||
tag.Add("enchantmentID") = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0;
|
||||
tag.Add("DischargeEnchantExhaustion") = DischargeEnchantExhaustion;
|
||||
tag.Add("canFirePointBlankShots") = canFirePointBlankShots;
|
||||
tag.Add("trueMelee") = trueMelee;
|
||||
tag.Add("rogue", rogue);
|
||||
tag.Add("timesUsed", timesUsed);
|
||||
tag.Add("rarity", (int)customRarity);
|
||||
tag.Add("charge", Charge);
|
||||
tag.Add("reforgeTier", reforgeTier);
|
||||
tag.Add("enchantmentID", AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0);
|
||||
tag.Add("DischargeEnchantExhaustion", DischargeEnchantExhaustion);
|
||||
tag.Add("canFirePointBlankShots", canFirePointBlankShots);
|
||||
tag.Add("trueMelee", trueMelee);
|
||||
}
|
||||
|
||||
public override void LoadData(Item item, TagCompound tag)
|
||||
|
||||
@@ -948,7 +948,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
TooltipLine StealthGen = new TooltipLine(Mod, "PrefixStealthGenBoost", "+" + Math.Round(stealthGenBoost * 100f) + "% stealth generation")
|
||||
{
|
||||
isModifier = true
|
||||
IsModifier = true
|
||||
};
|
||||
tooltips.Add(StealthGen);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Dyes
|
||||
public class AuricDye : BaseDye
|
||||
{
|
||||
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(Mod.Assets.Request<Effect>("Effects/Dyes/AuricDyeShader").Value), "DyePass").
|
||||
UseColor(new Color(170, 96, 60)).UseSecondaryColor(new Color(226, 196, 106)).SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/SharpNoise"));
|
||||
UseColor(new Color(170, 96, 60)).UseSecondaryColor(new Color(226, 196, 106)).SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/SharpNoise").Value);
|
||||
public override void SafeSetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Auric Dye");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Dyes
|
||||
}
|
||||
public sealed override void SetDefaults()
|
||||
{
|
||||
byte dye = Item.dye;
|
||||
int dye = Item.dye;
|
||||
Item.CloneDefaults(ItemID.GelDye);
|
||||
Item.dye = dye;
|
||||
SafeSetDefaults();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.World;
|
||||
using Terraria.GameContent;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
@@ -27,7 +28,7 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D tex = Main.itemTexture[Item.type];
|
||||
Texture2D tex = TextureAssets.Item[Item.type].Value;
|
||||
Rectangle variant = new Rectangle(CalamityWorld.OreTypes[0] == TileID.Tin ? 0 : 32, CalamityWorld.OreTypes[1] == TileID.Lead ? 0 : 32, 30, 30);
|
||||
spriteBatch.Draw(tex, position, variant, drawColor, 0f, origin, scale * 2f, 0f, 0f);
|
||||
return false;
|
||||
@@ -35,7 +36,7 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D tex = Main.itemTexture[Item.type];
|
||||
Texture2D tex = TextureAssets.Item[Item.type].Value;
|
||||
Rectangle variant = new Rectangle(CalamityWorld.OreTypes[0] == TileID.Tin ? 0 : 32, CalamityWorld.OreTypes[1] == TileID.Lead ? 0 : 32, 30, 30);
|
||||
Vector2 positionDisplace = new Vector2( 16 , 16 ) * scale;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Potions
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.RagePotion).
|
||||
AddIngredient<UnholyEssence>().
|
||||
AddIngrediente<GalacticaSingularity>().
|
||||
AddIngredient<GalacticaSingularity>().
|
||||
AddTile(TileID.AlchemyTable).
|
||||
Register();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
if (crit)
|
||||
damage /= 2;
|
||||
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<GaussFlux>(), damage, 0f, player.whoAmI, 0f, target.whoAmI);
|
||||
Projectile.NewProjectile(player.GetProjectileSource_Item(Item), target.Center, Vector2.Zero, ModContent.ProjectileType<GaussFlux>(), damage, 0f, player.whoAmI, 0f, target.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, shootVelocity.ToRotation());
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, velocity.ToRotation());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -40,8 +40,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Item.shootSpeed;
|
||||
float num74 = knockBack;
|
||||
num74 = player.GetWeaponKnockback(Item, num74);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
@@ -67,11 +65,11 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
vector2.Y = (float)Main.mouseY + Main.screenPosition.Y;
|
||||
Vector2 spinningpoint = new Vector2(num78, num79);
|
||||
spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Calamitamini>(), damage, num74, i, 0f, 1f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Calamitamini>(), damage, knockback, i, 0f, 1f);
|
||||
spinningpoint = spinningpoint.RotatedBy(-3.1415927410125732, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Catastromini>(), damage, num74, i, 0f, 0f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Catastromini>(), damage, knockback, i, 0f, 0f);
|
||||
spinningpoint = spinningpoint.RotatedBy(-5.1415927410125732, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Cataclymini>(), damage, num74, i, 0f, 1f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<Cataclymini>(), damage, knockback, i, 0f, 1f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
if (!(Main.projectile[i].modProjectile as ColdDivinityPointyThing).circlingPlayer)
|
||||
if (!(Main.projectile[i].ModProjectile as ColdDivinityPointyThing).circlingPlayer)
|
||||
continue;
|
||||
pointyThingCount++;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].ai[1] == 0f)
|
||||
{
|
||||
if (!(Main.projectile[i].modProjectile as ColdDivinityPointyThing).circlingPlayer)
|
||||
if (!(Main.projectile[i].ModProjectile as ColdDivinityPointyThing).circlingPlayer)
|
||||
continue;
|
||||
Main.projectile[i].ai[0] = angle;
|
||||
Main.projectile[i].netUpdate = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -45,8 +45,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Item.shootSpeed;
|
||||
float knockback = knockBack;
|
||||
knockback = player.GetWeaponKnockback(Item, knockback);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
|
||||
@@ -49,8 +49,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Item.shootSpeed;
|
||||
float num74 = knockBack;
|
||||
num74 = player.GetWeaponKnockback(Item, num74);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
@@ -76,7 +74,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
vector2.Y = (float)Main.mouseY + Main.screenPosition.Y;
|
||||
Vector2 spinningpoint = new Vector2(num78, num79);
|
||||
spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, num74, i, 0f, 1f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, knockback, i, 0f, 1f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
if ((Main.projectile[i].modProjectile as IgneousBlade).Firing)
|
||||
if ((Main.projectile[i].ModProjectile as IgneousBlade).Firing)
|
||||
continue;
|
||||
swordCount++;
|
||||
for (int j = 0; j < 22; j++)
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f)
|
||||
{
|
||||
if ((Main.projectile[i].modProjectile as IgneousBlade).Firing)
|
||||
if ((Main.projectile[i].ModProjectile as IgneousBlade).Firing)
|
||||
continue;
|
||||
Main.projectile[i].ai[0] = angle;
|
||||
angle += angleVariance;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -40,8 +40,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Item.shootSpeed;
|
||||
int num73 = damage;
|
||||
float num74 = knockBack;
|
||||
num74 = player.GetWeaponKnockback(Item, num74);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
@@ -63,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
num79 = 0f;
|
||||
vector2.X = (float)Main.mouseX + Main.screenPosition.X;
|
||||
vector2.Y = (float)Main.mouseY + Main.screenPosition.Y;
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, num78, num79, ModContent.ProjectileType<HermitCrabMinion>(), num73, num74, i, 0f, 0f);
|
||||
Projectile.NewProjectile(source, vector2.X, vector2.Y, num78, num79, ModContent.ProjectileType<HermitCrabMinion>(), num73, knockback, i, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,59 +117,16 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
if (robotIndex != -1)
|
||||
{
|
||||
Projectile robot = Main.projectile[robotIndex];
|
||||
GiantIbanRobotOfDoom robotModProjectile = ((GiantIbanRobotOfDoom)robot.modProjectile);
|
||||
GiantIbanRobotOfDoom robotModProjectile = ((GiantIbanRobotOfDoom)robot.ModProjectile);
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<AndromedaRegislash>()] <= 0 &&
|
||||
robotModProjectile.TopIconActive &&
|
||||
(robotModProjectile.RightIconCooldown <= GiantIbanRobotOfDoom.RightIconAttackTime ||
|
||||
!robotModProjectile.RightIconActive)) // "Melee" attack
|
||||
{
|
||||
var source = player.GetProjectileSource_Item(item);
|
||||
int damage = player.Calamity().andromedaState == AndromedaPlayerState.SmallRobot ? GiantIbanRobotOfDoom.RegicideBaseDamageSmall : GiantIbanRobotOfDoom.RegicideBaseDamageLarge;
|
||||
if (item.Calamity().rogue)
|
||||
{
|
||||
damage = (int)(damage * player.RogueDamage());
|
||||
}
|
||||
if (item.melee)
|
||||
{
|
||||
damage = (int)(damage * player.MeleeDamage());
|
||||
}
|
||||
if (item.ranged)
|
||||
{
|
||||
damage = (int)(damage * player.RangedDamage());
|
||||
}
|
||||
if (item.magic)
|
||||
{
|
||||
damage = (int)(damage * player.MagicDamage());
|
||||
}
|
||||
if (item.summon)
|
||||
{
|
||||
damage = (int)(damage * player.MinionDamage());
|
||||
}
|
||||
Projectile blade = Projectile.NewProjectileDirect(source, robot.Center + (robot.spriteDirection > 0).ToDirectionInt() * robot.width / 2 * Vector2.UnitX,
|
||||
Projectile.NewProjectileDirect(source, robot.Center + (robot.spriteDirection > 0).ToDirectionInt() * robot.width / 2 * Vector2.UnitX,
|
||||
Vector2.Zero, ModContent.ProjectileType<AndromedaRegislash>(), damage, 15f, player.whoAmI, Projectile.GetByUUID(robot.owner, robot.whoAmI));
|
||||
|
||||
if (blade.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
if (item.Calamity().rogue)
|
||||
{
|
||||
blade.Calamity().forceRogue = true;
|
||||
}
|
||||
if (item.melee)
|
||||
{
|
||||
blade.Calamity().forceMelee = true;
|
||||
}
|
||||
if (item.ranged)
|
||||
{
|
||||
blade.Calamity().forceRanged = true;
|
||||
}
|
||||
if (item.magic)
|
||||
{
|
||||
blade.Calamity().forceMagic = true;
|
||||
}
|
||||
if (item.summon)
|
||||
{
|
||||
blade.Calamity().forceMinion = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!robotModProjectile.TopIconActive &&
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -45,8 +45,6 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = Item.shootSpeed;
|
||||
float num74 = knockBack;
|
||||
num74 = player.GetWeaponKnockback(Item, num74);
|
||||
player.itemTime = Item.useTime;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
@@ -72,9 +70,9 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
vector2.Y = (float)Main.mouseY + Main.screenPosition.Y;
|
||||
Vector2 spinningpoint = new Vector2(num78, num79);
|
||||
spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<PinkButterfly>(), damage, num74, i, 0f, 0f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<PinkButterfly>(), damage, knockback, i, 0f, 0f);
|
||||
spinningpoint = spinningpoint.RotatedBy(-3.1415927410125732, default);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<PurpleButterfly>(), damage, num74, i, 0f, 0f);
|
||||
Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType<PurpleButterfly>(), damage, knockback, i, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,10 +171,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float offsetAngle = MathHelper.Lerp(-0.3f, 0.3f, i / 2f);
|
||||
Projectile.NewProjectile(NPC.Center, (spitDirection + offsetAngle).ToRotationVector2() * 10f, ModContent.ProjectileType<OrthoceraStream>(), damage, 2f);
|
||||
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, (spitDirection + offsetAngle).ToRotationVector2() * 10f, ModContent.ProjectileType<OrthoceraStream>(), damage, 2f);
|
||||
}
|
||||
}
|
||||
Projectile.NewProjectile(NPC.Center, spitDirection.ToRotationVector2() * 12f, ModContent.ProjectileType<OrthoceraStream>(), damage, 2f);
|
||||
Projectile.NewProjectile(NPC.GetSpawnSource_ForProjectile(), NPC.Center, spitDirection.ToRotationVector2() * 12f, ModContent.ProjectileType<OrthoceraStream>(), damage, 2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Particles
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch, Vector2 basePosition)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Particles/Light");
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Particles/Light").Value;
|
||||
|
||||
float rot = LineDirection + MathHelper.PiOver2;
|
||||
Vector2 origin = new Vector2(tex.Width / 2f, tex.Height);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Particles
|
||||
foreach (NPC npc in PendingNPCsToDraw.Keys)
|
||||
{
|
||||
// Prepare the sprite batch for specialized drawing in prepration that the graphics device will draw to new render targets.
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Matrix.Identity);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity);
|
||||
|
||||
// Draw the NPC to the temporary render target so that all of its drawcode is localized, and then get the colors from the results.
|
||||
Main.instance.GraphicsDevice.SetRenderTarget(PendingNPCsToDraw[npc]);
|
||||
@@ -231,7 +231,7 @@ namespace CalamityMod.Particles
|
||||
|
||||
float dissipationFactor = Utils.GetLerpValue(6f, 16f, Velocity.Length(), true);
|
||||
float velocityInterpolant = Utils.GetLerpValue(25f - dissipationFactor * 10f, 80f - dissipationFactor * 45f, Time, true);
|
||||
Vector2 idealVelocity = new Vector2(Main.windSpeed * MathHelper.Lerp(0.8f, 1.2f, (float)Math.Sin(Center.Y / 50f + ID)) * 20f, (float)Math.Sin(Main.time / 20f + ID * 0.01f) * 3f - 1f);
|
||||
Vector2 idealVelocity = new Vector2(Main.windSpeedCurrent * MathHelper.Lerp(0.8f, 1.2f, (float)Math.Sin(Center.Y / 50f + ID)) * 20f, (float)Math.Sin(Main.time / 20f + ID * 0.01f) * 3f - 1f);
|
||||
Velocity = Vector2.Lerp(Velocity, idealVelocity, velocityInterpolant * 0.16f);
|
||||
Center += Velocity;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Particles
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Texture2D sparkTexture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D sparkTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle frame = new Rectangle(0, 6 * Variant, 6, 6);
|
||||
Texture2D bloomTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
//Ajust the bloom's texture to be the same size as the star's
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Particles
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Texture2D dustTexture = Big ? ModContent.Request<Texture2D>("CalamityMod/Particles/FakeDustBig") : ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D dustTexture = Big ? ModContent.Request<Texture2D>("CalamityMod/Particles/FakeDustBig").Value : ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle frame = new Rectangle(0, (Big ? 8 : 6) * Variant, (Big ? 8 : 6), (Big ? 8 : 6));
|
||||
spriteBatch.Draw(dustTexture, Position - Main.screenPosition, frame, Color * opacity, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Particles
|
||||
if (SpawnDelay > 0)
|
||||
return;
|
||||
Texture2D sparkTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D bloomTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle");
|
||||
Texture2D bloomTexture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
//Ajust the bloom's texture to be the same size as the star's
|
||||
float properBloomSize = (float)sparkTexture.Height / (float)bloomTexture.Height;
|
||||
Vector2 squish = Vector2.Lerp(OriginalScale, FinalScale, PiecewiseAnimation(LifetimeCompletion, new CurveSegment[] { new CurveSegment(EasingType.PolyOut, 0f, 0f, 1f, 4) }));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -39,7 +40,7 @@ namespace CalamityMod.Particles
|
||||
string texturePath = type.Namespace.Replace('.', '/') + "/" + type.Name;
|
||||
if (instance.Texture != "")
|
||||
texturePath = instance.Texture;
|
||||
particleTextures[ID] = ModContent.Request<Texture2D>(texturePath);
|
||||
particleTextures[ID] = ModContent.Request<Texture2D>(texturePath, AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +128,7 @@ namespace CalamityMod.Particles
|
||||
|
||||
if (batchedAlphaBlendParticles.Count > 0)
|
||||
{
|
||||
sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
foreach (Particle particle in batchedAlphaBlendParticles)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Particles
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Vector2 scale = new Vector2(0.35f, 1.6f) * Scale;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
|
||||
spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition + Projectile.Size * scale * 0.5f;
|
||||
Rectangle drawArea = new Rectangle(0, 0, Projectile.width, Projectile.height);
|
||||
Color fadeoutColor = new Color(new Vector4(Fadeout(pulseCompletionRatio)) * Projectile.Opacity);
|
||||
DrawData drawData = new DrawData(ModContent.Request<Texture2D>("Terraria/Misc/Perlin").Value, drawPosition, drawArea, fadeoutColor, Projectile.rotation, Projectile.Size, scale, SpriteEffects.None, 0);
|
||||
DrawData drawData = new DrawData(ModContent.Request<Texture2D>("Terraria/Images/Misc/Perlin").Value, drawPosition, drawArea, fadeoutColor, Projectile.rotation, Projectile.Size, scale, SpriteEffects.None, 0);
|
||||
|
||||
GameShaders.Misc["ForceField"].UseColor(GetCurrentExplosionColor(pulseCompletionRatio));
|
||||
GameShaders.Misc["ForceField"].Apply(drawData);
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (TelegraphDrawer is null)
|
||||
TelegraphDrawer = new PrimitiveTrail(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:Flame"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage0("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.41f);
|
||||
|
||||
for (int i = ChargePositions.Length - 2; i >= 0; i--)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (TelegraphDelay >= TelegraphTotalTime)
|
||||
return true;
|
||||
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value;
|
||||
float yScale = 2f;
|
||||
if (TelegraphDelay < TelegraphFadeTime)
|
||||
yScale = MathHelper.Lerp(0f, 2f, TelegraphDelay / 15f);
|
||||
|
||||
@@ -169,10 +169,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int drawStart = height * Projectile.frame;
|
||||
Vector2 origin = Projectile.Size / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/AresGaussNukeProjectileGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (TelegraphDrawer is null)
|
||||
TelegraphDrawer = new PrimitiveTrail(TelegraphPrimitiveWidth, TelegraphPrimitiveColor, specialShader: GameShaders.Misc["CalamityMod:Flame"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage0("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.28f);
|
||||
Vector2[] drawPositions = new Vector2[]
|
||||
{
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return false;
|
||||
}
|
||||
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value;
|
||||
|
||||
float yScale = 2f;
|
||||
if (TelegraphDelay < TelegraphFadeTime)
|
||||
|
||||
@@ -163,8 +163,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return false;
|
||||
}
|
||||
Texture2D texture2D19 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D texture2D20 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid");
|
||||
Texture2D texture2D21 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd");
|
||||
Texture2D texture2D20 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid").Value;
|
||||
Texture2D texture2D21 = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd").Value;
|
||||
float num223 = Projectile.localAI[1]; //length of laser
|
||||
Color color44 = new Color(255, 255, 255, 0) * 0.9f;
|
||||
Vector2 vector = Projectile.Center - Main.screenPosition;
|
||||
|
||||
@@ -69,21 +69,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Color color = Color.Lerp(Color.White, Color.Fuchsia, 0.5f) * Projectile.Opacity;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int drawStart = height * Projectile.frame;
|
||||
Vector2 origin = Projectile.Size / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
color = Color.Lerp(Color.White, Color.Cyan, 0.5f) * Projectile.Opacity;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow2").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 35f, targetHitbox);
|
||||
|
||||
@@ -71,21 +71,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Color color = Color.Lerp(Color.White, Color.Fuchsia, 0.5f) * Projectile.Opacity;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int drawStart = height * Projectile.frame;
|
||||
Vector2 origin = Projectile.Size / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
color = Color.Lerp(Color.White, Color.Cyan, 0.5f) * Projectile.Opacity;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow2"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow2").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 35f, targetHitbox);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
using CalamityMod.NPCs.AstrumDeus;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, null, Main.GameViewMatrix.ZoomMatrix);
|
||||
float pulseCompletionRatio = Utils.GetLerpValue(TotalRitualTime - PulseTime, TotalRitualTime, Time, true);
|
||||
Vector2 scale = Projectile.scale * (3f + pulseCompletionRatio * 5f) * new Vector2(1.5f, 1f);
|
||||
DrawData drawData = new(ModContent.Request<Texture2D>("Terraria/Misc/Perlin").Value,
|
||||
DrawData drawData = new(ModContent.Request<Texture2D>("Terraria/Images/Misc/Perlin").Value,
|
||||
Projectile.Center - Main.screenPosition + PulseSize.ToVector2() * scale * 0.5f - Vector2.UnitY * upwardness,
|
||||
new Rectangle(0, 0, PulseSize.X, PulseSize.Y),
|
||||
new Color(new Vector4(1f - (float)Math.Sqrt(pulseCompletionRatio))) * 0.66f,
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (TelegraphDelay >= TelegraphTotalTime)
|
||||
return true;
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value;
|
||||
float yScale = 2f;
|
||||
if (TelegraphDelay < TelegraphFadeTime)
|
||||
{
|
||||
|
||||
@@ -45,16 +45,16 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public override void DrawBehind(int index, List<int> drawCacheProjsBehindNPCsAndTiles, List<int> drawCacheProjsBehindNPCs, List<int> drawCacheProjsBehindProjectiles, List<int> drawCacheProjsOverWiresUI)
|
||||
public override void DrawBehind(int index, List<int> behindNPCsAndTiles, List<int> behindNPCs, List<int> behindProjectiles, List<int> overPlayers, List<int> overWiresUI)
|
||||
{
|
||||
drawCacheProjsOverWiresUI.Add(index);
|
||||
overWiresUI.Add(index);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Main.spriteBatch.EnterShaderRegion();
|
||||
|
||||
Texture2D noiseTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VoronoiShapes");
|
||||
Texture2D noiseTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VoronoiShapes").Value;
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Vector2 origin = noiseTexture.Size() * 0.5f;
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"].UseOpacity(Projectile.scale);
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (RayDrawer is null)
|
||||
RayDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:Flame"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage0("Images/Misc/Perlin");
|
||||
|
||||
Vector2[] basePoints = new Vector2[8];
|
||||
for (int i = 0; i < basePoints.Length; i++)
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
FireDrawer = new PrimitiveTrail(SunWidthFunction, SunColorFunction, null, GameShaders.Misc["CalamityMod:Flame"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseSaturation(0.45f);
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage("Images/Misc/Perlin");
|
||||
GameShaders.Misc["CalamityMod:Flame"].UseImage0("Images/Misc/Perlin");
|
||||
|
||||
List<float> rotationPoints = new List<float>();
|
||||
List<Vector2> drawPoints = new List<Vector2>();
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = (Main.dayTime && !CalamityWorld.malice) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyBlastNight").Value;
|
||||
int num214 = texture.Value.Height / Main.projFrames[Projectile.type];
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
TornadoDrawer = new PrimitiveTrail(_ => Projectile.width * 0.5f + 16f, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:Bordernado"]);
|
||||
|
||||
GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f);
|
||||
GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request<Texture2D>("Terraria/Misc/Perlin"));
|
||||
GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request<Texture2D>("Terraria/Images/Misc/Perlin").Value);
|
||||
Vector2[] drawPoints = new Vector2[5];
|
||||
Vector2 upwardAscent = Vector2.UnitY * TornadoHeight;
|
||||
Vector2 downwardOffset = Vector2.UnitY * Projectile.height / (drawPoints.Length + 1);
|
||||
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
drawPoints[drawPoints.Length - 1] = bottom;
|
||||
TornadoDrawer.Draw(drawPoints, -Main.screenPosition, 85);
|
||||
|
||||
Texture2D vortexTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/OldDukeVortex");
|
||||
Texture2D vortexTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/OldDukeVortex").Value;
|
||||
for (int i = 0; i < 110; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi * i / 50f + Main.GlobalTimeWrappedHourly * MathHelper.TwoPi;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D sparkleTexture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D sparkleTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY;
|
||||
Color sparkleColor = Main.hslToRgb(ColorSpectrumHue, 1f, 0.5f) * Projectile.Opacity * 0.5f;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = (Main.dayTime && !CalamityWorld.malice) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlastNight");
|
||||
Texture2D texture2D13 = (Main.dayTime && !CalamityWorld.malice) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
@@ -53,10 +53,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int drawStart = height * Projectile.frame;
|
||||
Vector2 origin = Projectile.Size / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
@@ -71,7 +67,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MushBombGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MushBombGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
@@ -74,11 +74,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int drawStart = height * Projectile.frame;
|
||||
Vector2 origin = Projectile.Size / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MushBombGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MushBombGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Chat;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -140,9 +141,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", new object[]
|
||||
ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", new object[]
|
||||
{
|
||||
Main.npc[boomer].GetTypeNetName()
|
||||
Main.npc[boomer].GetTypeNetName()
|
||||
}), new Color(175, 75, 255));
|
||||
return;
|
||||
}
|
||||
@@ -180,7 +181,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
bottomY--;
|
||||
Vector2 bottomVector = new Vector2(centerAsTileCoords.X, bottomY) * 16f + new Vector2(8f);
|
||||
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
float yMax = 1600f * Projectile.scale;
|
||||
for (int y = 0; y < yMax; y += 30)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -64,10 +64,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Vector2 center = new Vector2(Projectile.Center.X, Projectile.Center.Y);
|
||||
Vector2 vector11 = new Vector2(ModContent.Request<Texture2D>(Texture).Value.Width / 2, ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type] / 2);
|
||||
Vector2 vector = center - Main.screenPosition;
|
||||
vector -= new Vector2(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Width, ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Height / Main.projFrames[Projectile.type]) * 1f / 2f;
|
||||
vector -= new Vector2(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Width, ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Height / Main.projFrames[Projectile.type]) * 1f / 2f;
|
||||
vector += vector11 * 1f + new Vector2(0f, 0f + 4f + Projectile.gfxOffY);
|
||||
Color color = new Color(127 - Projectile.alpha, 127 - Projectile.alpha, 127 - Projectile.alpha, 0).MultiplyRGBA(Color.Red);
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow"), vector,
|
||||
Main.spriteBatch.Draw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value, vector,
|
||||
null, color, Projectile.rotation, vector11, Projectile.scale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,12 +46,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == 1)
|
||||
{
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Texture2D glow = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow");
|
||||
Texture2D glow = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value;
|
||||
Vector2 origin = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Projectile.type] / 2);
|
||||
Vector2 drawPos = Projectile.Center - Main.screenPosition;
|
||||
drawPos -= new Vector2(glow.Width, glow.Height / Main.projFrames[Projectile.type]) * 1f / 2f;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
@@ -85,10 +85,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SporeGasPlantera2");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SporeGasPlantera2").Value;
|
||||
break;
|
||||
case 2:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SporeGasPlantera3");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SporeGasPlantera3").Value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
if (Projectile.ai[1] == 0f)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SupremeCatastropheSlashAlt");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SupremeCatastropheSlashAlt").Value;
|
||||
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY;
|
||||
drawPosition -= Projectile.velocity.SafeNormalize(Vector2.UnitX) * 38f;
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override float MaxScale => 1f;
|
||||
public override float MaxLaserLength => 3600f;
|
||||
public override float Lifetime => 180;
|
||||
public override Color LaserOverlayColor => new Color(250, 250, 250, 100);
|
||||
public override Color LaserOverlayColor => new(250, 250, 250, 100);
|
||||
public override Color LightCastColor => Color.White;
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>(Texture).Value;
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ThanatosBeamMiddle");
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ThanatosBeamEnd");
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ThanatosBeamMiddle").Value;
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/ThanatosBeamEnd").Value;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value;
|
||||
|
||||
float verticalScale = Utils.GetLerpValue(0f, 20f, Time, true) * Utils.GetLerpValue(0f, 16f, Projectile.timeLeft, true) * 4f;
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return false;
|
||||
}
|
||||
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
|
||||
Texture2D laserTelegraph = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value;
|
||||
|
||||
float yScale = 2f;
|
||||
if (TelegraphDelay < TelegraphFadeTime)
|
||||
|
||||
@@ -72,10 +72,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
int frameHeight = texture.Height / Main.projFrames[Projectile.type];
|
||||
int frameY = frameHeight * Projectile.frame;
|
||||
Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight);
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
if (CalamityConfig.Instance.Afterimages)
|
||||
{
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
Projectile.localAI[0] = 1f;
|
||||
Main.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, Projectile.Center);
|
||||
SoundEngine.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, Projectile.Center);
|
||||
}
|
||||
|
||||
if (Projectile.ai[0] >= 2f)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Healing
|
||||
{
|
||||
@@ -26,11 +26,7 @@ namespace CalamityMod.Projectiles.Healing
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
if ((player.ActiveItem().summon &&
|
||||
!player.ActiveItem().melee &&
|
||||
!player.ActiveItem().ranged &&
|
||||
!player.ActiveItem().magic &&
|
||||
!player.ActiveItem().Calamity().rogue) ||
|
||||
if ((player.ActiveItem().DamageType == DamageClass.Summon && !player.ActiveItem().Calamity().rogue) ||
|
||||
player.ActiveItem().hammer > 0 ||
|
||||
player.ActiveItem().pick > 0 ||
|
||||
player.ActiveItem().axe > 0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -229,13 +229,13 @@ namespace CalamityMod.Projectiles.Pets
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, spriteEffects, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/BendyPetGlow");
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/BendyPetGlow").Value;
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int frameHeight = height * Projectile.frame;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
@@ -251,7 +251,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
new Color(255, 0, 255, 50), //Fuschia
|
||||
});
|
||||
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), rainbow, Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), rainbow, Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, spriteEffects, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Color color25 = Lighting.GetColor((int)(Projectile.Center.X / 16), (int)(Projectile.Center.Y / 16));
|
||||
Texture2D texture2D3 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/ChibiiDoggoMonochrome");
|
||||
Texture2D texture2D3 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/ChibiiDoggoMonochrome").Value;
|
||||
int num156 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y3 = num156 * Projectile.frame;
|
||||
Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, num156);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Color color25 = Lighting.GetColor((int)(Projectile.Center.X / 16), (int)(Projectile.Center.Y / 16));
|
||||
Texture2D texture2D3 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/ChibiiDoggoFlyMonochrome");
|
||||
Texture2D texture2D3 = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/ChibiiDoggoFlyMonochrome").Value;
|
||||
int num156 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y3 = num156 * Projectile.frame;
|
||||
Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, num156);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
for (int itemIndex = 0; itemIndex < Main.maxItems; itemIndex++)
|
||||
{
|
||||
Item item = Main.item[itemIndex];
|
||||
if (item.active && item.noGrabDelay == 0 && item.owner == Projectile.owner && ItemLoader.CanPickup(item, player))
|
||||
if (item.active && item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Projectile.owner && ItemLoader.CanPickup(item, player))
|
||||
{
|
||||
int num = defaultItemGrabRange;//Player.defaultItemGrabRange;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.item[itemIndex] = player.GetItem(Projectile.owner, item, false, false);
|
||||
Main.item[itemIndex] = player.GetItem(Projectile.owner, item, new GetItemSettings());
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncItem, -1, -1, null, itemIndex, 0f, 0f, 0f, 0, 0, 0);
|
||||
@@ -363,7 +363,8 @@ namespace CalamityMod.Projectiles.Pets
|
||||
for (int itemIndex = 0; itemIndex < Main.maxItems; itemIndex++)
|
||||
{
|
||||
Item item = Main.item[itemIndex];
|
||||
if (item.active && item.noGrabDelay == 0 && item.owner == Projectile.owner && ItemLoader.CanPickup(item, Main.player[item.owner]) && Main.player[item.owner].ItemSpace(item))
|
||||
if (item.active && item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Projectile.owner &&
|
||||
ItemLoader.CanPickup(item, Main.player[item.playerIndexTheItemIsReservedFor]) && Main.player[item.playerIndexTheItemIsReservedFor].ItemSpace(item).CanTakeItemToPersonalInventory)
|
||||
{
|
||||
if (ItemID.Sets.NebulaPickup[item.type])
|
||||
{
|
||||
@@ -467,9 +468,9 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
if (color == 1)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/SparksBlue");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/SparksBlue").Value;
|
||||
if (color == 2)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/SparksGreen");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Pets/SparksGreen").Value;
|
||||
int height = texture.Height / Main.projFrames[Projectile.type];
|
||||
int frameHeight = height * Projectile.frame;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
int damage = player.GetWeaponDamage(player.ActiveItem());
|
||||
float knockBack = player.ActiveItem().knockBack;
|
||||
|
||||
player.PickAmmo(player.ActiveItem(), ref type, ref shotSpeed, ref canFire, ref damage, ref knockBack); // Pick ammo and consume it (this incorporates the bow's chance to not consume ammo).
|
||||
player.PickAmmo(player.ActiveItem(), ref type, ref shotSpeed, ref canFire, ref damage, ref knockBack, out _); // Pick ammo and consume it (this incorporates the bow's chance to not consume ammo).
|
||||
|
||||
SoundEngine.PlaySound(player.ActiveItem().UseSound, Projectile.Center);
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override float Lifetime => 50f;
|
||||
public override Color LaserOverlayColor => Main.hslToRgb((float)Math.Sin(Main.GlobalTimeWrappedHourly * 2.3f + HueOffset) * 0.5f + 0.5f, 1f, 0.775f) * Utils.GetLerpValue(Lifetime, 0f, Time, true);
|
||||
public override Color LightCastColor => LaserOverlayColor;
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayStart");
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayMid");
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd");
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayStart").Value;
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayMid").Value;
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd").Value;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Vector2 spriteOrigin = spriteRec.Size() / 2f;
|
||||
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
Texture2D aura = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/FallenStarAura");
|
||||
Texture2D aura = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Ranged/FallenStarAura").Value;
|
||||
Vector2 drawStart = Projectile.Center + Projectile.velocity;
|
||||
Vector2 drawStart2 = Projectile.Center - Projectile.velocity * 0.5f;
|
||||
Vector2 spinPoint = new Vector2(0f, -10f);
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
color = new Color(b2, b2, b2, a2);
|
||||
}
|
||||
Rectangle frame = new Rectangle(0, 0, ModContent.Request<Texture2D>(Texture).Value.Width, ModContent.Request<Texture2D>(Texture).Value.Height);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Ammo/VanquisherArrowGlow"), Projectile.Center - Main.screenPosition, frame, color, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Ammo/VanquisherArrowGlow").Value, Projectile.Center - Main.screenPosition, frame, color, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
|
||||
@@ -57,10 +57,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int frameHeight = texture.Height / Main.projFrames[Projectile.type];
|
||||
int frameY = frameHeight * Projectile.frame;
|
||||
Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight);
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
if (CalamityConfig.Instance.Afterimages)
|
||||
{
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType<WulfrumKnife>());
|
||||
Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType<WulfrumKnife>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.velocity = Utils.NextVector2Circular(Main.rand, 18f, 9f);
|
||||
projectile.localAI[1] = 1;
|
||||
}
|
||||
if (projectile.modProjectile is ArtifactOfResilienceShard1)
|
||||
if (projectile.ModProjectile is ArtifactOfResilienceShard1)
|
||||
{
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
@@ -110,9 +110,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (projectile.frameCounter <= ArtifactOfResilienceBulwark.MaxReformations)
|
||||
{
|
||||
// Reform
|
||||
if (projectile.modProjectile is ArtifactOfResilienceShard1 && Main.myPlayer == projectile.owner)
|
||||
if (projectile.ModProjectile is ArtifactOfResilienceShard1 && Main.myPlayer == projectile.owner)
|
||||
{
|
||||
Projectile reformedBulwark = Projectile.NewProjectileDirect(projectile.Center,
|
||||
Projectile reformedBulwark = Projectile.NewProjectileDirect(projectile.GetProjectileSource_FromThis(),
|
||||
projectile.Center,
|
||||
Vector2.Zero,
|
||||
ModContent.ProjectileType<ArtifactOfResilienceBulwark>(),
|
||||
projectile.damage,
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
FlameTrailDrawer = new PrimitiveTrail(TrailWidth, TrailColor, null, GameShaders.Misc["CalamityMod:ImpFlameTrail"]);
|
||||
|
||||
// Prepare the flame trail shader with its map texture.
|
||||
GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ScarletDevilStreak"));
|
||||
GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ScarletDevilStreak").Value);
|
||||
|
||||
Texture2D texture;
|
||||
switch (Variant)
|
||||
@@ -152,19 +152,19 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
break;
|
||||
case (int)GemTechArmorGemType.Ranged:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/GreenGem");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/GreenGem").Value;
|
||||
break;
|
||||
case (int)GemTechArmorGemType.Magic:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/PurpleGem");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/PurpleGem").Value;
|
||||
break;
|
||||
case (int)GemTechArmorGemType.Summoner:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/BlueGem");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/BlueGem").Value;
|
||||
break;
|
||||
case (int)GemTechArmorGemType.Rogue:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/RedGem");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/RedGem").Value;
|
||||
break;
|
||||
case (int)GemTechArmorGemType.Base:
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/PinkGem");
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GemTechArmor/PinkGem").Value;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Vector2 origin = new Vector2(11f, 23f);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Typeless/GodKillerGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Typeless/GodKillerGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Rectangle frame = new Rectangle(0, 0, ModContent.Request<Texture2D>(Texture).Value.Width, ModContent.Request<Texture2D>(Texture).Value.Height);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Typeless/NebulaStarGlow"), Projectile.Center - Main.screenPosition, frame, Color.White * ((255 - Projectile.alpha) / 255f), Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Typeless/NebulaStarGlow").Value, Projectile.Center - Main.screenPosition, frame, Color.White * ((255 - Projectile.alpha) / 255f), Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,12 +232,12 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
GameShaders.Armor.ApplySecondary(Main.player[Projectile.owner].cBody, Main.player[Projectile.owner], new DrawData?());
|
||||
Projectile.rotation = (Projectile.Center - segment[5]).ToRotation();
|
||||
Texture2D texture2D13 = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D segmentSprite = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Chains/OmegaBlueTentacleSegment");
|
||||
Texture2D segmentSprite = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Chains/OmegaBlueTentacleSegment").Value;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(segmentSprite, segment[i] - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), segmentSprite.Bounds, Projectile.GetAlpha(lightColor), 0f, segmentSprite.Bounds.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
@@ -245,7 +245,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), texture2D13.Bounds, Projectile.GetAlpha(lightColor), Projectile.rotation, texture2D13.Bounds.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (Projectile.ai[0] >= CrystalsDrawTime)
|
||||
return true;
|
||||
float opacity = Projectile.ai[0] / CrystalsDrawTime;
|
||||
Texture2D crystalTexture = ModContent.Request<Texture2D>(Texture);
|
||||
Texture2D crystalTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
for (int i = 0; i < TotalCrystalsToDraw; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / TotalCrystalsToDraw * i + Projectile.ai[0] / 10f;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.IO;
|
||||
@@ -76,11 +76,11 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
rotation = 0f;
|
||||
}
|
||||
|
||||
Texture2D bullseyeTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/DaawnlightSpiritOriginRegularBullseye");
|
||||
Texture2D bullseyeTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/DaawnlightSpiritOriginRegularBullseye").Value;
|
||||
Rectangle frame = bullseyeTexture.Frame();
|
||||
if (Target.IsABoss())
|
||||
{
|
||||
bullseyeTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/DaawnlightSpiritOriginBossBullseye");
|
||||
bullseyeTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/DaawnlightSpiritOriginBossBullseye").Value;
|
||||
frame = bullseyeTexture.Frame(1, 4, 0, (int)(Main.GlobalTimeWrappedHourly * 7f) % 4);
|
||||
rotation = 0f;
|
||||
drawPosition.Y -= 17;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ namespace CalamityMod.Skies
|
||||
|
||||
public static bool ShouldDrawRegularly;
|
||||
|
||||
internal static Texture2D AuroraTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuroraTexture");
|
||||
internal static Texture2D AuroraTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/AuroraTexture").Value;
|
||||
|
||||
public static void UpdateDrawEligibility()
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.TileEntities
|
||||
// Also tell the server that you placed the 4x4 tiles that make up the Power Cell Factory.
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NetMessage.SendTileRange(Main.myPlayer, i, j, PowerCellFactory.Width, PowerCellFactory.Height);
|
||||
NetMessage.SendTileSquare(Main.myPlayer, i, j, PowerCellFactory.Width, PowerCellFactory.Height);
|
||||
NetMessage.SendData(MessageID.TileEntityPlacement, -1, -1, null, i, j, Type);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
|
||||
DustType = ModContent.DustType<AstralBasic>();
|
||||
|
||||
soundStyle = 1;
|
||||
SoundStyle = 1;
|
||||
SoundType = SoundID.Grass;
|
||||
|
||||
AddMapEntry(new Color(127, 111, 144));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
|
||||
DustType = ModContent.DustType<AstralBasic>();
|
||||
|
||||
soundStyle = 1;
|
||||
SoundStyle = 1;
|
||||
SoundType = SoundID.Grass;
|
||||
|
||||
AddMapEntry(new Color(127, 111, 144));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -18,7 +19,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
DustType = ModContent.DustType<AstralBasic>();
|
||||
|
||||
SoundType = SoundID.Grass;
|
||||
soundStyle = 1;
|
||||
SoundStyle = 1;
|
||||
|
||||
AddMapEntry(new Color(65, 56, 83));
|
||||
}
|
||||
@@ -28,7 +29,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
//GIVE VINE ROPE IF SPECIAL VINE BOOK
|
||||
if (WorldGen.genRand.Next(2) == 0 && Main.player[(int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16)].cordage)
|
||||
{
|
||||
Item.NewItem(new Vector2(i * 16 + 8f, j * 16 + 8f), ItemID.VineRope);
|
||||
Item.NewItem(new EntitySource_TileBreak(i, j), new Vector2(i * 16 + 8f, j * 16 + 8f), ItemID.VineRope);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.AstralSnow
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.AstralIce>();
|
||||
|
||||
SoundType = SoundID.Item;
|
||||
soundStyle = 50;
|
||||
SoundStyle = 50;
|
||||
|
||||
AddMapEntry(new Color(153, 143, 168));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Tiles.AstralSnow
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.AstralSnow>();
|
||||
|
||||
SoundType = SoundID.Item;
|
||||
soundStyle = 48;
|
||||
SoundStyle = 48;
|
||||
|
||||
AddMapEntry(new Color(189, 211, 221));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
Main.tileMerge[Type][ModContent.TileType<LaboratoryPipePlating>()] = true;
|
||||
|
||||
SoundType = SoundID.Item;
|
||||
soundStyle = 52;
|
||||
SoundStyle = 52;
|
||||
DustType = 32;
|
||||
MinPick = 30;
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.DraedonStructures.RustedPipes>();
|
||||
|
||||
@@ -11,6 +11,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Audio;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Tiles.DraedonSummoner
|
||||
{
|
||||
@@ -33,13 +34,13 @@ namespace CalamityMod.Tiles.DraedonSummoner
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
TileTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerTile");
|
||||
ComputerTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerDecryptionComputer");
|
||||
SensorTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerLongRangedSensorArray");
|
||||
DisplayTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerAdvancedDisplay");
|
||||
VoltageRegulatorTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerVoltageRegulationSystem");
|
||||
VoltageRegulatorTexture2 = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerVoltageRegulationSystem2");
|
||||
CoolingCellTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerAuricQuantumCoolingCell");
|
||||
TileTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerTile", AssetRequestMode.ImmediateLoad).Value;
|
||||
ComputerTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerDecryptionComputer", AssetRequestMode.ImmediateLoad).Value;
|
||||
SensorTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerLongRangedSensorArray", AssetRequestMode.ImmediateLoad).Value;
|
||||
DisplayTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerAdvancedDisplay", AssetRequestMode.ImmediateLoad).Value;
|
||||
VoltageRegulatorTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerVoltageRegulationSystem", AssetRequestMode.ImmediateLoad).Value;
|
||||
VoltageRegulatorTexture2 = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerVoltageRegulationSystem2", AssetRequestMode.ImmediateLoad).Value;
|
||||
CoolingCellTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/DraedonSummoner/CodebreakerAuricQuantumCoolingCell", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
|
||||
Main.tileLighted[Type] = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandelabraTileFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandelabraTileFlame").Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandleTileFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodCandleTileFlame").Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodChandelierTileFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodChandelierTileFlame").Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLampTileFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLampTileFlame").Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLanternTileFlame"), i, j);
|
||||
CalamityUtils.DrawFlameEffect(ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureAcidwood/AcidwoodLanternTileFlame").Value, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureStratus
|
||||
{
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureStratus/StratusPlatformGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureStratus/StratusPlatformGlow").Value;
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange));
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!(trackTile.IsHalfBlock && trackTile.Slope == 0))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureStratus;
|
||||
using CalamityMod.Items.Placeables.FurnitureStratus;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.FurnitureStratus
|
||||
{
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureStratus/StratusStarPlatformGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureStratus/StratusStarPlatformGlow").Value;
|
||||
Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange));
|
||||
Tile trackTile = Main.tile[i, j];
|
||||
if (!(trackTile.IsHalfBlock && trackTile.Slope == 0))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -216,7 +216,7 @@ namespace CalamityMod.Tiles.FurnitureVoid
|
||||
}
|
||||
xOffset *= 288;
|
||||
xPos += xOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureVoid/SmoothVoidstoneGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureVoid/SmoothVoidstoneGlow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero;
|
||||
Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50));
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace CalamityMod.Tiles.FurnitureVoid
|
||||
}
|
||||
yOffset *= 270;
|
||||
yPos += yOffset;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureVoid/VoidstoneSlabGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/FurnitureVoid/VoidstoneSlabGlow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero;
|
||||
Color drawColour = GetDrawColour(i, j, new Color(75, 75, 75, 75));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.LivingFire;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
@@ -35,13 +35,13 @@ namespace CalamityMod.Tiles.LivingFire
|
||||
TileObjectData.addTile(Type);
|
||||
}
|
||||
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction) => 1;
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction, int alternate) => 1;
|
||||
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction)
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction, int alternate)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NetMessage.SendTileRange(Main.myPlayer, i, j, 1, 1);
|
||||
NetMessage.SendTileSquare(Main.myPlayer, i, j, 1, 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.LivingFire;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
@@ -34,13 +34,13 @@ namespace CalamityMod.Tiles.LivingFire
|
||||
TileObjectData.addTile(Type);
|
||||
}
|
||||
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction) => 1;
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction, int alternate) => 1;
|
||||
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction)
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction, int alternate)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NetMessage.SendTileRange(Main.myPlayer, i, j, 1, 1);
|
||||
NetMessage.SendTileSquare(Main.myPlayer, i, j, 1, 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.LivingFire;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
@@ -34,13 +34,13 @@ namespace CalamityMod.Tiles.LivingFire
|
||||
TileObjectData.addTile(Type);
|
||||
}
|
||||
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction) => 1;
|
||||
public int CanPlaceAlter(int i, int j, int type, int style, int direction, int alternate) => 1;
|
||||
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction)
|
||||
public static int AfterPlacement(int i, int j, int type, int style, int direction, int alternate)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NetMessage.SendTileRange(Main.myPlayer, i, j, 1, 1);
|
||||
NetMessage.SendTileSquare(Main.myPlayer, i, j, 1, 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Tiles.Ores
|
||||
@@ -52,7 +53,7 @@ namespace CalamityMod.Tiles.Ores
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile.NewProjectile((float)(i * 16 + 16), (float)(tileLocationY * 16 + 16), 0f, 0.1f, ModContent.ProjectileType<LavaChunk>(), 25, 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(new EntitySource_WorldEvent(), (float)(i * 16 + 16), (float)(tileLocationY * 16 + 16), 0f, 0.1f, ModContent.ProjectileType<LavaChunk>(), 25, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,7 @@ namespace CalamityMod.Tiles.Ores
|
||||
{
|
||||
int xPos = Main.tile[i, j].TileFrameX;
|
||||
int yPos = Main.tile[i, j].TileFrameY;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/Ores/ChaoticOreGlow");
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/Tiles/Ores/ChaoticOreGlow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange);
|
||||
Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero;
|
||||
Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50));
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
@@ -17,10 +18,10 @@ namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ChaosplatePulse");
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ChaosplatePulse", AssetRequestMode.ImmediateLoad).Value;
|
||||
PulseColors = new Color[PulseTexture.Width];
|
||||
PulseTexture.GetData(PulseColors);
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ChaosplateGlow");
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ChaosplateGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
@@ -16,10 +17,10 @@ namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/CinderplatePulse");
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/CinderplatePulse", AssetRequestMode.ImmediateLoad).Value;
|
||||
PulseColors = new Color[PulseTexture.Width];
|
||||
PulseTexture.GetData(PulseColors);
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/CinderplateGlow");
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/CinderplateGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
@@ -16,10 +17,10 @@ namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ElumplatePulse");
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ElumplatePulse", AssetRequestMode.ImmediateLoad).Value;
|
||||
PulseColors = new Color[PulseTexture.Width];
|
||||
PulseTexture.GetData(PulseColors);
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ElumplateGlow");
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/ElumplateGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using ReLogic.Content;
|
||||
|
||||
namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
@@ -16,10 +17,10 @@ namespace CalamityMod.Tiles.Plates
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/NavyplatePulse");
|
||||
PulseTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/NavyplatePulse", AssetRequestMode.ImmediateLoad).Value;
|
||||
PulseColors = new Color[PulseTexture.Width];
|
||||
PulseTexture.GetData(PulseColors);
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/NavyplateGlow");
|
||||
GlowTexture = ModContent.Request<Texture2D>("CalamityMod/Tiles/Plates/NavyplateGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
}
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
|
||||
Loaded 100 of 112 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user