-sunken sea generation fixes and improvements done -draedon sunken sea lab changes to compensate for the sunken sea new positions -astral biome now automatically places on ebonstone wall to prevent falling in holes, and also ignores platforms when generating -also fixed some custom skies not deactivating on the main menu
29 lines
854 B
C#
29 lines
854 B
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.Graphics.Effects;
|
|
using Terraria.Graphics.Shaders;
|
|
|
|
namespace CalamityMod.Skies
|
|
{
|
|
public class AstralScreenShaderData : ScreenShaderData
|
|
{
|
|
public AstralScreenShaderData(Ref<Effect> shader, string passName) : base(shader, passName) { }
|
|
|
|
public override void Apply()
|
|
{
|
|
Vector3 vec = Main.ColorOfTheSkies.ToVector3();
|
|
vec *= 0.4f;
|
|
base.UseOpacity(Math.Max(vec.X, Math.Max(vec.Y, vec.Z)));
|
|
base.Apply();
|
|
}
|
|
|
|
public override void Update(GameTime gameTime)
|
|
{
|
|
if (!Main.LocalPlayer.Calamity().ZoneAstral || Main.gameMenu)
|
|
Filters.Scene["CalamityMod:Astral"].Deactivate(Array.Empty<object>());
|
|
}
|
|
}
|
|
}
|