Layer 3 plants and sulpher sea wall tweeks
No files matched your search
@@ -0,0 +1,60 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using System;
|
||||
using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss.AbyssAmbient
|
||||
{
|
||||
public class PhoviamareHalm : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileCut[Type] = true;
|
||||
Main.tileSolid[Type] = false;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileNoFail[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileID.Sets.ReplaceTileBreakUp[Type] = true;
|
||||
TileID.Sets.SwaysInWindBasic[Type] = true;
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
||||
TileObjectData.addTile(Type);
|
||||
AddMapEntry(new Color(86, 33, 33));
|
||||
DustType = DustID.Grass;
|
||||
HitSound = SoundID.Grass;
|
||||
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
|
||||
{
|
||||
offsetY = -30;
|
||||
height = 48;
|
||||
}
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
{
|
||||
float brightness = 0.7f;
|
||||
float declareThisHereToPreventRunningTheSameCalculationMultipleTimes = Main.GameUpdateCount * 0.01f;
|
||||
brightness *= (float)MathF.Sin(-j / 8f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes + i);
|
||||
brightness *= (float)MathF.Sin(-i / 8f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes + j);
|
||||
brightness += 0.7f;
|
||||
r = 191f / 350f;
|
||||
g = 85f / 350f;
|
||||
b = 28f / 350f;
|
||||
r *= brightness;
|
||||
g *= brightness;
|
||||
b *= brightness;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -41,6 +41,29 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
//place Phoviamare Halm
|
||||
if (WorldGen.genRand.Next(12) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<PhoviamareHalm>();
|
||||
up.HasTile = true;
|
||||
up.TileFrameY = 0;
|
||||
|
||||
//16 different frames, choose a random one
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(16) * 18);
|
||||
WorldGen.SquareTileFrame(i, j - 1, true);
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
|
||||
@@ -54,15 +54,15 @@ namespace CalamityMod.Tiles.Abyss
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
//place kelp
|
||||
if (WorldGen.genRand.Next(25) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
//place PhoviamareHalm
|
||||
if (WorldGen.genRand.Next(12) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock)
|
||||
{
|
||||
up.TileType = (ushort)ModContent.TileType<AbyssKelp>();
|
||||
up.TileType = (ushort)ModContent.TileType<PhoviamareHalm>();
|
||||
up.HasTile = true;
|
||||
up.TileFrameY = 0;
|
||||
|
||||
//7 different frames, choose a random one
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(7) * 18);
|
||||
//16 different frames, choose a random one
|
||||
up.TileFrameX = (short)(WorldGen.genRand.Next(16) * 18);
|
||||
WorldGen.SquareTileFrame(i, j - 1, true);
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace CalamityMod.Tiles
|
||||
(ushort)ModContent.TileType<SulphurTentacleCorals>(),
|
||||
(ushort)ModContent.TileType<AbyssKelp>(),
|
||||
(ushort)ModContent.TileType<TenebrisRemnant>(),
|
||||
(ushort)ModContent.TileType<PhoviamareHalm>(),
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -64,8 +64,9 @@ namespace CalamityMod
|
||||
PlantCheckAgainst[ModContent.TileType<AstralTallPlants>()] = new int[1] { ModContent.TileType<AstralGrass>() };
|
||||
PlantCheckAgainst[ModContent.TileType<CinderBlossomTallPlants>()] = new int[1] { ModContent.TileType<ScorchedRemainsGrass>() };
|
||||
PlantCheckAgainst[ModContent.TileType<SulphurTentacleCorals>()] = new int[1] { ModContent.TileType<SulphurousShale>() };
|
||||
PlantCheckAgainst[ModContent.TileType<AbyssKelp>()] = new int[2] { ModContent.TileType<AbyssGravel>(), ModContent.TileType<PyreMantle>()};
|
||||
PlantCheckAgainst[ModContent.TileType<AbyssKelp>()] = new int[1] { ModContent.TileType<AbyssGravel>() };
|
||||
PlantCheckAgainst[ModContent.TileType<TenebrisRemnant>()] = new int[1] { ModContent.TileType<Voidstone>() };
|
||||
PlantCheckAgainst[ModContent.TileType<PhoviamareHalm>()] = new int[2] { ModContent.TileType<PyreMantle>(), ModContent.TileType<PyreMantleMolten>() };
|
||||
|
||||
VineToGrass = new Dictionary<ushort, ushort>
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.9 KiB |