-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBahiaMod.cs
92 lines (84 loc) · 3.04 KB
/
BahiaMod.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using Terraria;
using Terraria.ModLoader;
using Terraria.GameContent.Events;
using Terraria.ID;
using System.Reflection;
using System;
namespace BahiaMod
{
public class BahiaMod : Mod
{
private static MethodInfo _startRainMethod = typeof(Main).GetMethod("StartRain", BindingFlags.NonPublic | BindingFlags.Static);
private static MethodInfo _stopRainMethod = typeof(Main).GetMethod("StopRain", BindingFlags.NonPublic | BindingFlags.Static);
private static MethodInfo _startSandstormMethod = typeof(Sandstorm).GetMethod("StartSandstorm", BindingFlags.NonPublic | BindingFlags.Static);
private static MethodInfo _stopSandstormMethod = typeof(Sandstorm).GetMethod("StopSandstorm", BindingFlags.NonPublic | BindingFlags.Static);
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.BlinkrootSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Blinkroot, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.DaybloomSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Daybloom, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.DeathweedSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Deathweed, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.FireblossomSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Fireblossom, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.MoonglowSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Moonglow, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.ShiverthornSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Shiverthorn, 2);
recipe.AddRecipe();
recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.WaterleafSeeds);
recipe.AddIngredient(null, "OtherworldlyEssence");
recipe.AddIngredient(null, "Offering");
recipe.AddTile(null, "EshuCarpet");
recipe.SetResult(ItemID.Waterleaf, 2);
recipe.AddRecipe();
}
public static void StartRain()
{
_startRainMethod.Invoke(null, null);
}
public static void StopRain()
{
_stopRainMethod.Invoke(null, null);
}
public static void StartSandstorm()
{
_startSandstormMethod.Invoke(null, null);
}
public static void StopSandstorm()
{
_stopSandstormMethod.Invoke(null, null);
}
}
}