summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Inheritance/Menus/SBobberBar.cs
blob: 1e424f7337615bf4836f983b93415318e3ac8f69 (plain)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
using System.Reflection;
using Microsoft.Xna.Framework;
using StardewValley.BellsAndWhistles;
using StardewValley.Menus;

namespace StardewModdingAPI.Inheritance.Menus
{
    public class SBobberBar : BobberBar
    {
        /// <summary>
        ///     DO NOT CONSTRUCT THIS CLASS
        ///     To retrieve an instance of SBobberBar, use SBobberBar.ConstructFromBaseClass()
        /// </summary>
        public SBobberBar(int whichFish, float fishSize, bool treasure, int bobber) : base(whichFish, fishSize, treasure, bobber)
        {
        }

        public BobberBar BaseBobberBar { get; private set; }

        /// <summary>
        ///     The green rectangle bar that moves up and down
        /// </summary>
        public float bobberPosition
        {
            get { return (float) GetBaseFieldInfo("bobberPosition").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberPosition").SetValue(BaseBobberBar, value); }
        }

        /// <summary>
        ///     The green bar on the right. How close to catching the fish you are
        ///     Range: 0 - 1 | 1 = catch, 0 = fail
        /// </summary>
        public float distanceFromCatching
        {
            get { return (float) GetBaseFieldInfo("distanceFromCatching").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("distanceFromCatching").SetValue(BaseBobberBar, value); }
        }

        public float difficulty
        {
            get { return (float) GetBaseFieldInfo("difficulty").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("difficulty").SetValue(BaseBobberBar, value); }
        }

        public int motionType
        {
            get { return (int) GetBaseFieldInfo("motionType").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("motionType").SetValue(BaseBobberBar, value); }
        }

        public int whichFish
        {
            get { return (int) GetBaseFieldInfo("whichFish").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("whichFish").SetValue(BaseBobberBar, value); }
        }

        public float bobberSpeed
        {
            get { return (float) GetBaseFieldInfo("bobberSpeed").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberSpeed").SetValue(BaseBobberBar, value); }
        }

        public float bobberAcceleration
        {
            get { return (float) GetBaseFieldInfo("bobberAcceleration").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberAcceleration").SetValue(BaseBobberBar, value); }
        }

        public float bobberTargetPosition
        {
            get { return (float) GetBaseFieldInfo("bobberTargetPosition").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberTargetPosition").SetValue(BaseBobberBar, value); }
        }

        public float scale
        {
            get { return (float) GetBaseFieldInfo("scale").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("scale").SetValue(BaseBobberBar, value); }
        }

        public float everythingShakeTimer
        {
            get { return (float) GetBaseFieldInfo("everythingShakeTimer").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("everythingShakeTimer").SetValue(BaseBobberBar, value); }
        }

        public float floaterSinkerAcceleration
        {
            get { return (float) GetBaseFieldInfo("floaterSinkerAcceleration").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("floaterSinkerAcceleration").SetValue(BaseBobberBar, value); }
        }

        public float treasurePosition
        {
            get { return (float) GetBaseFieldInfo("treasurePosition").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasurePosition").SetValue(BaseBobberBar, value); }
        }

        public float treasureCatchLevel
        {
            get { return (float) GetBaseFieldInfo("treasureCatchLevel").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasureCatchLevel").SetValue(BaseBobberBar, value); }
        }

        public float treasureAppearTimer
        {
            get { return (float) GetBaseFieldInfo("treasureAppearTimer").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasureAppearTimer").SetValue(BaseBobberBar, value); }
        }

        public float treasureScale
        {
            get { return (float) GetBaseFieldInfo("treasureScale").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasureScale").SetValue(BaseBobberBar, value); }
        }

        public bool bobberInBar
        {
            get { return (bool) GetBaseFieldInfo("bobberInBar").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberInBar").SetValue(BaseBobberBar, value); }
        }

        public bool buttonPressed
        {
            get { return (bool) GetBaseFieldInfo("buttonPressed").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("buttonPressed").SetValue(BaseBobberBar, value); }
        }

        public bool flipBubble
        {
            get { return (bool) GetBaseFieldInfo("flipBubble").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("flipBubble").SetValue(BaseBobberBar, value); }
        }

        public bool fadeIn
        {
            get { return (bool) GetBaseFieldInfo("fadeIn").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("fadeIn").SetValue(BaseBobberBar, value); }
        }

        public bool fadeOut
        {
            get { return (bool) GetBaseFieldInfo("fadeOut").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberPfadeOutosition").SetValue(BaseBobberBar, value); }
        }

        /// <summary>
        ///     Whether or not a treasure chest appears
        /// </summary>
        public bool treasure
        {
            get { return (bool) GetBaseFieldInfo("treasure").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasure").SetValue(BaseBobberBar, value); }
        }

        public bool treasureCaught
        {
            get { return (bool) GetBaseFieldInfo("treasureCaught").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasureCaught").SetValue(BaseBobberBar, value); }
        }

        public bool perfect
        {
            get { return (bool) GetBaseFieldInfo("perfect").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("perfect").SetValue(BaseBobberBar, value); }
        }

        public bool bossFish
        {
            get { return (bool) GetBaseFieldInfo("bossFish").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bossFish").SetValue(BaseBobberBar, value); }
        }

        public int bobberBarHeight
        {
            get { return (int) GetBaseFieldInfo("bobberBarHeight").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberBarHeight").SetValue(BaseBobberBar, value); }
        }

        public int fishSize
        {
            get { return (int) GetBaseFieldInfo("fishSize").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("fishSize").SetValue(BaseBobberBar, value); }
        }

        public int fishQuality
        {
            get { return (int) GetBaseFieldInfo("fishQuality").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("fishQuality").SetValue(BaseBobberBar, value); }
        }

        public int minFishSize
        {
            get { return (int) GetBaseFieldInfo("minFishSize").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("minFishSize").SetValue(BaseBobberBar, value); }
        }

        public int maxFishSize
        {
            get { return (int) GetBaseFieldInfo("maxFishSize").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("maxFishSize").SetValue(BaseBobberBar, value); }
        }

        public int fishSizeReductionTimer
        {
            get { return (int) GetBaseFieldInfo("fishSizeReductionTimer").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("fishSizeReductionTimer").SetValue(BaseBobberBar, value); }
        }

        public int whichBobber
        {
            get { return (int) GetBaseFieldInfo("whichBobber").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("whichBobber").SetValue(BaseBobberBar, value); }
        }

        public Vector2 barShake
        {
            get { return (Vector2) GetBaseFieldInfo("barShake").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("barShake").SetValue(BaseBobberBar, value); }
        }

        public Vector2 fishShake
        {
            get { return (Vector2) GetBaseFieldInfo("fishShake").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("fishShake").SetValue(BaseBobberBar, value); }
        }

        public Vector2 everythingShake
        {
            get { return (Vector2) GetBaseFieldInfo("everythingShake").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("everythingShake").SetValue(BaseBobberBar, value); }
        }

        public Vector2 treasureShake
        {
            get { return (Vector2) GetBaseFieldInfo("treasureShake").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("treasureShake").SetValue(BaseBobberBar, value); }
        }

        public float reelRotation
        {
            get { return (float) GetBaseFieldInfo("reelRotation").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("reelRotation").SetValue(BaseBobberBar, value); }
        }

        public SparklingText sparkleText
        {
            get { return (SparklingText) GetBaseFieldInfo("sparkleText").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("sparkleText").SetValue(BaseBobberBar, value); }
        }

        public float bobberBarPos
        {
            get { return (float) GetBaseFieldInfo("bobberBarPos").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberBarPos").SetValue(BaseBobberBar, value); }
        }

        public float bobberBarSpeed
        {
            get { return (float) GetBaseFieldInfo("bobberBarSpeed").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberBarSpeed").SetValue(BaseBobberBar, value); }
        }

        public float bobberBarAcceleration
        {
            get { return (float) GetBaseFieldInfo("bobberBarAcceleration").GetValue(BaseBobberBar); }
            set { GetBaseFieldInfo("bobberBarAcceleration").SetValue(BaseBobberBar, value); }
        }

        public static FieldInfo[] PrivateFields => GetPrivateFields();

        public static SBobberBar ConstructFromBaseClass(BobberBar baseClass)
        {
            var b = new SBobberBar(0, 0, false, 0) {BaseBobberBar = baseClass};
            return b;
        }

        public static FieldInfo[] GetPrivateFields()
        {
            return typeof(BobberBar).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
        }

        public static FieldInfo GetBaseFieldInfo(string name)
        {
            return typeof(BobberBar).GetField(name, BindingFlags.Instance | BindingFlags.NonPublic);
        }
    }
}