1 - Abominations.

This commit is contained in:
mountaindrew10 committed 2022-06-20 20:02:26 -05:00
1 parent 63e30690c6
commit 571f9fdca9
5 files changed
+26 -12

No files matched your search

+2 -2
View File
@@ -828,12 +828,12 @@ namespace CalamityMod.CalPlayer
// Death Mode effects
caveDarkness = 0f;
if (CalamityWorld.death)
if (CalamityWorld.death || Main.getGoodWorld)
{
if (Player.whoAmI == Main.myPlayer)
{
// Thorn and spike effects
// 10 = crimson/corruption thorns, 17 = jungle thorns, 40 = dungeon spikes, 60 = temple spikes
// 10 = crimson/corruption thorns, 17 = jungle thorns, 80 = temple spikes
Vector2 tileType;
if (!Player.mount.Active || !Player.mount.Cart)
tileType = Collision.HurtTiles(Player.position, Player.velocity, Player.width, Player.height, Player.fireWalk);
+6 -6
View File
@@ -21,9 +21,9 @@ namespace CalamityMod.World.Planets
private ushort[] oreTypes = new ushort[]
{
WorldGen.copperBar == TileID.Copper ? (Main.getGoodWorld ? TileID.Palladium : TileID.Tin) : (Main.getGoodWorld ? TileID.Cobalt : TileID.Copper),
WorldGen.ironBar == TileID.Iron ? (Main.getGoodWorld ? TileID.Orichalcum : TileID.Lead) : (Main.getGoodWorld ? TileID.Mythril : TileID.Iron),
WorldGen.silverBar == TileID.Silver ? (Main.getGoodWorld ? TileID.Titanium : TileID.Tungsten) : (Main.getGoodWorld ? TileID.Adamantite : TileID.Silver),
WorldGen.goldBar == TileID.Gold ? (Main.getGoodWorld ? (ushort)ModContent.TileType<HallowedOre>() : TileID.Platinum) : (Main.getGoodWorld ? (ushort)ModContent.TileType<HallowedOre>() : TileID.Gold)
WorldGen.ironBar == TileID.Iron ? (Main.getGoodWorld ? TileID.Palladium : TileID.Lead) : (Main.getGoodWorld ? TileID.Cobalt : TileID.Iron),
WorldGen.silverBar == TileID.Silver ? (Main.getGoodWorld ? TileID.Orichalcum : TileID.Tungsten) : (Main.getGoodWorld ? TileID.Mythril : TileID.Silver),
WorldGen.goldBar == TileID.Gold ? (Main.getGoodWorld ? TileID.Titanium : TileID.Platinum) : (Main.getGoodWorld ? TileID.Adamantite : TileID.Gold)
};
public override bool Place(Point origin, StructureMap structures)
@@ -66,7 +66,7 @@ namespace CalamityMod.World.Planets
//Place layers
WorldUtils.Gen(origin, new ModShapes.All(core), Actions.Chain(new GenAction[]
{
new Actions.PlaceTile(TileID.Stone),
new Actions.PlaceTile(Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone),
new Actions.PlaceWall(WallID.Cave2Unsafe)
}));
WorldUtils.Gen(origin, new ModShapes.All(crust), Actions.Chain(new GenAction[]
@@ -87,7 +87,7 @@ namespace CalamityMod.World.Planets
x = _random.Next(origin.X - radius, origin.X + radius + 1);
y = _random.Next(origin.Y - radius, origin.Y + radius + 1);
}
WorldGen.TileRunner(x, y, _random.NextFloat(4.6f, 7.6f), _random.Next(7, 16), TileID.Stone);
WorldGen.TileRunner(x, y, _random.NextFloat(4.6f, 7.6f), _random.Next(7, 16), Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone);
}
for (int i = 0; i < randDirt; i++)
{
@@ -192,7 +192,7 @@ namespace CalamityMod.World.Planets
//Clear dirt walls on outer edge because of stone / ore
WorldUtils.Gen(origin, new ModShapes.InnerOutline(crust), Actions.Chain(new GenAction[]
{
new Modifiers.OnlyTiles(new ushort[] { TileID.Stone, oreType }),
new Modifiers.OnlyTiles(new ushort[] { Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone, oreType }),
new Modifiers.IsTouchingAir(true),
new Modifiers.OnlyWalls(WallID.DirtUnsafe),
new Actions.ClearWall(true)
+3 -3
View File
@@ -54,7 +54,7 @@ namespace CalamityMod.World.Planets
WorldUtils.Gen(origin, new Shapes.Circle((int)(radius * outerRadiusPercentage)), Actions.Chain(new GenAction[]
{
new Modifiers.Blotches(2, 0.45).Output(outerCoreShape),
new Actions.SetTile(TileID.Stone, true),
new Actions.SetTile(Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone, true),
new Actions.ClearWall(),
new Actions.PlaceWall(WallID.CaveUnsafe)
}));
@@ -64,7 +64,7 @@ namespace CalamityMod.World.Planets
while (numStone > 0)
{
Point p = outerCore.RandomPointOnCircleEdge().ToTileCoordinates();
WorldGen.TileRunner(p.X, p.Y, _random.NextFloat(3f, 6f), _random.Next(5, 15), TileID.Stone);
WorldGen.TileRunner(p.X, p.Y, _random.NextFloat(3f, 6f), _random.Next(5, 15), Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone);
numStone--;
}
int numDirt = _random.Next(80, 110);
@@ -147,7 +147,7 @@ namespace CalamityMod.World.Planets
if (Vector2.Distance(planetCenter, new Vector2(x * 16 + 8, startY * 16 + 8)) > radius * 16f - 64)
{
_tiles[x, startY].Get<TileWallWireStateData>().HasTile = true;
_tiles[x, startY].TileType = TileID.Stone;
_tiles[x, startY].TileType = Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone;
}
}
}
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CalamityMod.World.Planets
{
int x = _random.Next(origin.X - radius + 3, origin.X + radius - 2);
int y = _random.Next(origin.Y - radius + 3, origin.Y + radius - 2);
WorldGen.TileRunner(x, y, _random.NextFloat(5f, 9f), _random.Next(5, 15), TileID.Stone);
WorldGen.TileRunner(x, y, _random.NextFloat(5f, 9f), _random.Next(5, 15), Main.getGoodWorld ? TileID.WoodenSpikes : TileID.Stone);
}
//Place grass, remove wall and occasionally smooth
+14
View File
@@ -74,6 +74,20 @@ namespace CalamityMod.World.Planets
MudPlanetoidCount--;
i++;
}
// Checkerboard of Spikes and Wooden Spikes.
if (Main.getGoodWorld)
{
for (int j = 0; j < Main.maxTilesX; j++)
{
for (int k = 0; k < (int)(Main.maxTilesY * 0.2f); k++)
{
bool convertToRegularSpikes = (j % 2 == 0 && k % 2 == 0) || (j % 2 != 0 && k % 2 != 0);
if (Main.tile[j, k].TileType == TileID.WoodenSpikes && convertToRegularSpikes)
Main.tile[j, k].TileType = TileID.Spikes;
}
}
}
}
public static bool InvalidSkyPlacementArea(Rectangle area)