abyss stuff + crag spike tile offset fixes
was supposed to commit this earlier, oops
No files matched your search
@@ -149,41 +149,6 @@ namespace CalamityMod.ILEditing
|
||||
initialColor.BottomRightColor *= 0.4f;
|
||||
}
|
||||
|
||||
private static void SelectSunkenSeaWaterColor(int x, int y, ref VertexColors initialColor)
|
||||
{
|
||||
if (SulphuricWaterSafeZoneSystem.NearbySafeTiles.Count >= 1)
|
||||
{
|
||||
Color cleanWaterColor = new(10, 62, 193);
|
||||
Point closestSafeZone = SulphuricWaterSafeZoneSystem.NearbySafeTiles.Keys.OrderBy(t => t.ToVector2().DistanceSQ(new(x, y))).First();
|
||||
List<Vector2> points = new()
|
||||
{
|
||||
new Vector2(x - 0.5f, y - 0.5f),
|
||||
new Vector2(x + 0.5f, y - 0.5f),
|
||||
new Vector2(x - 0.5f, y + 0.5f),
|
||||
new Vector2(x + 0.5f, y + 0.5f),
|
||||
};
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float distanceToClosest = points[i].Distance(closestSafeZone.ToVector2());
|
||||
float acidicWaterInterpolant = Utils.GetLerpValue(12f, 20.5f, distanceToClosest + (1f - SulphuricWaterSafeZoneSystem.NearbySafeTiles[closestSafeZone]) * 21f, true);
|
||||
if (i == 0)
|
||||
initialColor.TopLeftColor = Color.Lerp(initialColor.TopLeftColor, cleanWaterColor, 1f - acidicWaterInterpolant);
|
||||
if (i == 1)
|
||||
initialColor.TopRightColor = Color.Lerp(initialColor.TopRightColor, cleanWaterColor, 1f - acidicWaterInterpolant);
|
||||
if (i == 2)
|
||||
initialColor.BottomLeftColor = Color.Lerp(initialColor.BottomLeftColor, cleanWaterColor, 1f - acidicWaterInterpolant);
|
||||
if (i == 3)
|
||||
initialColor.BottomRightColor = Color.Lerp(initialColor.BottomRightColor, cleanWaterColor, 1f - acidicWaterInterpolant);
|
||||
}
|
||||
}
|
||||
|
||||
initialColor.TopLeftColor *= 0.4f;
|
||||
initialColor.TopRightColor *= 0.4f;
|
||||
initialColor.BottomLeftColor *= 0.4f;
|
||||
initialColor.BottomRightColor *= 0.4f;
|
||||
}
|
||||
|
||||
public static void DumpToLog(ILContext il) => CalamityMod.Instance.Logger.Debug(il.ToString());
|
||||
public static void LogFailure(string name, string reason) => CalamityMod.Instance.Logger.Warn($"IL edit \"{name}\" failed! {reason}");
|
||||
}
|
||||
|
||||
@@ -838,7 +838,10 @@ namespace CalamityMod.ILEditing
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater").Slot)
|
||||
SelectSunkenSeaWaterColor(x, y, ref initialColor);
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater").Slot)
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
|
||||
// Apply any extra color conditions.
|
||||
initialColor = ExtraColorChangeConditions?.Invoke(initialColor, liquidType, new(x, y)) ?? initialColor;
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssKelp : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileCut[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileID.Sets.ReplaceTileBreakUp[Type] = true;
|
||||
TileID.Sets.SwaysInWindBasic[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
DustType = 2;
|
||||
HitSound = SoundID.Grass;
|
||||
|
||||
AddMapEntry(new Color(0, 60, 0));
|
||||
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = -16;
|
||||
height = 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 750 B |
@@ -0,0 +1,41 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssKelpGiant : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 6;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 5);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(0, 80, 0));
|
||||
DustType = 2;
|
||||
HitSound = SoundID.Grass;
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 0.42f;
|
||||
g = 0.35f;
|
||||
b = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,35 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssStalactite : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(5, 8, 34));
|
||||
HitSound = SoundID.Dig;
|
||||
DustType = 33;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 630 B |
@@ -0,0 +1,34 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssStalagmite : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 2);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(5, 8, 34));
|
||||
HitSound = SoundID.Dig;
|
||||
DustType = 33;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 597 B |
@@ -0,0 +1,42 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssTendril1 : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(104, 29, 29));
|
||||
HitSound = SoundID.Tink;
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 0.2f;
|
||||
g = 0f;
|
||||
b = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
public class AbyssTendril2 : AbyssTendril1
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 531 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class AbyssWeeds : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileCut[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileID.Sets.ReplaceTileBreakUp[Type] = true;
|
||||
TileID.Sets.SwaysInWindBasic[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
DustType = 33;
|
||||
HitSound = SoundID.Grass;
|
||||
|
||||
AddMapEntry(new Color(5, 8, 34));
|
||||
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = -16;
|
||||
height = 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 789 B |
@@ -0,0 +1,41 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class VoidBulbTree : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 3;
|
||||
TileObjectData.newTile.Height = 4;
|
||||
TileObjectData.newTile.Origin = new Point16(2, 3);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(59, 72, 168));
|
||||
DustType = 33;
|
||||
HitSound = SoundID.Dig;
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 0.15f;
|
||||
g = 0.3f;
|
||||
b = 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,35 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class VoidStalactite : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(2, 2, 2));
|
||||
HitSound = SoundID.Dig;
|
||||
DustType = 33;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 657 B |
@@ -0,0 +1,34 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.Audio;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class VoidStalagmite : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(1, 2);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(2, 2, 2));
|
||||
HitSound = SoundID.Dig;
|
||||
DustType = 33;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 657 B |
@@ -0,0 +1,43 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class VoidTendril1 : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
TileObjectData.newTile.StyleWrapLimit = 36;
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(59, 72, 168));
|
||||
DustType = 33;
|
||||
HitSound = SoundID.Dig;
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 0.00f;
|
||||
g = 0.05f;
|
||||
b = 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
public class VoidTendril2 : VoidTendril1
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 633 B |
|
After Width: | Height: | Size: 531 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class VoidWeeds : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileCut[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileID.Sets.ReplaceTileBreakUp[Type] = true;
|
||||
TileID.Sets.SwaysInWindBasic[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
DustType = 33;
|
||||
HitSound = SoundID.Grass;
|
||||
|
||||
AddMapEntry(new Color(2, 2, 2));
|
||||
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = -16;
|
||||
height = 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 858 B |
@@ -1,4 +1,4 @@
|
||||
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -31,6 +31,26 @@ namespace CalamityMod.Tiles.Abyss
|
||||
DustType = 33;
|
||||
}
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
if (WorldGen.genRand.Next(5) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssWeeds>();
|
||||
up.HasTile = true;
|
||||
up.TileFrameY = 0;
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(4) * 18);
|
||||
WorldGen.SquareTileFrame(i, j - 1, true);
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanExplode(int i, int j)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Walls;
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Walls;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -49,6 +50,23 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
if (WorldGen.genRand.Next(2) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssKelp>();
|
||||
up.HasTile = true;
|
||||
up.TileFrameY = 0;
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(4) * 18);
|
||||
WorldGen.SquareTileFrame(i, j - 1, true);
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
|
||||
int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143));
|
||||
if (Main.tile[i, j + 1] != null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
@@ -30,6 +30,27 @@ namespace CalamityMod.Tiles.Abyss
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.Voidstone>();
|
||||
AddMapEntry(new Color(15, 15, 15));
|
||||
}
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
if (WorldGen.genRand.Next(5) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<VoidWeeds>();
|
||||
up.HasTile = true;
|
||||
up.TileFrameY = 0;
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(4) * 18);
|
||||
WorldGen.SquareTileFrame(i, j - 1, true);
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int animationFrameWidth = 288;
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using CalamityMod.Tiles.AstralDesert;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
@@ -46,7 +47,10 @@ namespace CalamityMod.Tiles
|
||||
TileID.CrimsonPlants,
|
||||
(ushort)ModContent.TileType<AstralShortPlants>(),
|
||||
(ushort)ModContent.TileType<AstralTallPlants>(),
|
||||
(ushort)ModContent.TileType<CinderBlossomTallPlants>()
|
||||
(ushort)ModContent.TileType<CinderBlossomTallPlants>(),
|
||||
(ushort)ModContent.TileType<AbyssWeeds>(),
|
||||
(ushort)ModContent.TileType<AbyssKelp>(),
|
||||
(ushort)ModContent.TileType<VoidWeeds>()
|
||||
};
|
||||
|
||||
public static List<int> GrowthTiles = new List<int>()
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace CalamityMod.Tiles.Crags
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 5;
|
||||
@@ -26,7 +25,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.newTile.DrawYOffset = -3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -49,7 +48,6 @@ namespace CalamityMod.Tiles.Crags
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 4;
|
||||
@@ -60,7 +58,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.newTile.DrawYOffset = -3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -79,7 +77,6 @@ namespace CalamityMod.Tiles.Crags
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 2;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
@@ -90,7 +87,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.newTile.DrawYOffset = -3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -113,7 +110,6 @@ namespace CalamityMod.Tiles.Crags
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.Origin = new Point16(1, 1);
|
||||
@@ -122,7 +118,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = default(AnchorData);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = -2;
|
||||
TileObjectData.newTile.DrawYOffset = -3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
@@ -114,7 +114,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.DrawYOffset = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(43, 23, 46));
|
||||
HitSound = SoundID.Tink;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using CalamityMod.Tiles.AstralDesert;
|
||||
using CalamityMod.Tiles.AstralSnow;
|
||||
@@ -62,6 +63,9 @@ namespace CalamityMod
|
||||
PlantCheckAgainst[ModContent.TileType<AstralShortPlants>()] = new int[1] { ModContent.TileType<AstralGrass>() };
|
||||
PlantCheckAgainst[ModContent.TileType<AstralTallPlants>()] = new int[1] { ModContent.TileType<AstralGrass>() };
|
||||
PlantCheckAgainst[ModContent.TileType<CinderBlossomTallPlants>()] = new int[1] { ModContent.TileType<ScorchedRemainsGrass>() };
|
||||
PlantCheckAgainst[ModContent.TileType<AbyssWeeds>()] = new int[1] { ModContent.TileType<AbyssGravel>() };
|
||||
PlantCheckAgainst[ModContent.TileType<AbyssKelp>()] = new int[1] { ModContent.TileType<PlantyMush>() };
|
||||
PlantCheckAgainst[ModContent.TileType<VoidWeeds>()] = new int[1] { ModContent.TileType<Voidstone>() };
|
||||
|
||||
VineToGrass = new Dictionary<ushort, ushort>
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Tiles.FurnitureVoid;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.Walls;
|
||||
@@ -316,6 +317,68 @@ namespace CalamityMod.World
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
{
|
||||
//abyss gravel ambient stuff
|
||||
if (Main.tile[abyssIndex, abyssIndex2].TileType == ModContent.TileType<AbyssGravel>())
|
||||
{
|
||||
//planty mush kelp
|
||||
if (WorldGen.genRand.Next(150) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssKelpGiant>());
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 2, ModContent.TileType<AbyssKelpGiant>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(15) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssStalactite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(20) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<AbyssStalagmite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(17) == 0)
|
||||
{
|
||||
ushort[] Tendrils = new ushort[] { (ushort)ModContent.TileType<AbyssTendril1>(), (ushort)ModContent.TileType<AbyssTendril2>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, WorldGen.genRand.Next(Tendrils));
|
||||
}
|
||||
}
|
||||
|
||||
//voidstone ambient stuff
|
||||
if (Main.tile[abyssIndex, abyssIndex2].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
//planty mush kelp
|
||||
if (WorldGen.genRand.Next(150) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssKelpGiant>());
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 2, ModContent.TileType<AbyssKelpGiant>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(15) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<VoidStalactite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(20) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<VoidStalagmite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(17) == 0)
|
||||
{
|
||||
ushort[] Tendrils = new ushort[] { (ushort)ModContent.TileType<VoidTendril1>(), (ushort)ModContent.TileType<VoidTendril2>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, WorldGen.genRand.Next(Tendrils));
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(30) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<VoidBulbTree>());
|
||||
}
|
||||
}
|
||||
|
||||
//pots
|
||||
if (!Main.tile[abyssIndex, abyssIndex2].HasTile)
|
||||
{
|
||||
if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) &&
|
||||
@@ -346,6 +409,68 @@ namespace CalamityMod.World
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
{
|
||||
//abyss gravel ambient stuff
|
||||
if (Main.tile[abyssIndex, abyssIndex2].TileType == ModContent.TileType<AbyssGravel>())
|
||||
{
|
||||
//planty mush kelp
|
||||
if (WorldGen.genRand.Next(150) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssKelpGiant>());
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 2, ModContent.TileType<AbyssKelpGiant>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(15) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssStalactite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(20) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<AbyssStalagmite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(17) == 0)
|
||||
{
|
||||
ushort[] Tendrils = new ushort[] { (ushort)ModContent.TileType<AbyssTendril1>(), (ushort)ModContent.TileType<AbyssTendril2>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, WorldGen.genRand.Next(Tendrils));
|
||||
}
|
||||
}
|
||||
|
||||
//voidstone ambient stuff
|
||||
if (Main.tile[abyssIndex, abyssIndex2].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
//planty mush kelp
|
||||
if (WorldGen.genRand.Next(150) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<AbyssKelpGiant>());
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 2, ModContent.TileType<AbyssKelpGiant>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(15) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 + 1, ModContent.TileType<VoidStalactite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(20) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<VoidStalagmite>());
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(17) == 0)
|
||||
{
|
||||
ushort[] Tendrils = new ushort[] { (ushort)ModContent.TileType<VoidTendril1>(), (ushort)ModContent.TileType<VoidTendril2>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, WorldGen.genRand.Next(Tendrils));
|
||||
}
|
||||
|
||||
if (WorldGen.genRand.Next(30) == 0)
|
||||
{
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2 - 1, ModContent.TileType<VoidBulbTree>());
|
||||
}
|
||||
}
|
||||
|
||||
//pots
|
||||
if (!Main.tile[abyssIndex, abyssIndex2].HasTile)
|
||||
{
|
||||
if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) &&
|
||||
|
||||
@@ -454,9 +454,26 @@ namespace CalamityMod.World
|
||||
|
||||
// WorldGen.gen prevents NewItem from working, and thus prevents a bunch of dumb items from being spawned immediately and deleting the WoF/Aureus loot in the process.
|
||||
WorldGen.gen = true;
|
||||
bool _ = true;
|
||||
int xOffset = WorldGen.dungeonX < Main.maxTilesX / 2 ? -50 : 50;
|
||||
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.AstralBeaconKey, new Point(i + xOffset, (int)height), SchematicAnchor.TopCenter, ref _);
|
||||
bool place = true;
|
||||
int xOffset = WorldGen.dungeonX < Main.maxTilesX / 2 ? WorldGen.genRand.Next(-65, -25) : WorldGen.genRand.Next(25, 65);
|
||||
|
||||
bool altarPlaced = false;
|
||||
int altarAttempts = 0;
|
||||
int altarY = (int)height;
|
||||
while (!altarPlaced && altarAttempts++ < 100000)
|
||||
{
|
||||
while (!WorldGen.SolidTile(xOffset, altarY) && altarY <= Main.worldSurface)
|
||||
{
|
||||
altarY++;
|
||||
}
|
||||
|
||||
if (Main.tile[xOffset, altarY].HasTile || Main.tile[xOffset, altarY].WallType > 0)
|
||||
{
|
||||
altarPlaced = true;
|
||||
}
|
||||
}
|
||||
|
||||
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.AstralBeaconKey, new Point(i + xOffset, altarY), SchematicAnchor.TopCenter, ref place);
|
||||
WorldGen.gen = false;
|
||||
}
|
||||
}
|
||||
@@ -480,7 +497,7 @@ namespace CalamityMod.World
|
||||
int verticalRadius = (int)(constant / 16f);
|
||||
|
||||
Vector2 fociOffset = Vector2.UnitY * fociSpacing;
|
||||
Vector2 topFoci = center - new Vector2(0, -100) - fociOffset;
|
||||
Vector2 topFoci = center - fociOffset;
|
||||
Vector2 bottomFoci = center + fociOffset;
|
||||
|
||||
UnifiedRandom rand = WorldGen.genRand;
|
||||
@@ -1238,7 +1255,7 @@ namespace CalamityMod.World
|
||||
if (collapse) //Collapse ensures the ellipse is shrunk down a lot in terms of distance.
|
||||
{
|
||||
float distY = center.Y - point.Y;
|
||||
point.Y -= distY * 8f;
|
||||
point.Y -= distY * 4f;
|
||||
}
|
||||
float distance1 = Vector2.Distance(point, focus1);
|
||||
float distance2 = Vector2.Distance(point, focus2);
|
||||
|
||||
@@ -218,11 +218,11 @@ namespace CalamityMod.World
|
||||
Tile tileLeft = Main.tile[x - 1, y];
|
||||
Tile tileRight = Main.tile[x + 1, y];
|
||||
|
||||
if (WorldGen.genRand.Next(10) == 0 && tile.TileType == ModContent.TileType<BrimstoneSlag>() && (tileUp.LiquidAmount > 0 ||
|
||||
if (tile.TileType == ModContent.TileType<BrimstoneSlag>() && (tileUp.LiquidAmount > 0 ||
|
||||
tileDown.LiquidAmount > 0 || tileLeft.LiquidAmount > 0 || tileRight.LiquidAmount > 0))
|
||||
{
|
||||
WorldGen.TileRunner(x + WorldGen.genRand.Next(-15, 15), y + WorldGen.genRand.Next(-15, 15),
|
||||
WorldGen.genRand.Next(8, 22), WorldGen.genRand.Next(8, 22), ModContent.TileType<CharredOre>(), false, 0f, 0f, false, true);
|
||||
WorldGen.genRand.Next(8, 12), WorldGen.genRand.Next(8, 12), ModContent.TileType<CharredOre>(), false, 0f, 0f, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||