Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
ea9c04f540
10 files changed
+89
-2
No files matched your search
@@ -11,7 +11,6 @@ using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -19,6 +18,8 @@ using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.VanillaProjectileOverrides;
|
||||
using CalamityMod.Tiles.FurnitureAuric;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -2855,6 +2856,74 @@ namespace CalamityMod.Projectiles
|
||||
projectile.velocity *= ((Main.masterMode || BossRushEvent.BossRushActive) ? 1.017078f : 1.015525f);
|
||||
}
|
||||
|
||||
// Golf Balls go nyoom on touching Auric Ore/Repulsers
|
||||
if (ProjectileID.Sets.IsAGolfBall[projectile.type])
|
||||
{
|
||||
int auricOreID = TileType<AuricOre>();
|
||||
int auricRepulserID = TileType<AuricRepulserPanelTile>();
|
||||
// Get a list of tiles that are colliding with the ball.
|
||||
// This is just Collision.GetEntityTiles but with a larger detection square because golf balls are too small and dumb to get detected half the time apparently
|
||||
List<Point> EdgeTiles = new List<Point>();
|
||||
int extraDist = 8;
|
||||
int left = (int)projectile.position.X - extraDist;
|
||||
int up = (int)projectile.position.Y - extraDist;
|
||||
int right = (int)projectile.Right.X + extraDist;
|
||||
int down = (int)projectile.Bottom.Y + extraDist;
|
||||
if (left % 16 == 0)
|
||||
{
|
||||
left--;
|
||||
}
|
||||
|
||||
if (up % 16 == 0)
|
||||
{
|
||||
up--;
|
||||
}
|
||||
|
||||
if (right % 16 == 0)
|
||||
{
|
||||
right++;
|
||||
}
|
||||
|
||||
if (down % 16 == 0)
|
||||
{
|
||||
down++;
|
||||
}
|
||||
|
||||
int width = right / 16 - left / 16;
|
||||
int height = down / 16 - up / 16;
|
||||
left /= 16;
|
||||
up /= 16;
|
||||
for (int i = left; i <= left + width; i++)
|
||||
{
|
||||
EdgeTiles.Add(new Point(i, up));
|
||||
EdgeTiles.Add(new Point(i, up + height));
|
||||
}
|
||||
|
||||
for (int j = up; j < up + height; j++)
|
||||
{
|
||||
EdgeTiles.Add(new Point(left, j));
|
||||
EdgeTiles.Add(new Point(left + width, j));
|
||||
}
|
||||
foreach (Point touchedTile in EdgeTiles)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(touchedTile);
|
||||
if (!tile.HasTile || !tile.HasUnactuatedTile)
|
||||
continue;
|
||||
if (tile.TileType == auricOreID || tile.TileType == auricRepulserID)
|
||||
{
|
||||
// Force Auric Ore to animate with its crackling electricity
|
||||
if (tile.TileType == auricOreID)
|
||||
{
|
||||
AuricOre.Animate = true;
|
||||
}
|
||||
|
||||
var yeetVec = Vector2.Normalize(projectile.Center - touchedTile.ToWorldCoordinates());
|
||||
projectile.velocity += yeetVec * 40f;
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1") with { Pitch = 0.4f });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.type == ProjectileID.OrnamentFriendly && lineColor == 1) //spawned by Festive Wings
|
||||
{
|
||||
Vector2 center = projectile.Center;
|
||||
|
||||
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -25,6 +26,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Organic"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeWithAbyss(Type);
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -25,6 +26,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Sand"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeWithAbyss(Type);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Main.tileBlockLight[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
AddMapEntry(new Color(0, 50, 0));
|
||||
HitSound = SoundID.Grass;
|
||||
DustType = 2;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -18,6 +19,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Sand"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeAstralTiles(Type);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -13,6 +14,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["PinkSlime"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeDecorativeTiles(Type);
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
@@ -31,6 +32,8 @@ namespace CalamityMod.Tiles
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
|
||||
// Various data sets to protect this tile from premature death
|
||||
TileID.Sets.PreventsTileRemovalIfOnTopOfIt[Type] = true;
|
||||
TileID.Sets.PreventsTileReplaceIfOnTopOfIt[Type] = true;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -18,6 +19,7 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Sand"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeWithDesert(Type); // Tile blends with sandstone, which it is set to merge with here
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -22,6 +23,7 @@ namespace CalamityMod.Tiles
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileMergeDirt[Type] = false;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Organic"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeDecorativeTiles(Type);
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -18,6 +19,7 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Organic"]);
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
|
||||
|
||||
Reference in new issue
Block a user