Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
No files matched your search
@@ -9,6 +9,7 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSurfaceBGStyle");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
@@ -30,6 +31,5 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
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 |
@@ -0,0 +1,35 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class SulphurousShale : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 100;
|
||||
DisplayName.SetDefault("Sulphurous Shale");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.createTile = ModContent.TileType<Tiles.Abyss.SulphurousShale>();
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.autoReuse = true;
|
||||
Item.consumable = true;
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Walls.SulphurousShaleWall>(4).
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 206 B |
@@ -0,0 +1,34 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class SulphurousShaleWall : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 400;
|
||||
DisplayName.SetDefault("Sulphurous Shale Wall");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.createWall = ModContent.WallType<WallTiles.SulphurousShaleWallSafe>();
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.autoReuse = true;
|
||||
Item.consumable = true;
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).AddTile(
|
||||
TileID.WorkBenches).AddIngredient(ModContent.ItemType<SulphurousShale>()).Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 273 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()
|
||||
@@ -62,6 +62,8 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
Projectile.velocity *= 0.98f;
|
||||
|
||||
if (Math.Abs(Projectile.velocity.X) > 0f)
|
||||
{
|
||||
Projectile.spriteDirection = -Projectile.direction;
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
Vector2 center2 = Projectile.Center;
|
||||
Vector2 vector48 = player.Center - center2;
|
||||
float playerDistance = vector48.Length();
|
||||
if (Projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 150f && Projectile.position.X == Projectile.oldPosition.X)))
|
||||
if (Projectile.velocity.Y == 0 && ((HoleBelow() && playerDistance > 150f) || (playerDistance > 150f && Projectile.position.X == Projectile.oldPosition.X)))
|
||||
{
|
||||
Projectile.velocity.Y = -8f;
|
||||
}
|
||||
@@ -159,12 +159,12 @@ namespace CalamityMod.Projectiles.Pets
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
//falling frame
|
||||
if (Projectile.velocity.Y > 0.3f && Projectile.position.Y != Projectile.oldPosition.Y)
|
||||
else if (Projectile.velocity.Y > 0.3f && Projectile.position.Y != Projectile.oldPosition.Y)
|
||||
{
|
||||
Projectile.frame = 4;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
else
|
||||
else if (Projectile.velocity.X != 0)
|
||||
{
|
||||
//moving animation
|
||||
Projectile.frameCounter++;
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 49f / 255f;
|
||||
g = 159f / 255f;
|
||||
b = 242f / 255f;
|
||||
r = 49f / 500f;
|
||||
g = 159f / 500f;
|
||||
b = 242f / 500f;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
//using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class SulphurousShale : ModTile
|
||||
{
|
||||
int animationFrameWidth = 288;
|
||||
|
||||
public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/AbyssGravelMine", 3);
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
Main.tileMergeDirt[Type] = true;
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeWithAbyss(Type);
|
||||
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.SulphurousShale>();
|
||||
AddMapEntry(new Color(77, 60, 93));
|
||||
MineResist = 5f;
|
||||
MinPick = 65;
|
||||
HitSound = MineSound;
|
||||
DustType = 33;
|
||||
}
|
||||
|
||||
public override bool CanExplode(int i, int j)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143));
|
||||
int nearbyVineCount = 0;
|
||||
for (int x = i - 15; x <= i + 15; x++)
|
||||
{
|
||||
for (int y = j - 15; y <= j + 15; y++)
|
||||
{
|
||||
if (WorldGen.InWorld(x, y))
|
||||
{
|
||||
if (CalamityUtils.ParanoidTileRetrieval(x, y).HasTile &&
|
||||
CalamityUtils.ParanoidTileRetrieval(x, y).TileType == (ushort)ModContent.TileType<SulphurousVines>())
|
||||
{
|
||||
nearbyVineCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Main.tile[i, j + 1] != null && nearbyVineCount < 5 && j >= SulphurousSea.VineGrowTopLimit)
|
||||
{
|
||||
if (!Main.tile[i, j + 1].HasTile && Main.tile[i, j + 1].TileType != (ushort)ModContent.TileType<SulphurousVines>())
|
||||
{
|
||||
if (Main.tile[i, j + 1].LiquidAmount == 255 &&
|
||||
Main.tile[i, j + 1].LiquidType != LiquidID.Lava)
|
||||
{
|
||||
bool flag13 = false;
|
||||
for (int num52 = num8; num52 > num8 - 10; num52--)
|
||||
{
|
||||
if (Main.tile[i, num52].BottomSlope)
|
||||
{
|
||||
flag13 = false;
|
||||
break;
|
||||
}
|
||||
if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope)
|
||||
{
|
||||
flag13 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag13)
|
||||
{
|
||||
int num53 = i;
|
||||
int num54 = j + 1;
|
||||
Main.tile[num53, num54].TileType = (ushort)ModContent.TileType<SulphurousVines>();
|
||||
Main.tile[num53, num54].Get<TileWallWireStateData>().HasTile = true;
|
||||
WorldGen.SquareTileFrame(num53, num54, true);
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
Main.tile[i, j].Get<TileWallWireStateData>().Slope = SlopeType.Solid;
|
||||
Main.tile[i, j].Get<TileWallWireStateData>().IsHalfBlock = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
|
||||
{
|
||||
int uniqueAnimationFrameX = 0;
|
||||
int xPos = i % 4;
|
||||
int yPos = j % 4;
|
||||
switch (xPos)
|
||||
{
|
||||
case 0:
|
||||
switch (yPos)
|
||||
{
|
||||
case 0:
|
||||
uniqueAnimationFrameX = 0;
|
||||
break;
|
||||
case 1:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
case 2:
|
||||
uniqueAnimationFrameX = 1;
|
||||
break;
|
||||
case 3:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
default:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
switch (yPos)
|
||||
{
|
||||
case 0:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
case 1:
|
||||
uniqueAnimationFrameX = 0;
|
||||
break;
|
||||
case 2:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
case 3:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
default:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
switch (yPos)
|
||||
{
|
||||
case 0:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
case 1:
|
||||
uniqueAnimationFrameX = 0;
|
||||
break;
|
||||
case 2:
|
||||
uniqueAnimationFrameX = 1;
|
||||
break;
|
||||
case 3:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
default:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch (yPos)
|
||||
{
|
||||
case 0:
|
||||
uniqueAnimationFrameX = 1;
|
||||
break;
|
||||
case 1:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
case 2:
|
||||
uniqueAnimationFrameX = 0;
|
||||
break;
|
||||
case 3:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
default:
|
||||
uniqueAnimationFrameX = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
frameXOffset = uniqueAnimationFrameX * animationFrameWidth;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AbyssGravel>(), false, false, false, false, resetFrame);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 18 KiB |
@@ -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,63 @@
|
||||
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.Crags.Lily
|
||||
{
|
||||
public class LavaLily1 : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 5;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(3, 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 = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(153, 100, 176));
|
||||
DustType = -1; //idk what dust to put here
|
||||
}
|
||||
|
||||
internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2));
|
||||
Color color = Lighting.GetColor(i, j);
|
||||
|
||||
Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12;
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
//draw the glowmask on the lily base
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Glow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily1TopGlow").Value;
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(98, 191), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 987 B |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,63 @@
|
||||
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.Crags.Lily
|
||||
{
|
||||
public class LavaLily2 : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 5;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(3, 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 = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(153, 100, 176));
|
||||
DustType = -1; //idk what dust to put here
|
||||
}
|
||||
|
||||
internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2));
|
||||
Color color = Lighting.GetColor(i, j);
|
||||
|
||||
Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12;
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
//draw the glowmask on the lily base
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Glow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily2TopGlow").Value;
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(90, 209), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,63 @@
|
||||
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.Crags.Lily
|
||||
{
|
||||
public class LavaLily3 : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
TileObjectData.newTile.Width = 5;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.Origin = new Point16(3, 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 = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(153, 100, 176));
|
||||
DustType = -1; //idk what dust to put here
|
||||
}
|
||||
|
||||
internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2));
|
||||
Color color = Lighting.GetColor(i, j);
|
||||
|
||||
Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12;
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
//draw the glowmask on the lily base
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Glow").Value;
|
||||
Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White);
|
||||
|
||||
Texture2D lilyTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3Top").Value;
|
||||
Texture2D glowTex = ModContent.Request<Texture2D>("CalamityMod/Tiles/Crags/Lily/LavaLily3TopGlow").Value;
|
||||
|
||||
//draw in the middle of the tile so it doesnt draw more than once
|
||||
if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18)
|
||||
{
|
||||
DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), false);
|
||||
DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(98, 199), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 990 B |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -335,6 +335,7 @@ namespace CalamityMod
|
||||
TileType<AstralSnow>(),
|
||||
TileType<Navystone>(),
|
||||
TileType<EutrophicSand>(),
|
||||
TileType<SulphurousShale>(),
|
||||
TileType<AbyssGravel>(),
|
||||
TileType<Voidstone>(),
|
||||
});
|
||||
@@ -448,6 +449,7 @@ namespace CalamityMod
|
||||
// Sulphurous Sea
|
||||
TileType<SulphurousSand>(),
|
||||
TileType<SulphurousSandstone>(),
|
||||
TileType<SulphurousShale>(),
|
||||
// Abyss
|
||||
TileType<AbyssGravel>(),
|
||||
TileType<Voidstone>(),
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class SulphurousShaleWall : ModWall
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DustType = 32;
|
||||
AddMapEntry(new Color(59, 40, 63));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class SulphurousShaleWallSafe : ModWall
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
DustType = 32;
|
||||
ItemDrop = ModContent.ItemType<Items.Placeables.Walls.SulphurousShaleWall>();
|
||||
AddMapEntry(new Color(59, 40, 63));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 858 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ namespace CalamityMod.World
|
||||
while (y < Main.worldSurface)
|
||||
{
|
||||
if (Main.tile[x, y].HasTile &&
|
||||
(Main.tile[x, y].TileType == ModContent.TileType<AstralSand>() || Main.tile[x, y].TileType == ModContent.TileType<AstralSandstone>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<HardenedAstralSand>() || Main.tile[x, y].TileType == ModContent.TileType<AstralIce>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralDirt>() || Main.tile[x, y].TileType == ModContent.TileType<AstralStone>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralGrass>() || Main.tile[x, y].TileType == ModContent.TileType<NovaeSlag>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<CelestialRemains>() || Main.tile[x, y].TileType == ModContent.TileType<AstralSnow>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralClay>() || Main.tile[x, y].TileType == ModContent.TileType<AstralStone>()))
|
||||
(Main.tile[x, y].TileType == ModContent.TileType<AstralSand>() || Main.tile[x, y].TileType == ModContent.TileType<AstralSandstone>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<HardenedAstralSand>() || Main.tile[x, y].TileType == ModContent.TileType<AstralIce>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralDirt>() || Main.tile[x, y].TileType == ModContent.TileType<AstralStone>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralGrass>() || Main.tile[x, y].TileType == ModContent.TileType<NovaeSlag>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<CelestialRemains>() || Main.tile[x, y].TileType == ModContent.TileType<AstralSnow>() ||
|
||||
Main.tile[x, y].TileType == ModContent.TileType<AstralClay>() || Main.tile[x, y].TileType == ModContent.TileType<AstralStone>()))
|
||||
{
|
||||
astralTileCount++;
|
||||
if (astralTileCount > astralTilesAllowed)
|
||||
@@ -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(650, xLimit - 200) : rand.Next(xLimit + 200, Main.maxTilesX - 650);
|
||||
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
|
||||
@@ -146,18 +146,27 @@ namespace CalamityMod.World
|
||||
{
|
||||
suitableTiles++;
|
||||
|
||||
// Avoid floating islands: Clouds and Sunplate both harshly punish attempted meteor spawns
|
||||
//Avoid floating islands: Clouds and Sunplate both harshly punish attempted meteor spawns
|
||||
if (Main.tile[l, m].TileType == TileID.Cloud || Main.tile[l, m].TileType == TileID.Sunplate)
|
||||
{
|
||||
suitableTiles -= 100;
|
||||
}
|
||||
// Avoid Sulphurous Sea beach: Cannot be converted by astral
|
||||
//Avoid the hallowed so it doesnt get demolished by the astral biome
|
||||
else if (Main.tile[l, m].TileType == TileID.HallowedGrass || Main.tile[l, m].TileType == TileID.Pearlstone)
|
||||
{
|
||||
suitableTiles -= 100;
|
||||
}
|
||||
//Avoid living trees, doesnt land on them too often but its better to prevent it
|
||||
else if (Main.tile[l, m].TileType == TileID.LivingWood || Main.tile[l, m].TileType == TileID.LeafBlock)
|
||||
{
|
||||
suitableTiles -= 100;
|
||||
}
|
||||
//Avoid Sulphurous Sea beach: Cannot be converted by astral
|
||||
else if (Main.tile[l, m].TileType == ModContent.TileType<SulphurousSand>() || Main.tile[l, m].TileType == ModContent.TileType<SulphurousSandstone>())
|
||||
{
|
||||
suitableTiles -= 100;
|
||||
}
|
||||
|
||||
// Prevent the Astral biome from overriding or interfering with an AA biome
|
||||
//Prevent the Astral biome from overriding or interfering with an AA biome
|
||||
else if (ancientsAwakened is not null && aaTilesToAvoid.Contains(Main.tile[l, m].TileType))
|
||||
{
|
||||
suitableTiles -= 100;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Tiles.Crags;
|
||||
using CalamityMod.Tiles.Crags.Spike;
|
||||
using CalamityMod.Tiles.Crags.Tree;
|
||||
using CalamityMod.Tiles.Crags.Lily;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.Walls;
|
||||
using CalamityMod.Schematics;
|
||||
@@ -28,8 +29,6 @@ namespace CalamityMod.World
|
||||
static int lavaLakeBigPlaceDelay = 0;
|
||||
static int numLavaLakes = 0;
|
||||
|
||||
static int TreeDelay = 0;
|
||||
|
||||
//all the main crags terrain generation
|
||||
private static void GenCrags()
|
||||
{
|
||||
@@ -98,7 +97,7 @@ namespace CalamityMod.World
|
||||
//scorched remains patches
|
||||
for (int x = biomeStart + 30; x <= biomeEdge - 30; x++)
|
||||
{
|
||||
if (WorldGen.genRand.Next(150) == 0)
|
||||
if (WorldGen.genRand.Next(145) == 0)
|
||||
{
|
||||
ScorchedGrassPatches(new Point(x, Main.maxTilesY - 135));
|
||||
}
|
||||
@@ -221,23 +220,6 @@ namespace CalamityMod.World
|
||||
}
|
||||
}
|
||||
|
||||
//spread grass on all scorched remains
|
||||
for (int x = biomeStart; x <= biomeEdge; x++)
|
||||
{
|
||||
for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 5; y++)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
Tile tileUp = Main.tile[x, y - 1];
|
||||
|
||||
if (tile.TileType == ModContent.TileType<ScorchedRemains>() && !tileUp.HasTile && tileUp.LiquidAmount == 0)
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<ScorchedRemainsGrass>();
|
||||
}
|
||||
|
||||
Tile.SmoothSlope(x, y, true);
|
||||
}
|
||||
}
|
||||
|
||||
//place clumps of charred ore
|
||||
for (int x = biomeStart; x <= biomeEdge; x++)
|
||||
{
|
||||
@@ -270,11 +252,31 @@ namespace CalamityMod.World
|
||||
for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 5; y++)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
Tile tileAbove = Main.tile[x, y - 1];
|
||||
|
||||
if (tile.LiquidAmount > 0)
|
||||
{
|
||||
tile.LiquidType = LiquidID.Lava;
|
||||
tile.LiquidAmount = 255;
|
||||
}
|
||||
|
||||
//get rid of lava above scorched remains as much as possible
|
||||
if (tile.TileType == ModContent.TileType<ScorchedRemains>() && !tileAbove.HasTile)
|
||||
{
|
||||
for (int i = x - 1; i <= x + 1; i++)
|
||||
{
|
||||
for (int j = y - 5; j <= y; j++)
|
||||
{
|
||||
Tile lavaTile = Main.tile[i, j];
|
||||
Tile lavaTileDown = Main.tile[i, j + 1];
|
||||
|
||||
if (lavaTile.WallType == 0 && lavaTileDown.WallType == 0)
|
||||
{
|
||||
lavaTile.LiquidAmount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,6 +288,24 @@ namespace CalamityMod.World
|
||||
Main.tile[x, y].LiquidAmount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//settle all liquids
|
||||
CalamityUtils.SettleWater();
|
||||
|
||||
//spread grass on all scorched remains with no lava above them
|
||||
for (int x = biomeStart; x <= biomeEdge; x++)
|
||||
{
|
||||
for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 110; y++)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
Tile tileUp = Main.tile[x, y - 1];
|
||||
|
||||
if (tile.TileType == ModContent.TileType<ScorchedRemains>() && !tileUp.HasTile && tileUp.LiquidAmount == 0)
|
||||
{
|
||||
tile.TileType = (ushort)ModContent.TileType<ScorchedRemainsGrass>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//place ambient objects and other stuff
|
||||
@@ -300,7 +320,8 @@ namespace CalamityMod.World
|
||||
for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 5; y++)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
Tile tileUp = Main.tile[x, y - 1];
|
||||
|
||||
Tile.SmoothSlope(x, y, true);
|
||||
|
||||
//stalactites and stalagmites
|
||||
if (tile.TileType == ModContent.TileType<BrimstoneSlag>())
|
||||
@@ -340,23 +361,67 @@ namespace CalamityMod.World
|
||||
|
||||
WorldGen.PlaceObject(x, y - 1, WorldGen.genRand.Next(Stalagmites));
|
||||
}
|
||||
}
|
||||
|
||||
if (TreeDelay > 0)
|
||||
//place lillies on scorched remains grass
|
||||
if (tile.TileType == ModContent.TileType<ScorchedRemainsGrass>())
|
||||
{
|
||||
//place them often since they are pretty big tiles, also dont place them in lava
|
||||
if (WorldGen.genRand.Next(3) == 0)
|
||||
{
|
||||
TreeDelay--;
|
||||
ushort[] Lillies = new ushort[] { (ushort)ModContent.TileType<LavaLily1>(),
|
||||
(ushort)ModContent.TileType<LavaLily2>(), (ushort)ModContent.TileType<LavaLily3>() };
|
||||
|
||||
WorldGen.PlaceObject(x, y - 1, WorldGen.genRand.Next(Lillies));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//separate y loop so trees dont grow too deep
|
||||
for (int y = Main.maxTilesY - 150; y <= Main.maxTilesY - 122; y++)
|
||||
{
|
||||
Tile tile = Main.tile[x, y];
|
||||
|
||||
Tile.SmoothSlope(x, y, true);
|
||||
|
||||
//stalactites and stalagmites
|
||||
if (tile.TileType == ModContent.TileType<BrimstoneSlag>())
|
||||
{
|
||||
//grow spine tree
|
||||
if (WorldGen.genRand.Next(3) == 0 && TreeDelay == 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
if (WorldGen.genRand.Next(12) == 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
SpineTree.Spawn(x, y - 1, 22, 28, false, -1, false);
|
||||
TreeDelay = 20;
|
||||
PlaceTree(x, y - 1, ModContent.TileType<SpineTree>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool PlaceTree(int x, int y, int tileType)
|
||||
{
|
||||
int minDistance = 5;
|
||||
int treeNearby = 0;
|
||||
|
||||
for (int i = x - minDistance; i < x + minDistance; i++)
|
||||
{
|
||||
for (int j = y - minDistance; j < y + minDistance; j++)
|
||||
{
|
||||
if (Main.tile[i, j].HasTile && Main.tile[i, j].TileType == tileType)
|
||||
{
|
||||
treeNearby++;
|
||||
if (treeNearby > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SpineTree.Spawn(x, y, 22, 28, false, -1, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void FillBrimstoneChests(Chest chest, int Type, bool firstItem)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
author = Fabsol and the Dev Team
|
||||
version = 2.0.1.006
|
||||
version = 2.0.2.001
|
||||
displayName = Calamity Mod
|
||||
homepage = https://discord.gg/calamity
|
||||
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes
|
||||
|
||||