-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMasomodeDLC.cs
73 lines (57 loc) · 2.68 KB
/
MasomodeDLC.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace MasomodeDLC
{
public class MasomodeDLC : Mod
{
private readonly Mod Thorium = ModLoader.GetMod("ThoriumMod");
private readonly Mod Calamity = ModLoader.GetMod("CalamityMod");
//private readonly Mod Redemption = ModLoader.GetMod("Redemption");
public MasomodeDLC()
{
}
public override void Load()
{
if (Main.netMode != NetmodeID.Server)
{
Ref<Effect> clouds = new Ref<Effect>(GetEffect("Effects/Clouds"));
Filters.Scene["CloudFilter"] = new Filter(new ScreenShaderData(clouds, "CreateClouds"), EffectPriority.VeryHigh);
Filters.Scene["CloudFilter"].Load();
}
}
public static bool NoInvasion(NPCSpawnInfo spawnInfo) => !spawnInfo.invasion && (!Main.pumpkinMoon && !Main.snowMoon || spawnInfo.spawnTileY > Main.worldSurface || Main.dayTime) &&
(!Main.eclipse || spawnInfo.spawnTileY > Main.worldSurface || !Main.dayTime);
public static bool NoBiome(NPCSpawnInfo spawnInfo)
{
Player player = spawnInfo.player;
return !player.ZoneJungle && !player.ZoneDungeon && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneSnow && !player.ZoneUndergroundDesert;
}
public static bool NoZoneAllowWater(NPCSpawnInfo spawnInfo) => !spawnInfo.sky && !spawnInfo.player.ZoneMeteor && !spawnInfo.spiderCave;
public static bool NoZone(NPCSpawnInfo spawnInfo) => NoZoneAllowWater(spawnInfo) && !spawnInfo.water;
public static bool NormalSpawn(NPCSpawnInfo spawnInfo) => !spawnInfo.playerInTown && NoInvasion(spawnInfo);
public static bool NoZoneNormalSpawn(NPCSpawnInfo spawnInfo) => NormalSpawn(spawnInfo) && NoZone(spawnInfo);
public static bool NoZoneNormalSpawnAllowWater(NPCSpawnInfo spawnInfo) => NormalSpawn(spawnInfo) && NoZoneAllowWater(spawnInfo);
public static bool NoBiomeNormalSpawn(NPCSpawnInfo spawnInfo) => NormalSpawn(spawnInfo) && NoBiome(spawnInfo) && NoZone(spawnInfo);
public override void PostSetupContent()
{
base.PostSetupContent();
}
public override void Unload()
{
}
public override void UpdateMusic(ref int music, ref MusicPriority priority)
{
/* TODO: get more music for these easter eggs, we have redemption
if(Thorium != null)
{
}
if (Calamity != null)
{
}*/
}
}
}