bridge schematic done

This commit is contained in:
Mortis3 committed 2023-01-15 19:33:36 -05:00
1 parent ef36b46286
commit c1aa03a08c
10 files changed
+58 -47

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Pets
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Escargdolon Snail");
DisplayName.SetDefault("Escargidolon Snail");
Description.SetDefault("It's like an Eidolon Wyrm... but a snail!");
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
+1 -1
View File
@@ -279,7 +279,7 @@ namespace CalamityMod
Filters.Scene["CalamityMod:MonolithAccursed"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:MonolithAccursed"] = new MonolithSky();
Filters.Scene["CalamityMod:BrimstoneCrag"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0f).UseOpacity(0f), EffectPriority.VeryHigh);
Filters.Scene["CalamityMod:BrimstoneCrag"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
SkyManager.Instance["CalamityMod:BrimstoneCrag"] = new BrimstoneCragSky();
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Pets
SacrificeTotal = 1;
DisplayName.SetDefault("Abyss Shell Fossil");
Tooltip.SetDefault("A prehistoric shell, once belonging to a goofy aquatic creature"
+ "\nSummons a pet Escargdolon Snail");
+ "\nSummons an Escargidolon Snail");
}
public override void SetDefaults()
@@ -4,12 +4,12 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public class SacrificialBlossomSeeds : ModItem
public class CinderBlossomSeeds : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Sacrificial Blossom Seeds");
Tooltip.SetDefault("Places sacrificial blossom grass on scorched remains");
DisplayName.SetDefault("Cinder Blossom Seeds");
Tooltip.SetDefault("Places cinder blossom grass on scorched remains");
}
public override void SetDefaults()
File renamed without changes.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Pets
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Escargdolon Snail");
DisplayName.SetDefault("Escargidolon Snail");
Main.projFrames[Projectile.type] = 6;
Main.projPet[Projectile.type] = true;
}
Binary file not shown.
+6
View File
@@ -36,6 +36,9 @@ namespace CalamityMod.Schematics
internal const string AstralBeaconKey = "Astral Beacon";
internal const string AstralBeaconFilename = "Schematics/AstralBeacon.csch";
internal const string CragBridgeKey = "Crags Bridge";
internal const string CragBridgeFilename = "Schematics/CragBridge.csch";
internal static Dictionary<string, SchematicMetaTile[,]> TileMaps;
internal static Dictionary<string, PilePlacementFunction> PilePlacementMaps;
@@ -59,6 +62,9 @@ namespace CalamityMod.Schematics
// Astral world gen structures
[AstralBeaconKey] = CalamitySchematicIO.LoadSchematic(AstralBeaconFilename),
//crag bridge
[CragBridgeKey] = CalamitySchematicIO.LoadSchematic(CragBridgeFilename),
// Sulphurous Sea scrap world gen structures
["Sulphurous Scrap 1"] = CalamitySchematicIO.LoadSchematic("Schematics/SulphurousScrap1.csch").ShaveOffEdge(),
["Sulphurous Scrap 2"] = CalamitySchematicIO.LoadSchematic("Schematics/SulphurousScrap2.csch").ShaveOffEdge(),
+2 -2
View File
@@ -453,9 +453,9 @@ namespace CalamityMod.World
WorldGen.gen = true;
// Add the average height of a tree to the Y position to offset trees usually messing with the calculation.
// Then also add 10 blocks because these things seem to always like to appear standing on the floor.
int finalVerticalOffset = 18;
//int finalVerticalOffset = 18;
bool _ = true;
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.AstralBeaconKey, new Point(i, (int)height + finalVerticalOffset), SchematicAnchor.Center, ref _);
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.AstralBeaconKey, new Point(i, (int)height), SchematicAnchor.TopCenter, ref _);
WorldGen.gen = false;
}
}
+43 -38
View File
@@ -1,3 +1,5 @@
using CalamityMod.Schematics;
using static CalamityMod.Schematics.SchematicManager;
using CalamityMod.Tiles.Crags;
using CalamityMod.Tiles.Ores;
using CalamityMod.Walls;
@@ -10,24 +12,27 @@ using Terraria.WorldBuilding;
using Terraria.GameContent.Generation;
using Microsoft.Xna.Framework;
using System;
using System.Linq;
using System.Collections.Generic;
namespace CalamityMod.World
{
public class BrimstoneCrag
{
//the 25 is there to offset it from the edge of the world so no "out of bounds" crashing occurs
static int StartX = WorldGen.dungeonX < Main.maxTilesX / 2 ? 25 : (Main.maxTilesX - (Main.maxTilesX / 6)) - 25;
static int lavaLakePlaceDelay = 0;
static int lavaLakeBigPlaceDelay = 0;
//basic terrain (also sorry for the excessive amount of loops lmao)
private static void CragsTerrain()
//basic terrain (sorry for the excessive amount of loops lmao)
private static void CragTerrain()
{
//set these before genning just to be safe
StartX = WorldGen.dungeonX < Main.maxTilesX / 2 ? 25 : (Main.maxTilesX - (Main.maxTilesX / 6)) - 25;
int biomeStart = StartX;
int biomeMiddle = (biomeStart + (Main.maxTilesX / 6)) / 2;
int biomeEdge = biomeStart + (Main.maxTilesX / 6);
int biomeMiddle = (biomeStart + biomeEdge) / 2;
//clear all blocks and lava in the area
for (int x = biomeStart; x <= biomeEdge; x++)
@@ -51,7 +56,6 @@ namespace CalamityMod.World
}
//place clusters of slag around the edges of the main square to create a more interesting shape
//this is done after placing the lava lake so it keeps its shape but still has unique terrain
for (int x = biomeStart; x <= biomeEdge; x++)
{
for (int y = Main.maxTilesY - 110; y <= Main.maxTilesY - 5; y++)
@@ -71,30 +75,17 @@ namespace CalamityMod.World
}
}
//oh also place clumps of scorched remains on the terrain too
/*
//TODO: make a better way of generating patches of grass
for (int x = biomeStart; x <= biomeEdge; x++)
{
for (int y = Main.maxTilesY - 110; y <= Main.maxTilesY - 5; y++)
if (WorldGen.genRand.Next(150) == 0)
{
Tile tile = Main.tile[x, y];
Tile tileUp = Main.tile[x, y - 1];
Tile tileDown = Main.tile[x, y + 1];
Tile tileLeft = Main.tile[x - 1, y];
Tile tileRight = Main.tile[x + 1, y];
if (tile.TileType == ModContent.TileType<BrimstoneSlag>() && (tileUp.TileType != ModContent.TileType<BrimstoneSlag>() ||
tileDown.TileType != ModContent.TileType<BrimstoneSlag>() || tileLeft.TileType != ModContent.TileType<BrimstoneSlag>() ||
tileRight.TileType != ModContent.TileType<BrimstoneSlag>()))
{
if (WorldGen.genRand.Next(12) == 0)
{
NaturalCircle(x - 10, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType<ScorchedRemains>());
NaturalCircle(x, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType<ScorchedRemains>());
NaturalCircle(x + 10, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType<ScorchedRemains>());
}
}
WorldGen.TileRunner(x - 20, Main.maxTilesY - 120, WorldGen.genRand.Next(8, 22),
WorldGen.genRand.Next(8, 22), ModContent.TileType<ScorchedRemains>(), false, 0f, 0f, false, true);
}
}
*/
//place ceiling across the top of the biome
for (int x = biomeStart - 20; x <= biomeEdge + 20; x++)
@@ -120,7 +111,7 @@ namespace CalamityMod.World
Tile tileLeft = Main.tile[x - 1, y];
Tile tileRight = Main.tile[x + 1, y];
//place tiles under random slag tiles that are sticking out and look weird
//place tiles under slag tiles that are sticking out and look weird
if (tile.TileType == ModContent.TileType<BrimstoneSlag>() && !tileDown.HasTile)
{
WorldGen.PlaceTile(x, y + 1, (ushort)ModContent.TileType<BrimstoneSlag>());
@@ -157,13 +148,14 @@ namespace CalamityMod.World
}
//surface lava lakes and pits
//the reason theres three different runners being used is so that a shallow lava pit is placed above each lava pit
if (lavaLakeBigPlaceDelay == 0)
{
LavaTileRunner runner1 = new LavaTileRunner(new Vector2(x, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150),
LavaTileRunner runner1 = new LavaTileRunner(new Vector2(x - 10, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150),
new Point16(250, 500), 15f, WorldGen.genRand.Next(200, 300), 0, true, true);
runner1.Start();
LavaTileRunner runner2 = new LavaTileRunner(new Vector2(x, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150),
LavaTileRunner runner2 = new LavaTileRunner(new Vector2(x + 10, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150),
new Point16(250, 500), 15f, WorldGen.genRand.Next(200, 300), 0, true, true);
runner2.Start();
@@ -175,15 +167,15 @@ namespace CalamityMod.World
}
}
//place underground lava veins
//place random blotches of lava underground
for (int x = biomeStart; x <= biomeEdge; x++)
{
for (int y = Main.maxTilesY - 90; y <= Main.maxTilesY - 20; y++)
for (int y = Main.maxTilesY - 100; y <= Main.maxTilesY - 20; y++)
{
if (WorldGen.genRand.Next(750) == 0)
if (WorldGen.genRand.Next(1200) == 0)
{
LavaTileRunner runner = new LavaTileRunner(new Vector2(x, y), new Vector2(-5, 5), new Point16(-1000, 1000),
new Point16(-100, 100), 15f, WorldGen.genRand.Next(12, 25), 0, true, true);
LavaTileRunner runner = new LavaTileRunner(new Vector2(x, y), new Vector2(0, 5), new Point16(-20000, 20000),
new Point16(-12, 12), 15f, WorldGen.genRand.Next(12, 25), 0, true, true);
runner.Start();
}
}
@@ -230,10 +222,26 @@ namespace CalamityMod.World
if (tile.TileType == ModContent.TileType<BrimstoneSlag>() && (tileUp.LiquidAmount > 0 ||
tileDown.LiquidAmount > 0 || tileLeft.LiquidAmount > 0 || tileRight.LiquidAmount > 0))
{
WorldGen.TileRunner(x + WorldGen.genRand.Next(-45, 45), y + WorldGen.genRand.Next(-45, 45),
WorldGen.TileRunner(x + WorldGen.genRand.Next(-22, 22), y + WorldGen.genRand.Next(-22, 22),
WorldGen.genRand.Next(8, 22), WorldGen.genRand.Next(8, 22), ModContent.TileType<CharredOre>(), false, 0f, 0f, false, true);
}
}
bool place = true;
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.CragBridgeKey, new Point(biomeMiddle, Main.maxTilesY - 100), SchematicAnchor.Center, ref place);
for (int x = biomeStart; x <= biomeEdge; x++)
{
for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 5; y++)
{
Tile tile = Main.tile[x, y];
if (tile.LiquidAmount > 0)
{
tile.LiquidType = LiquidID.Lava;
tile.LiquidAmount = 255;
}
}
}
}
//place a circular clump of tiles
@@ -250,10 +258,7 @@ namespace CalamityMod.World
{
Tile tile = Framing.GetTileSafely(x, y);
//if (tile.TileType != ModContent.TileType<ScorchedRemains>())
//{
WorldGen.KillTile(x, y);
//}
WorldGen.KillTile(x, y);
WorldGen.PlaceTile(x, y, tileType);
tile.Slope = 0;
}
@@ -265,7 +270,7 @@ namespace CalamityMod.World
public static void GenCrags()
{
CragsTerrain();
CragTerrain();
}
}
}