requested Iron Ball changes
This commit is contained in:
1 parent
14e23dadcd
commit
6d45201715
3 files changed
+13
-3
No files matched your search
@@ -6,6 +6,7 @@ Ribs: Ribs
|
||||
Stalagmite: Stalagmite
|
||||
Stalactite: Stalactite
|
||||
PirateCrate: Abandoned Crate
|
||||
IronBall: Iron Ball
|
||||
// Basic Calamity Furniture
|
||||
Basin: Basin
|
||||
LavaFountain: Lava Fountain
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace CalamityMod.Tiles
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileSpelunker[Type] = true;
|
||||
Main.tileOreFinderPriority[Type] = 770; // Same as Chillet
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
@@ -34,7 +36,7 @@ namespace CalamityMod.Tiles
|
||||
|
||||
DustType = DustID.Silver;
|
||||
|
||||
AddMapEntry(new Color(108, 118, 134));
|
||||
AddMapEntry(new Color(108, 118, 134), CalamityUtils.GetText("Tiles.IronBall"));
|
||||
RegisterItemDrop(ModContent.ItemType<IronBall>());
|
||||
FlexibleTileWand.RubblePlacementSmall.AddVariations(ModContent.ItemType<IronBall>(), Type, 0);
|
||||
}
|
||||
|
||||
@@ -572,10 +572,17 @@ namespace CalamityMod.World
|
||||
int ballID = ModContent.TileType<IronBallPlaced>();
|
||||
int attempts = 0;
|
||||
int ballsPlaced = 0;
|
||||
int maxBalls = 8;
|
||||
int worldSize = WorldGen.GetWorldSize();
|
||||
// Same amount as Chillet
|
||||
int maxBalls = worldSize switch
|
||||
{
|
||||
1 => 9,
|
||||
2 => 12,
|
||||
_ => 6,
|
||||
};
|
||||
while (attempts < 10000)
|
||||
{
|
||||
Point location = new Point(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)Main.rockLayer, Main.UnderworldLayer));
|
||||
Point location = new Point(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next((int)Main.rockLayer, Main.UnderworldLayer));
|
||||
Tile t = CalamityUtils.ParanoidTileRetrieval(location.X, location.Y);
|
||||
Tile above = CalamityUtils.ParanoidTileRetrieval(location.X, location.Y - 1);
|
||||
if (t.TileType == TileID.Stone && t.HasTile && !above.HasTile)
|
||||
|
||||
Reference in new issue
Block a user