96 lines
3.8 KiB
C#
96 lines
3.8 KiB
C#
using CalamityMod.NPCs.ExoMechs;
|
|
using CalamityMod.NPCs.ExoMechs.Apollo;
|
|
using CalamityMod.NPCs.ExoMechs.Ares;
|
|
using CalamityMod.NPCs.ExoMechs.Artemis;
|
|
using CalamityMod.NPCs.ExoMechs.Thanatos;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.World
|
|
{
|
|
// For the sake of ease of access of variables this class remains in its current form (there are likely thousands of references by now).
|
|
// However, all functionalities in the form of hooks have been cleared away in favor of split systems.
|
|
public static class CalamityWorld
|
|
{
|
|
#region Vars
|
|
public static int ArmoredDiggerSpawnCooldown = 0;
|
|
public static int MoneyStolenByBandit = 0;
|
|
public static int Reforges;
|
|
public static bool IsWorldAfterDraedonUpdate = false;
|
|
public static ushort[] OreTypes = new ushort[4];
|
|
|
|
// Modes
|
|
public static bool onionMode = false; // Extra accessory from Moon Lord
|
|
public static bool revenge = false; // Revengeance Mode
|
|
public static bool death = false; // Death Mode
|
|
public static bool armageddon = false; // Armageddon Mode
|
|
public static bool LegendaryMode => Main.getGoodWorld && Main.masterMode; // Evaluates to whether vanilla's "Legendary Mode" is enabled (Master Mode on For the Worthy)
|
|
|
|
// TODO -- This is intentionally a constant so that all relevant code gets compiled out, or at the very least cannot be re-enabled without extensive IL editing.
|
|
// When the 1.4.4 port occurs, this will be changed to a property which retrieves Main.zenithWorld.
|
|
internal const bool getFixedBoi = false; // True when the "get fixed boi" (aka "Zenith") seed is active, which combines all other seeds.
|
|
|
|
// Sunken Sea
|
|
public static Rectangle SunkenSeaLocation = Rectangle.Empty;
|
|
|
|
// Shrines
|
|
public static int[] SChestX = new int[10];
|
|
public static int[] SChestY = new int[10];
|
|
public static bool roxShrinePlaced = false;
|
|
|
|
// Planetoids
|
|
public static bool HasGeneratedLuminitePlanetoids = false;
|
|
|
|
// Town NPC spawn/home bools
|
|
public static bool spawnedBandit = false;
|
|
public static bool spawnedCirrus = false;
|
|
public static bool foundHomePermafrost = false;
|
|
|
|
// Town Pet name chosen bools
|
|
public static bool catName = false;
|
|
public static bool dogName = false;
|
|
public static bool bunnyName = false;
|
|
|
|
// Draedon Summoning stuff.
|
|
public static int DraedonSummonCountdown = 0;
|
|
public static ExoMech DraedonMechToSummon;
|
|
public static Vector2 DraedonSummonPosition = Vector2.Zero;
|
|
public static bool TalkedToDraedon = false;
|
|
public static bool DraedonMechdusa = false;
|
|
public static bool AbleToSummonDraedon
|
|
{
|
|
get
|
|
{
|
|
if (DraedonSummonCountdown > 0)
|
|
return false;
|
|
|
|
if (NPC.AnyNPCs(ModContent.NPCType<Draedon>()))
|
|
return false;
|
|
|
|
if (NPC.AnyNPCs(ModContent.NPCType<ThanatosHead>()))
|
|
return false;
|
|
|
|
if (NPC.AnyNPCs(ModContent.NPCType<AresBody>()))
|
|
return false;
|
|
|
|
if (NPC.AnyNPCs(ModContent.NPCType<Artemis>()) || NPC.AnyNPCs(ModContent.NPCType<Apollo>()))
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
}
|
|
public const int DraedonSummonCountdownMax = 260;
|
|
|
|
// Draedon Lab Locations.
|
|
public static Vector2 SunkenSeaLabCenter;
|
|
public static Vector2 PlanetoidLabCenter;
|
|
public static Vector2 JungleLabCenter;
|
|
public static Vector2 HellLabCenter;
|
|
public static Vector2 IceLabCenter;
|
|
public static Vector2 CavernLabCenter;
|
|
|
|
#endregion
|
|
}
|
|
}
|