abyss changes
-new water colors for each layer -new sulphuric depths (basically the actual first layer of the abyss) -added lord metarex's bestiary icons for each layer -modified each abyss biome to check for the exact heights each layer begins at -a few other smaller fixes
No files matched your search
|
Before Width: | Height: | Size: 510 B |
@@ -16,18 +16,18 @@ namespace CalamityMod.BiomeManagers
|
||||
int y = Main.maxTilesY;
|
||||
int genLimit = x / 2;
|
||||
int abyssChasmY = y - 250;
|
||||
int abyssChasmX = Abyss.AtLeftSideOfWorld ? genLimit - (genLimit - 135) : genLimit + (genLimit - 135);
|
||||
int abyssChasmX = Abyss.AtLeftSideOfWorld ? genLimit - (genLimit - 135) + 35 : genLimit + (genLimit - 135) - 35;
|
||||
|
||||
bool abyssPosX = false;
|
||||
bool abyssPosY = point.Y <= abyssChasmY;
|
||||
bool abyssPosY = point.Y >= (Main.rockLayer - Main.maxTilesY / 13);
|
||||
if (Abyss.AtLeftSideOfWorld)
|
||||
{
|
||||
if (point.X < abyssChasmX + 80)
|
||||
if (point.X < abyssChasmX + 125)
|
||||
abyssPosX = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (point.X > abyssChasmX - 80)
|
||||
if (point.X > abyssChasmX - 125)
|
||||
abyssPosX = true;
|
||||
}
|
||||
|
||||
@@ -36,16 +36,13 @@ namespace CalamityMod.BiomeManagers
|
||||
if (WeakReferenceSupport.InAnySubworld())
|
||||
return false;
|
||||
|
||||
return point.Y > SulphurousSea.YStart + SulphurousSea.BlockDepth - 78 &&
|
||||
!player.lavaWet &&
|
||||
!player.honeyWet &&
|
||||
abyssPosY &&
|
||||
abyssPosX;
|
||||
return !player.lavaWet && !player.honeyWet && abyssPosY && abyssPosX;
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
|
||||
//temporarily use sulphur for now
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricDepthsWater");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer1Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
@@ -61,13 +58,14 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyss: First Layer");
|
||||
DisplayName.SetDefault("Sulphuric Depths");
|
||||
}
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
|
||||
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.03);
|
||||
playerYTileCoords >= Main.rockLayer - Main.maxTilesY / 15 &&
|
||||
playerYTileCoords <= Main.rockLayer - 22;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 381 B |
@@ -17,22 +17,22 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/UpperAbyssWater");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer2Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyss: Second Layer");
|
||||
DisplayName.SetDefault("Upper Abyss");
|
||||
}
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
|
||||
playerYTileCoords > (Main.rockLayer + Main.maxTilesY * 0.03) &&
|
||||
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.14);
|
||||
playerYTileCoords > Main.rockLayer - 22 &&
|
||||
playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.145;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 498 B |
@@ -17,22 +17,22 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/MiddleAbyssWater");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer3Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyss: Third Layer");
|
||||
DisplayName.SetDefault("Lower Abyss");
|
||||
}
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
|
||||
playerYTileCoords > (Main.rockLayer + Main.maxTilesY * 0.14) &&
|
||||
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.26);
|
||||
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.145 &&
|
||||
playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.262;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 477 B |
@@ -17,21 +17,21 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/VoidWater");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer4Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyss: Fourth Layer");
|
||||
DisplayName.SetDefault("The Void");
|
||||
}
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
|
||||
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.26;
|
||||
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.262;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 375 B |
@@ -834,14 +834,16 @@ namespace CalamityMod.ILEditing
|
||||
initialColor.TopRightColor = SelectLavaColor(initialTexture, initialColor.TopRightColor, liquidType == 1);
|
||||
initialColor.BottomLeftColor = SelectLavaColor(initialTexture, initialColor.BottomLeftColor, liquidType == 1);
|
||||
initialColor.BottomRightColor = SelectLavaColor(initialTexture, initialColor.BottomRightColor, liquidType == 1);
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater").Slot)
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater").Slot)
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater").Slot)
|
||||
if (liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater").Slot ||
|
||||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater").Slot ||
|
||||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricDepthsWater").Slot ||
|
||||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/UpperAbyssWater").Slot ||
|
||||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/MiddleAbyssWater").Slot ||
|
||||
liquidType == ModContent.Find<ModWaterStyle>("CalamityMod/VoidWater").Slot)
|
||||
{
|
||||
SelectSulphuricWaterColor(x, y, ref initialColor);
|
||||
}
|
||||
|
||||
// Apply any extra color conditions.
|
||||
initialColor = ExtraColorChangeConditions?.Invoke(initialColor, liquidType, new(x, y)) ?? initialColor;
|
||||
@@ -967,8 +969,7 @@ namespace CalamityMod.ILEditing
|
||||
orig(self, x, y, out outputColor);
|
||||
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(x, y);
|
||||
if (tile.LiquidAmount <= 0 || tile.HasTile || Main.waterStyle != ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater").Slot &&
|
||||
Main.waterStyle != ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater").Slot)
|
||||
if (tile.LiquidAmount <= 0 || tile.HasTile || Main.waterStyle != ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater").Slot)
|
||||
return;
|
||||
|
||||
Tile above = CalamityUtils.ParanoidTileRetrieval(x, y - 1);
|
||||
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Toxic Cloud");
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
Main.projFrames[Projectile.type] = 10;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
//place kelp
|
||||
if (WorldGen.genRand.Next(8) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
if (WorldGen.genRand.Next(8) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssKelp>();
|
||||
up.HasTile = true;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
//place kelp
|
||||
if (WorldGen.genRand.Next(5) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
if (WorldGen.genRand.Next(5) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssKelp>();
|
||||
up.HasTile = true;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
//place kelp
|
||||
if (WorldGen.genRand.Next(25) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
if (WorldGen.genRand.Next(25) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssKelp>();
|
||||
up.HasTile = true;
|
||||
|
||||
|
After Width: | Height: | Size: 875 B |
|
After Width: | Height: | Size: 349 B |
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class MiddleAbyssWater : ModWaterStyle
|
||||
{
|
||||
public override int ChooseWaterfallStyle()
|
||||
{
|
||||
return ModContent.Find<ModWaterfallStyle>("CalamityMod/MiddleAbyssWaterflow").Slot;
|
||||
}
|
||||
|
||||
public override int GetSplashDust()
|
||||
{
|
||||
return 33;
|
||||
}
|
||||
|
||||
public override int GetDropletGore()
|
||||
{
|
||||
return 713;
|
||||
}
|
||||
|
||||
public override Color BiomeHairColor()
|
||||
{
|
||||
return Color.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 347 B |
@@ -0,0 +1,8 @@
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class MiddleAbyssWaterflow : ModWaterfallStyle
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 886 B |
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class SulphuricDepthsWater : ModWaterStyle
|
||||
{
|
||||
public override int ChooseWaterfallStyle()
|
||||
{
|
||||
return ModContent.Find<ModWaterfallStyle>("CalamityMod/SulphuricDepthsWaterflow").Slot;
|
||||
}
|
||||
|
||||
public override int GetSplashDust()
|
||||
{
|
||||
return 33;
|
||||
}
|
||||
|
||||
public override int GetDropletGore()
|
||||
{
|
||||
return 713;
|
||||
}
|
||||
|
||||
public override Color BiomeHairColor()
|
||||
{
|
||||
return Color.Teal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 344 B |
@@ -0,0 +1,8 @@
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class SulphuricDepthsWaterflow : ModWaterfallStyle
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 884 B |
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class UpperAbyssWater : ModWaterStyle
|
||||
{
|
||||
public override int ChooseWaterfallStyle()
|
||||
{
|
||||
return ModContent.Find<ModWaterfallStyle>("CalamityMod/UpperAbyssWaterflow").Slot;
|
||||
}
|
||||
|
||||
public override int GetSplashDust()
|
||||
{
|
||||
return 33;
|
||||
}
|
||||
|
||||
public override int GetDropletGore()
|
||||
{
|
||||
return 713;
|
||||
}
|
||||
|
||||
public override Color BiomeHairColor()
|
||||
{
|
||||
return Color.Blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 345 B |
@@ -0,0 +1,8 @@
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class UpperAbyssWaterflow : ModWaterfallStyle
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 885 B |
@@ -3,11 +3,11 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class AbyssWater : ModWaterStyle
|
||||
public class VoidWater : ModWaterStyle
|
||||
{
|
||||
public override int ChooseWaterfallStyle()
|
||||
{
|
||||
return ModContent.Find<ModWaterfallStyle>("CalamityMod/AbyssWaterflow").Slot;
|
||||
return ModContent.Find<ModWaterfallStyle>("CalamityMod/VoidWaterflow").Slot;
|
||||
}
|
||||
|
||||
public override int GetSplashDust()
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 621 B |
@@ -1,7 +1,7 @@
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Waters
|
||||
{
|
||||
public class AbyssWaterflow : ModWaterfallStyle
|
||||
public class VoidWaterflow : ModWaterfallStyle
|
||||
{
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -40,7 +40,7 @@ namespace CalamityMod.World
|
||||
|
||||
int abyssChasmY = y - 250; //Underworld = y - 200
|
||||
AbyssChasmBottom = abyssChasmY - 100; //850 small 1450 medium 2050 large
|
||||
int abyssChasmX = AtLeftSideOfWorld ? genLimit - (genLimit - 135) : genLimit + (genLimit - 135); //2100 - 1965 = 135 : 2100 + 1965 = 4065
|
||||
int abyssChasmX = AtLeftSideOfWorld ? genLimit - (genLimit - 135) + 35 : genLimit + (genLimit - 135) - 35; //2100 - 1965 = 135 : 2100 + 1965 = 4065
|
||||
|
||||
bool plantyMushSide = true;
|
||||
|
||||
@@ -49,240 +49,177 @@ namespace CalamityMod.World
|
||||
plantyMushSide = false;
|
||||
}
|
||||
|
||||
if (AtLeftSideOfWorld)
|
||||
int abyssMinX = AtLeftSideOfWorld ? 0 : abyssChasmX - 130;
|
||||
int abyssMaxX = AtLeftSideOfWorld ? abyssChasmX + 130 : x;
|
||||
|
||||
for (int abyssIndex = abyssMinX; abyssIndex < abyssMaxX; abyssIndex++)
|
||||
{
|
||||
for (int abyssIndex = 0; abyssIndex < abyssChasmX + 80; abyssIndex++) //235
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY + 50; abyssIndex2++)
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
Tile tile = Framing.GetTileSafely(abyssIndex, abyssIndex2);
|
||||
|
||||
if (tile.LiquidType == LiquidID.Lava && tile.LiquidAmount > 0)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(abyssIndex, abyssIndex2);
|
||||
|
||||
if (tile.LiquidType == LiquidID.Lava && tile.LiquidAmount > 0)
|
||||
{
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
bool canConvert = tile.HasTile && tile.TileType < TileID.Count && tile.TileType != TileID.DyePlants && tile.TileType != TileID.Trees &&
|
||||
tile.TileType != TileID.PalmTree && tile.TileType != TileID.Sand && tile.TileType != TileID.Containers && tile.TileType != TileID.Coral &&
|
||||
tile.TileType != TileID.BeachPiles && tile.TileType != ModContent.TileType<SulphurousSand>() && tile.TileType != ModContent.TileType<SulphurousSandstone>();
|
||||
|
||||
if (abyssIndex2 > rockLayer - WorldGen.genRand.Next(30))
|
||||
{
|
||||
//dithering on the edge of the abyss
|
||||
if (abyssIndex > abyssChasmX + 75)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (canConvert)
|
||||
{
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
}
|
||||
else if (!tile.HasTile)
|
||||
{
|
||||
tile.Get<TileWallWireStateData>().HasTile = true;
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int abyssIndex = abyssChasmX - 80; abyssIndex < x; abyssIndex++) //3965
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
|
||||
bool canConvert = tile.HasTile && tile.TileType < TileID.Count && tile.TileType != TileID.DyePlants && tile.TileType != TileID.Trees &&
|
||||
tile.TileType != TileID.PalmTree && tile.TileType != TileID.Sand && tile.TileType != TileID.Containers && tile.TileType != TileID.Coral &&
|
||||
tile.TileType != TileID.BeachPiles && tile.TileType != ModContent.TileType<SulphurousSandstone>();
|
||||
|
||||
if (abyssIndex2 > (rockLayer - Main.maxTilesY / 15) - WorldGen.genRand.Next(30))
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(abyssIndex, abyssIndex2);
|
||||
|
||||
if (tile.LiquidType == LiquidID.Lava && tile.LiquidAmount > 0)
|
||||
//dithering on the edge of the abyss
|
||||
if ((AtLeftSideOfWorld && abyssIndex > abyssChasmX + 125) || (!AtLeftSideOfWorld && abyssIndex < abyssChasmX - 125))
|
||||
{
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
bool canConvert = tile.HasTile && tile.TileType < TileID.Count && tile.TileType != TileID.DyePlants && tile.TileType != TileID.Trees &&
|
||||
tile.TileType != TileID.PalmTree && tile.TileType != TileID.Sand && tile.TileType != TileID.Containers && tile.TileType != TileID.Coral &&
|
||||
tile.TileType != TileID.BeachPiles && tile.TileType != ModContent.TileType<SulphurousSand>() && tile.TileType != ModContent.TileType<SulphurousSandstone>();
|
||||
|
||||
if (abyssIndex2 > rockLayer - WorldGen.genRand.Next(30))
|
||||
{
|
||||
//dithering on the edge of the abyss
|
||||
if (abyssIndex < abyssChasmX - 75)
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<Voidstone>());
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (canConvert)
|
||||
else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer - 10)
|
||||
{
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<SulphurousShale>());
|
||||
}
|
||||
}
|
||||
else if (!tile.HasTile)
|
||||
else if (abyssIndex2 <= rockLayer - 20)
|
||||
{
|
||||
tile.Get<TileWallWireStateData>().HasTile = true;
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<SulphurousShale>());
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (canConvert)
|
||||
{
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType<AbyssGravel>());
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType<SulphurousShale>());
|
||||
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
|
||||
}
|
||||
}
|
||||
else if (abyssIndex2 <= rockLayer - 20)
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
}
|
||||
else if (!tile.HasTile)
|
||||
{
|
||||
tile.Get<TileWallWireStateData>().HasTile = true;
|
||||
if (abyssIndex2 > (rockLayer + y * 0.262))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 > (rockLayer + y * 0.145))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<Voidstone>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
}
|
||||
|
||||
tile.WallType = (ushort)ModContent.WallType<VoidstoneWallUnsafe>();
|
||||
}
|
||||
else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType<AbyssGravel>());
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType<SulphurousShale>());
|
||||
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
|
||||
}
|
||||
}
|
||||
else if (abyssIndex2 <= rockLayer - 20)
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
tile.WallType = (ushort)ModContent.WallType<SulphurousShaleWall>();
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<AbyssGravel>();
|
||||
tile.WallType = (ushort)ModContent.WallType<AbyssGravelWall>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,7 +227,10 @@ namespace CalamityMod.World
|
||||
}
|
||||
}
|
||||
|
||||
MiscWorldgenRoutines.ChasmGenerator(abyssChasmX, (int)WorldGen.worldSurfaceLow, AbyssChasmBottom, true);
|
||||
//just place three craters next to each other to make it wider
|
||||
MiscWorldgenRoutines.ChasmGenerator(abyssChasmX + 25, (int)WorldGen.worldSurfaceLow, AbyssChasmBottom, true);
|
||||
MiscWorldgenRoutines.ChasmGenerator(abyssChasmX, (int)WorldGen.worldSurfaceLow + 65, AbyssChasmBottom, true);
|
||||
MiscWorldgenRoutines.ChasmGenerator(abyssChasmX - 25, (int)WorldGen.worldSurfaceLow, AbyssChasmBottom, true);
|
||||
|
||||
int maxAbyssIslands = 11; //Small World
|
||||
|
||||
@@ -308,8 +248,8 @@ namespace CalamityMod.World
|
||||
bool placedFossil = false;
|
||||
|
||||
//place islands to hide the fossil (funny)
|
||||
AbyssIsland(abyssChasmX + 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX - 32, AbyssChasmBottom + 25, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX + 55, AbyssChasmBottom + 25, 55, 75, 55, 75, false, true, true, false);
|
||||
AbyssIsland(abyssChasmX - 55, AbyssChasmBottom + 25, 55, 75, 55, 75, false, true, true, false);
|
||||
|
||||
while (!placedFossil)
|
||||
{
|
||||
@@ -350,12 +290,42 @@ namespace CalamityMod.World
|
||||
}
|
||||
|
||||
//place a single abyss island under the terminus shrine
|
||||
AbyssIsland(abyssChasmX, AbyssChasmBottom + 5, 65, 75, 40, 45, false, false, true);
|
||||
AbyssIsland(abyssChasmX, AbyssChasmBottom + 5, 65, 75, 40, 45, false, false, true, false);
|
||||
|
||||
//place terminus shrine
|
||||
UndergroundShrines.SpecialHut((ushort)ModContent.TileType<SmoothVoidstone>(), (ushort)ModContent.TileType<Voidstone>(),
|
||||
(ushort)ModContent.WallType<VoidstoneWallUnsafe>(), UndergroundShrines.UndergroundShrineType.Abyss, abyssChasmX, AbyssChasmBottom);
|
||||
|
||||
//place islands in the sulphuric depths layer
|
||||
for (int sulphurIslandY = (rockLayer - Main.maxTilesY / 15) - 5; sulphurIslandY <= rockLayer - 15; sulphurIslandY++)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
int randomIsland = WorldGen.genRand.Next(4);
|
||||
switch (randomIsland)
|
||||
{
|
||||
case 0:
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
break;
|
||||
case 1:
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
break;
|
||||
case 2:
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(10, 20), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
break;
|
||||
case 3:
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(10, 20), sulphurIslandY, 55, 75, 35, 45, false, false, false, true);
|
||||
break;
|
||||
}
|
||||
|
||||
//increase y value so islands cant be spammed on top of each other
|
||||
sulphurIslandY += 12;
|
||||
}
|
||||
}
|
||||
|
||||
//normal abyss islands
|
||||
int islandLocationOffset = 30;
|
||||
int islandLocationY = rockLayer;
|
||||
|
||||
@@ -365,35 +335,36 @@ namespace CalamityMod.World
|
||||
int randomIsland = WorldGen.genRand.Next(5); //0 1 2 3 4
|
||||
bool hasVoidstone = islandLocationY > (rockLayer + y * 0.143);
|
||||
AbyssIslandPositions[TotalPlacedIslandsSoFar].Y = islandLocationY;
|
||||
int randomPositon = WorldGen.genRand.Next(38, 65);
|
||||
switch (randomIsland)
|
||||
{
|
||||
case 0:
|
||||
AbyssIsland(islandLocationX, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + 40, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - 40, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX + randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX - randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false);
|
||||
break;
|
||||
case 1:
|
||||
AbyssIsland(islandLocationX + 30, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone);
|
||||
AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - 40, islandLocationY + 10, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX - randomPositon, islandLocationY + 10, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false);
|
||||
islandLocationX += 30;
|
||||
break;
|
||||
case 2:
|
||||
AbyssIsland(islandLocationX - 30, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + 30, islandLocationY + 10, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX + randomPositon, islandLocationY + 10, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false);
|
||||
islandLocationX -= 30;
|
||||
break;
|
||||
case 3:
|
||||
AbyssIsland(islandLocationX + 25, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - 5, islandLocationY + 5, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - 35, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX - 5, islandLocationY + 5, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX - randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false);
|
||||
islandLocationX += 25;
|
||||
break;
|
||||
case 4:
|
||||
AbyssIsland(islandLocationX - 25, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + 5, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX + 35, islandLocationY + 5, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone);
|
||||
AbyssIsland(islandLocationX - randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX + 5, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false);
|
||||
AbyssIsland(islandLocationX + randomPositon, islandLocationY + 5, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false);
|
||||
islandLocationX -= 25;
|
||||
break;
|
||||
}
|
||||
@@ -415,14 +386,14 @@ namespace CalamityMod.World
|
||||
switch (randomIsland)
|
||||
{
|
||||
case 0:
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false);
|
||||
break;
|
||||
case 1:
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false);
|
||||
break;
|
||||
case 2:
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(42, 48), voidIslandY, 55, 75, 35, 45, false, true, true);
|
||||
AbyssIsland(abyssChasmX + WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false);
|
||||
AbyssIsland(abyssChasmX - WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -434,93 +405,58 @@ namespace CalamityMod.World
|
||||
AbyssItemArray = CalamityUtils.ShuffleArray(AbyssItemArray);
|
||||
for (int abyssHouse = 0; abyssHouse < TotalPlacedIslandsSoFar; abyssHouse++) //11 15 19
|
||||
{
|
||||
bool hasVoidstone = AbyssIslandPositions[abyssHouse].Y + 5 > (rockLayer + y * 0.143);
|
||||
|
||||
if (abyssHouse != 20)
|
||||
{
|
||||
//place an island below the houses
|
||||
//place the island first so it doesnt destroy the house or chest
|
||||
AbyssIsland(AbyssIslandPositions[abyssHouse].X, AbyssIslandPositions[abyssHouse].Y + 15, 55, 75, 35, 45, false, true, hasVoidstone, false);
|
||||
|
||||
AbyssIslandHouse(AbyssIslandPositions[abyssHouse].X,
|
||||
AbyssIslandPositions[abyssHouse].Y,
|
||||
AbyssItemArray[abyssHouse > 9 ? (abyssHouse - 10) : abyssHouse], //10 choices 0 to 9
|
||||
AbyssIslandPositions[abyssHouse].Y > (rockLayer + y * 0.143));
|
||||
hasVoidstone);
|
||||
}
|
||||
}
|
||||
|
||||
//clean up
|
||||
if (AtLeftSideOfWorld)
|
||||
for (int abyssIndex = abyssMinX + 5; abyssIndex < abyssMaxX - 5; abyssIndex++)
|
||||
{
|
||||
for (int abyssIndex = 5; abyssIndex < abyssChasmX + 80; abyssIndex++) //235
|
||||
for (int abyssIndex2 = 5; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
{
|
||||
for (int abyssIndex2 = 5; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
Tile tile = Main.tile[abyssIndex, abyssIndex2];
|
||||
Tile tileUp = Main.tile[abyssIndex, abyssIndex2 - 1];
|
||||
Tile tileDown = Main.tile[abyssIndex, abyssIndex2 + 1];
|
||||
Tile tileLeft = Main.tile[abyssIndex - 1, abyssIndex2];
|
||||
Tile tileRight = Main.tile[abyssIndex + 1, abyssIndex2];
|
||||
|
||||
if (tile.TileType == ModContent.TileType<AbyssGravel>() || tile.TileType == ModContent.TileType<Voidstone>() ||
|
||||
tile.TileType == ModContent.TileType<PlantyMush>() || tile.TileType == ModContent.TileType<ChaoticOre>() ||
|
||||
tile.TileType == ModContent.TileType<SulphurousShale>())
|
||||
{
|
||||
Tile tile = Main.tile[abyssIndex, abyssIndex2];
|
||||
Tile tileUp = Main.tile[abyssIndex, abyssIndex2 - 1];
|
||||
Tile tileDown = Main.tile[abyssIndex, abyssIndex2 + 1];
|
||||
Tile tileLeft = Main.tile[abyssIndex - 1, abyssIndex2];
|
||||
Tile tileRight = Main.tile[abyssIndex + 1, abyssIndex2];
|
||||
//slope tiles
|
||||
Tile.SmoothSlope(abyssIndex, abyssIndex2, true);
|
||||
|
||||
if (tile.TileType == ModContent.TileType<AbyssGravel>() || tile.TileType == ModContent.TileType<Voidstone>() ||
|
||||
tile.TileType == ModContent.TileType<PlantyMush>() || tile.TileType == ModContent.TileType<ChaoticOre>())
|
||||
{
|
||||
//slope tiles
|
||||
Tile.SmoothSlope(abyssIndex, abyssIndex2, true);
|
||||
|
||||
//kill any individual floating tiles
|
||||
if (!tileUp.HasTile && !tileDown.HasTile && !tileLeft.HasTile && !tileRight.HasTile)
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
|
||||
if (!tile.HasTile && (tile.WallType == ModContent.WallType<AbyssGravelWall>() || tile.WallType == ModContent.WallType<VoidstoneWallUnsafe>()))
|
||||
{
|
||||
//fill up any air pockets with water
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
//kill obsidian
|
||||
if (tile.TileType == TileID.Obsidian)
|
||||
//kill any individual floating tiles
|
||||
if (!tileUp.HasTile && !tileDown.HasTile && !tileLeft.HasTile && !tileRight.HasTile)
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int abyssIndex = abyssChasmX - 80; abyssIndex < x - 5; abyssIndex++) //3965
|
||||
{
|
||||
for (int abyssIndex2 = 5; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
|
||||
if (!tile.HasTile && (tile.WallType == ModContent.WallType<AbyssGravelWall>() || tile.WallType == ModContent.WallType<VoidstoneWallUnsafe>() ||
|
||||
tile.WallType == ModContent.WallType<SulphurousShaleWall>()))
|
||||
{
|
||||
Tile tile = Main.tile[abyssIndex, abyssIndex2];
|
||||
Tile tileUp = Main.tile[abyssIndex, abyssIndex2 - 1];
|
||||
Tile tileDown = Main.tile[abyssIndex, abyssIndex2 + 1];
|
||||
Tile tileLeft = Main.tile[abyssIndex - 1, abyssIndex2];
|
||||
Tile tileRight = Main.tile[abyssIndex + 1, abyssIndex2];
|
||||
//fill up any air pockets with water
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
if (tile.TileType == ModContent.TileType<AbyssGravel>() || tile.TileType == ModContent.TileType<Voidstone>() ||
|
||||
tile.TileType == ModContent.TileType<PlantyMush>() || tile.TileType == ModContent.TileType<ChaoticOre>())
|
||||
{
|
||||
//slope tiles
|
||||
Tile.SmoothSlope(abyssIndex, abyssIndex2, true);
|
||||
|
||||
//kill any individual floating tiles
|
||||
if (!tileUp.HasTile && !tileDown.HasTile && !tileLeft.HasTile && !tileRight.HasTile)
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
|
||||
if (!tile.HasTile && (tile.WallType == ModContent.WallType<AbyssGravelWall>() || tile.WallType == ModContent.WallType<VoidstoneWallUnsafe>()))
|
||||
{
|
||||
//fill up any air pockets with water
|
||||
tile.LiquidType = LiquidID.Water;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
//kill obsidian
|
||||
if (tile.TileType == TileID.Obsidian)
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
//kill obsidian
|
||||
if (tile.TileType == TileID.Obsidian)
|
||||
{
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -543,7 +479,7 @@ namespace CalamityMod.World
|
||||
|
||||
if (Mosses.Contains(tile.TileType))
|
||||
{
|
||||
tile.TileType = TileID.Stone;
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -565,140 +501,92 @@ namespace CalamityMod.World
|
||||
|
||||
if (Mosses.Contains(tile.TileType))
|
||||
{
|
||||
tile.TileType = TileID.Stone;
|
||||
WorldGen.KillTile(abyssIndex, abyssIndex2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ambient tiles and pots
|
||||
if (AtLeftSideOfWorld)
|
||||
for (int abyssIndex = abyssMinX + 5; abyssIndex < abyssMaxX - 5; abyssIndex++)
|
||||
{
|
||||
for (int abyssIndex = 0; abyssIndex < abyssChasmX + 80; abyssIndex++) //235
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
if (!Main.tile[abyssIndex, abyssIndex2].HasTile)
|
||||
{
|
||||
if (!Main.tile[abyssIndex, abyssIndex2].HasTile)
|
||||
//above the 4th layer
|
||||
if (abyssIndex2 < (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
{
|
||||
//above the 4th layer
|
||||
if (abyssIndex2 < (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
//giant kelp, more often in upper layers
|
||||
if ((WorldGen.genRand.NextBool(18) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<AbyssGravel>()) ||
|
||||
(WorldGen.genRand.NextBool(35) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>()))
|
||||
{
|
||||
//giant kelp, more often in upper layers
|
||||
if ((WorldGen.genRand.NextBool(18) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<AbyssGravel>()) ||
|
||||
(WorldGen.genRand.NextBool(35) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>()))
|
||||
{
|
||||
ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType<AbyssGiantKelp1>(), (ushort)ModContent.TileType<AbyssGiantKelp2>(),
|
||||
(ushort)ModContent.TileType<AbyssGiantKelp3>(), (ushort)ModContent.TileType<AbyssGiantKelp4>() };
|
||||
ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType<AbyssGiantKelp1>(), (ushort)ModContent.TileType<AbyssGiantKelp2>(),
|
||||
(ushort)ModContent.TileType<AbyssGiantKelp3>(), (ushort)ModContent.TileType<AbyssGiantKelp4>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Kelps));
|
||||
}
|
||||
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(25) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Kelps));
|
||||
}
|
||||
|
||||
//below 4th layer
|
||||
if (abyssIndex2 >= (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(25) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(6) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
|
||||
//pots
|
||||
if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 > rockLayer)
|
||||
//sulphur shale stuff
|
||||
if (Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<SulphurousShale>())
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(5))
|
||||
if (WorldGen.genRand.NextBool(8))
|
||||
{
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssalPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
ushort[] SulphuricFossils = new ushort[] { (ushort)ModContent.TileType<SulphuricFossil1>(),
|
||||
(ushort)ModContent.TileType<SulphuricFossil2>(), (ushort)ModContent.TileType<SulphuricFossil3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(SulphuricFossils));
|
||||
}
|
||||
}
|
||||
//sulphur pots
|
||||
else if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 < (int)Main.worldSurface)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
|
||||
if (WorldGen.genRand.NextBool(6))
|
||||
{
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<SulphurousPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
ushort[] Ribs = new ushort[] { (ushort)ModContent.TileType<SulphurousRib1>(),
|
||||
(ushort)ModContent.TileType<SulphurousRib2>(), (ushort)ModContent.TileType<SulphurousRib3>(),
|
||||
(ushort)ModContent.TileType<SulphurousRib4>(), (ushort)ModContent.TileType<SulphurousRib5>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Ribs));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int abyssIndex = abyssChasmX - 80; abyssIndex < x; abyssIndex++) //3965
|
||||
{
|
||||
for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++)
|
||||
{
|
||||
if (!Main.tile[abyssIndex, abyssIndex2].HasTile)
|
||||
|
||||
//below 4th layer
|
||||
if (abyssIndex2 >= (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
{
|
||||
//above the 4th layer
|
||||
if (abyssIndex2 < (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(6) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
//giant kelp, more often in upper layers
|
||||
if ((WorldGen.genRand.NextBool(18) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<AbyssGravel>()) ||
|
||||
(WorldGen.genRand.NextBool(35) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>()))
|
||||
{
|
||||
ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType<AbyssGiantKelp1>(), (ushort)ModContent.TileType<AbyssGiantKelp2>(),
|
||||
(ushort)ModContent.TileType<AbyssGiantKelp3>(), (ushort)ModContent.TileType<AbyssGiantKelp4>() };
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Kelps));
|
||||
}
|
||||
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(25) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
}
|
||||
|
||||
//below 4th layer
|
||||
if (abyssIndex2 >= (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1))
|
||||
//pots
|
||||
if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 > rockLayer)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(5))
|
||||
{
|
||||
//bulb trees on voidstone
|
||||
if (WorldGen.genRand.NextBool(6) && Main.tile[abyssIndex, abyssIndex2 + 1].TileType == ModContent.TileType<Voidstone>())
|
||||
{
|
||||
ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType<BulbTree1>(),
|
||||
(ushort)ModContent.TileType<BulbTree2>(), (ushort)ModContent.TileType<BulbTree3>() };
|
||||
|
||||
WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees));
|
||||
}
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssalPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
}
|
||||
|
||||
//pots
|
||||
if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 > rockLayer)
|
||||
}
|
||||
//sulphur pots
|
||||
else if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 < (int)Main.worldSurface)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(5))
|
||||
{
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<AbyssalPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
}
|
||||
}
|
||||
//sulphur pots
|
||||
else if (WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1) && abyssIndex2 < (int)Main.worldSurface)
|
||||
{
|
||||
if (WorldGen.genRand.NextBool(3))
|
||||
{
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<SulphurousPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
}
|
||||
WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType<SulphurousPots>());
|
||||
CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -707,7 +595,7 @@ namespace CalamityMod.World
|
||||
}
|
||||
|
||||
#region Houses
|
||||
public static void AbyssIsland(int i, int j, int sizeMin, int sizeMax, int sizeMin2, int sizeMax2, bool hasChest, bool hasPlantyMush, bool isVoid)
|
||||
public static void AbyssIsland(int i, int j, int sizeMin, int sizeMax, int sizeMin2, int sizeMax2, bool hasChest, bool hasPlantyMush, bool isVoid, bool isShale)
|
||||
{
|
||||
float islandWidth = WorldGen.genRand.Next(sizeMin, sizeMax); //100 150
|
||||
float smallIslandWidth = (float)WorldGen.genRand.Next(sizeMin, sizeMax) / (float)5; //20 30
|
||||
@@ -777,7 +665,16 @@ namespace CalamityMod.World
|
||||
islandPositionY = l;
|
||||
}
|
||||
Main.tile[k, l].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[k, l].TileType = (ushort)(isVoid ? ModContent.TileType<Voidstone>() : ModContent.TileType<AbyssGravel>());
|
||||
|
||||
if (!isShale)
|
||||
{
|
||||
Main.tile[k, l].TileType = (ushort)(isVoid ? ModContent.TileType<Voidstone>() : ModContent.TileType<AbyssGravel>());
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.tile[k, l].TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
}
|
||||
|
||||
CalamityUtils.SafeSquareTileFrame(k, l, true);
|
||||
}
|
||||
}
|
||||
@@ -814,6 +711,7 @@ namespace CalamityMod.World
|
||||
num14 += WorldGen.genRand.Next(-3, 4);
|
||||
num15 = WorldGen.genRand.Next(4, 8);
|
||||
int num16 = isVoid ? ModContent.TileType<Voidstone>() : ModContent.TileType<AbyssGravel>();
|
||||
|
||||
if (WorldGen.genRand.NextBool(4))
|
||||
{
|
||||
num16 = hasChest ? ModContent.TileType<ChaoticOre>() : ModContent.TileType<PlantyMush>();
|
||||
@@ -829,7 +727,16 @@ namespace CalamityMod.World
|
||||
if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (double)(num15 + WorldGen.genRand.Next(2)))
|
||||
{
|
||||
Main.tile[n, num17].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[n, num17].TileType = (ushort)num16;
|
||||
|
||||
if (!isShale)
|
||||
{
|
||||
Main.tile[n, num17].TileType = (ushort)num16;
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.tile[n, num17].TileType = (ushort)ModContent.TileType<SulphurousShale>();
|
||||
}
|
||||
|
||||
CalamityUtils.SafeSquareTileFrame(n, num17, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace CalamityMod.World
|
||||
{
|
||||
float worldEdgeMargin = (float)Main.maxTilesX * 0.08f;
|
||||
int xLimit = Main.maxTilesX / 2;
|
||||
int x = Abyss.AtLeftSideOfWorld ? rand.Next(Main.dungeonX + 200, xLimit - 350) : rand.Next(xLimit + 350, Main.dungeonX - 200);
|
||||
int x = Abyss.AtLeftSideOfWorld ? rand.Next(Main.dungeonX + 200, xLimit - 400) : rand.Next(xLimit + 400, Main.dungeonX - 200);
|
||||
|
||||
//world surface = 920 large 740 medium 560 small
|
||||
int y = (int)(Main.worldSurface * 0.5); //Large = 522, Medium = 444, Small = 336
|
||||
|
||||
@@ -366,8 +366,8 @@ namespace CalamityMod.World
|
||||
//place lillies on scorched remains grass
|
||||
if (tile.TileType == ModContent.TileType<ScorchedRemainsGrass>())
|
||||
{
|
||||
//place them decently often since they are pretty big tiles, also dont place them in lava
|
||||
if (WorldGen.genRand.Next(4) == 0)
|
||||
//place them often since they are pretty big tiles, also dont place them in lava
|
||||
if (WorldGen.genRand.Next(3) == 0)
|
||||
{
|
||||
ushort[] Lillies = new ushort[] { (ushort)ModContent.TileType<LavaLily1>(),
|
||||
(ushort)ModContent.TileType<LavaLily2>(), (ushort)ModContent.TileType<LavaLily3>() };
|
||||
|
||||
@@ -214,128 +214,6 @@ namespace CalamityMod.World
|
||||
}
|
||||
#endregion
|
||||
|
||||
/*
|
||||
#region UnderworldIslandHouse
|
||||
public static void UnderworldIslandHouse(int i, int j, int item)
|
||||
{
|
||||
ushort type = (ushort)ModContent.TileType<BrimstoneSlag>(); //tile
|
||||
int wall = ModContent.WallType<BrimstoneSlagWallUnsafe>(); //wall
|
||||
Vector2 vector = new Vector2((float)i, (float)j);
|
||||
int num = 1;
|
||||
if (WorldGen.genRand.Next(2) == 0)
|
||||
{
|
||||
num = -1;
|
||||
}
|
||||
int num2 = WorldGen.genRand.Next(7, 12);
|
||||
int num3 = WorldGen.genRand.Next(5, 7);
|
||||
vector.X = (float)(i + (num2 + 2) * num);
|
||||
for (int k = j - 15; k < j + 30; k++)
|
||||
{
|
||||
if (Main.tile[(int)vector.X, k].HasTile)
|
||||
{
|
||||
vector.Y = (float)(k - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
vector.X = (float)i;
|
||||
int num4 = (int)(vector.X - (float)num2 - 1f);
|
||||
int num5 = (int)(vector.X + (float)num2 + 1f);
|
||||
int num6 = (int)(vector.Y - (float)num3 - 1f);
|
||||
int num7 = (int)(vector.Y + 2f);
|
||||
if (num4 < 0)
|
||||
{
|
||||
num4 = 0;
|
||||
}
|
||||
if (num5 > Main.maxTilesX)
|
||||
{
|
||||
num5 = Main.maxTilesX;
|
||||
}
|
||||
if (num6 < 0)
|
||||
{
|
||||
num6 = 0;
|
||||
}
|
||||
if (num7 > Main.maxTilesY)
|
||||
{
|
||||
num7 = Main.maxTilesY;
|
||||
}
|
||||
for (int l = num4; l <= num5; l++)
|
||||
{
|
||||
for (int m = num6 - 1; m < num7 + 1; m++)
|
||||
{
|
||||
if (m != num6 - 1 || (l != num4 && l != num5))
|
||||
{
|
||||
Main.tile[l, m].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[l, m].LiquidAmount = 0;
|
||||
Main.tile[l, m].TileType = type;
|
||||
Main.tile[l, m].WallType = 0;
|
||||
Main.tile[l, m].Get<TileWallWireStateData>().IsHalfBlock = false;
|
||||
Main.tile[l, m].Get<TileWallWireStateData>().Slope = SlopeType.Solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
num4 = (int)(vector.X - (float)num2);
|
||||
num5 = (int)(vector.X + (float)num2);
|
||||
num6 = (int)(vector.Y - (float)num3);
|
||||
num7 = (int)(vector.Y + 1f);
|
||||
if (num4 < 0)
|
||||
{
|
||||
num4 = 0;
|
||||
}
|
||||
if (num5 > Main.maxTilesX)
|
||||
{
|
||||
num5 = Main.maxTilesX;
|
||||
}
|
||||
if (num6 < 0)
|
||||
{
|
||||
num6 = 0;
|
||||
}
|
||||
if (num7 > Main.maxTilesY)
|
||||
{
|
||||
num7 = Main.maxTilesY;
|
||||
}
|
||||
for (int n = num4; n <= num5; n++)
|
||||
{
|
||||
for (int num8 = num6; num8 < num7; num8++)
|
||||
{
|
||||
if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == 0)
|
||||
{
|
||||
Main.tile[n, num8].Get<TileWallWireStateData>().HasTile = false;
|
||||
Main.tile[n, num8].WallType = (ushort)wall;
|
||||
}
|
||||
}
|
||||
}
|
||||
int num9 = i + (num2 + 1) * num;
|
||||
int num10 = (int)vector.Y;
|
||||
for (int num11 = num9 - 2; num11 <= num9 + 2; num11++)
|
||||
{
|
||||
Main.tile[num11, num10].Get<TileWallWireStateData>().HasTile = false;
|
||||
Main.tile[num11, num10 - 1].Get<TileWallWireStateData>().HasTile = false;
|
||||
Main.tile[num11, num10 - 2].Get<TileWallWireStateData>().HasTile = false;
|
||||
}
|
||||
WorldGen.PlaceTile(num9, num10, ModContent.TileType<AncientDoorClosed>(), true, false, -1); //door
|
||||
num9 = i + (num2 + 1) * -num - num;
|
||||
for (int num12 = num6; num12 <= num7 + 1; num12++)
|
||||
{
|
||||
Main.tile[num9, num12].Get<TileWallWireStateData>().HasTile = true;
|
||||
Main.tile[num9, num12].LiquidAmount = 0;
|
||||
Main.tile[num9, num12].TileType = type;
|
||||
Main.tile[num9, num12].WallType = 0;
|
||||
Main.tile[num9, num12].Get<TileWallWireStateData>().IsHalfBlock = false;
|
||||
Main.tile[num9, num12].Get<TileWallWireStateData>().Slope = SlopeType.Solid;
|
||||
}
|
||||
WorldGen.AddBuriedChest(i, num10 - 3, item, false, 4); //chest
|
||||
int num22 = i + (num2 / 2 + 1) * -num;
|
||||
WorldGen.PlaceTile(num22, num7 - 1, ModContent.TileType<AncientTable>(), true, false, -1); //table
|
||||
WorldGen.PlaceTile(num22 - 2, num7 - 1, ModContent.TileType<AncientChair>(), true, false, 0); //chair
|
||||
Tile tile = Main.tile[num22 - 2, num7 - 1];
|
||||
tile.TileFrameX += 18;
|
||||
Tile tile2 = Main.tile[num22 - 2, num7 - 2];
|
||||
tile2.TileFrameX += 18;
|
||||
WorldGen.PlaceTile(num22 + 2, num7 - 1, ModContent.TileType<AncientChair>(), true, false, 0); //chair
|
||||
}
|
||||
#endregion
|
||||
*/
|
||||
|
||||
#region ChasmGenerator
|
||||
public static void ChasmGenerator(int i, int j, int steps, bool ocean = false)
|
||||
{
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace CalamityMod.World
|
||||
for (int y = top; y < bottom; y++)
|
||||
{
|
||||
if (y >= top + DepthForWater)
|
||||
Main.tile[x, y + WorldGen.genRand.Next(15, 17)].WallType = (ushort)ModContent.WallType<SulphurousSandWall>();
|
||||
Main.tile[x, y + WorldGen.genRand.Next(22, 25)].WallType = (ushort)ModContent.WallType<SulphurousSandWall>();
|
||||
Main.tile[x, y].LiquidAmount = byte.MaxValue;
|
||||
Main.tile[x, y].Get<TileWallWireStateData>().HasTile = false;
|
||||
}
|
||||
@@ -867,7 +867,7 @@ namespace CalamityMod.World
|
||||
|
||||
// Try again if there is no tile above or the ceiling is not level.
|
||||
if (!WorldUtils.Find(new(x, y), searchCondition, out Point top) ||
|
||||
!WorldUtils.Find(new(x + 1, y), searchCondition, out Point topRight) || top.Y != topRight.Y)
|
||||
!WorldUtils.Find(new(x + 1, y), searchCondition, out Point topRight) || top.Y != topRight.Y)
|
||||
{
|
||||
tryAgain = true;
|
||||
}
|
||||
@@ -882,7 +882,10 @@ namespace CalamityMod.World
|
||||
continue;
|
||||
}
|
||||
|
||||
GenerateColumn(x, top.Y, y);
|
||||
if (WorldGen.genRand.NextBool(2))
|
||||
{
|
||||
GenerateColumn(x, top.Y, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -983,7 +986,7 @@ namespace CalamityMod.World
|
||||
if (WorldGen.InWorld(x + dx, y + dy))
|
||||
{
|
||||
if (CalamityUtils.ParanoidTileRetrieval(x + dx, y + dy).TileType != sandstoneID &&
|
||||
SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(x + dx, y + dy).TileType))
|
||||
SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(x + dx, y + dy).TileType))
|
||||
{
|
||||
Main.tile[x + dx, y + dy].WallType = sandstoneWallID;
|
||||
Main.tile[x + dx, y + dy].TileType = sandstoneID;
|
||||
@@ -1029,9 +1032,12 @@ namespace CalamityMod.World
|
||||
type++;
|
||||
int height = heightFromType(type);
|
||||
|
||||
PlaceStalactite(x, y, height, CalamityMod.Instance.Find<ModTile>($"SulphurousStalactite{type}").Type);
|
||||
if (WorldGen.SolidTile(x, y + dy + 1))
|
||||
if ((Main.tile[x, y + dy + 1].TileType == ModContent.TileType<HardenedSulphurousSandstone>() ||
|
||||
Main.tile[x, y + dy + 1].TileType == ModContent.TileType<SulphurousSandstone>()) &&
|
||||
!Main.tile[x, y + dy + 1].LeftSlope && !Main.tile[x, y + dy + 1].RightSlope && !Main.tile[x, y + dy + 1].IsHalfBlock)
|
||||
{
|
||||
PlaceStalacmite(x, y + dy, height, CalamityMod.Instance.Find<ModTile>($"SulphurousStalacmite{type}").Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||