@@ -33,9 +33,15 @@ public class EngulfedMicrobesAbove : StatisticBasedUnlockCondition
33
33
[ JsonProperty ]
34
34
public int Required { get ; set ; }
35
35
36
- public override bool Satisfied ( IUnlockStateDataSource data ) => Engulfed ( data ) >= Required ;
36
+ public override bool Satisfied ( IUnlockStateDataSource data )
37
+ {
38
+ return Engulfed ( data ) >= Required ;
39
+ }
40
+
37
41
public override float Progress ( IUnlockStateDataSource data )
38
- => Math . Clamp ( ( float ) ( Engulfed ( data ) ?? 0 ) / Required , 0 , 1 ) ;
42
+ {
43
+ return Math . Clamp ( ( float ) ( Engulfed ( data ) ?? 0 ) / Required , 0 , 1 ) ;
44
+ }
39
45
40
46
public override void GenerateTooltip ( LocalizedStringBuilder builder , IUnlockStateDataSource data )
41
47
{
@@ -61,9 +67,15 @@ public class DigestedMicrobesAbove : StatisticBasedUnlockCondition
61
67
[ JsonProperty ]
62
68
public int Required { get ; set ; }
63
69
64
- public override bool Satisfied ( IUnlockStateDataSource data ) => Digested ( data ) >= Required ;
70
+ public override bool Satisfied ( IUnlockStateDataSource data )
71
+ {
72
+ return Digested ( data ) >= Required ;
73
+ }
74
+
65
75
public override float Progress ( IUnlockStateDataSource data )
66
- => Math . Clamp ( ( float ) ( Digested ( data ) ?? 0 ) / Required , 0 , 1 ) ;
76
+ {
77
+ return Math . Clamp ( ( float ) ( Digested ( data ) ?? 0 ) / Required , 0 , 1 ) ;
78
+ }
67
79
68
80
public override void GenerateTooltip ( LocalizedStringBuilder builder , IUnlockStateDataSource data )
69
81
{
@@ -92,9 +104,15 @@ public class PlayerDeathsAbove : StatisticBasedUnlockCondition
92
104
[ JsonProperty ]
93
105
public int Required { get ; set ; }
94
106
95
- public override bool Satisfied ( IUnlockStateDataSource data ) => PlayerDeaths ( data ) >= Required ;
107
+ public override bool Satisfied ( IUnlockStateDataSource data )
108
+ {
109
+ return PlayerDeaths ( data ) >= Required ;
110
+ }
111
+
96
112
public override float Progress ( IUnlockStateDataSource data )
97
- => Math . Clamp ( ( float ) ( PlayerDeaths ( data ) ?? 0 ) / Required , 0 , 1 ) ;
113
+ {
114
+ return Math . Clamp ( ( float ) ( PlayerDeaths ( data ) ?? 0 ) / Required , 0 , 1 ) ;
115
+ }
98
116
99
117
public override void GenerateTooltip ( LocalizedStringBuilder builder , IUnlockStateDataSource data )
100
118
{
@@ -141,7 +159,10 @@ public override bool Satisfied(IUnlockStateDataSource data)
141
159
return count >= 1 ;
142
160
}
143
161
144
- public override float Progress ( IUnlockStateDataSource data ) => Satisfied ( data ) ? 1 : 0 ;
162
+ public override float Progress ( IUnlockStateDataSource data )
163
+ {
164
+ return Satisfied ( data ) ? 1 : 0 ;
165
+ }
145
166
146
167
public override void Check ( string name )
147
168
{
@@ -199,10 +220,15 @@ public override void GenerateTooltip(LocalizedStringBuilder builder, IUnlockStat
199
220
}
200
221
}
201
222
202
- public override bool Satisfied ( IUnlockStateDataSource data1 ) => CalculateCount ( data1 ) >= Generations ;
223
+ public override bool Satisfied ( IUnlockStateDataSource data1 )
224
+ {
225
+ return CalculateCount ( data1 ) >= Generations ;
226
+ }
203
227
204
228
public override float Progress ( IUnlockStateDataSource data1 )
205
- => Math . Clamp ( ( float ) ( CalculateCount ( data1 ) ?? 0 ) / Generations , 0 , 1 ) ;
229
+ {
230
+ return Math . Clamp ( ( float ) ( CalculateCount ( data1 ) ?? 0 ) / Generations , 0 , 1 ) ;
231
+ }
206
232
207
233
public override void Check ( string name )
208
234
{
@@ -269,9 +295,15 @@ public class DamageFromSource : StatisticBasedUnlockCondition
269
295
[ JsonProperty ( "Amount" ) ]
270
296
public float RequiredAmount { get ; set ; }
271
297
272
- public override bool Satisfied ( IUnlockStateDataSource data ) => Damage ( data ) >= RequiredAmount ;
298
+ public override bool Satisfied ( IUnlockStateDataSource data )
299
+ {
300
+ return Damage ( data ) >= RequiredAmount ;
301
+ }
302
+
273
303
public override float Progress ( IUnlockStateDataSource data )
274
- => Math . Clamp ( ( Damage ( data ) ?? 0 ) / RequiredAmount , 0 , 1 ) ;
304
+ {
305
+ return Math . Clamp ( ( Damage ( data ) ?? 0 ) / RequiredAmount , 0 , 1 ) ;
306
+ }
275
307
276
308
public override void GenerateTooltip ( LocalizedStringBuilder builder , IUnlockStateDataSource data )
277
309
{
0 commit comments