1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using UnityEngine ;
4
- using static KeepCoding . ComponentPool ;
5
- using static Localization ;
6
- using Connection = IRCConnection ;
7
- using KTInput = KTInputManager ;
8
- using KTMod = ModManager ;
9
- using KTPlayer = Assets . Scripts . Settings . PlayerSettingsManager ;
10
- using KTScene = SceneManager ;
11
- using KTModSourceEnum = Assets . Scripts . Mods . ModInfo . ModSourceEnum ;
12
4
13
5
namespace KeepCoding
14
6
{
@@ -88,19 +80,19 @@ public static class IRCConnection
88
80
/// Sends a message to the chat.
89
81
/// </value>
90
82
/// <remarks>Arguments: <c>message</c>.</remarks>
91
- public static Action < string > SendMessage => Connection . SendMessage ;
83
+ public static Action < string > SendMessage => message => Debug . Log ( $ "Sending message to chat: { message } " ) ;
92
84
93
85
/// <value>
94
86
/// Sends a message to the chat.
95
87
/// </value>
96
88
/// <remarks>Arguments: <c>message</c> and <c>args</c>.</remarks>
97
- public static Action < string , object [ ] > SendMessageFormat => Connection . SendMessageFormat ;
98
-
89
+ public static Action < string , object [ ] > SendMessageFormat => ( message , args ) => Debug . Log ( $ "Sending message to chat: { message . Form ( args ) } " ) ;
90
+
99
91
/// <value>
100
92
/// Whispers a message to a person.
101
93
/// </value>
102
94
/// <remarks>Arguments: <c>userNickName</c>, <c>message</c>, and <c>args</c>.</remarks>
103
- public static Action < string , string , object [ ] > SendWhisper => Connection . SendWhisper ;
95
+ public static Action < string , string , object [ ] > SendWhisper => ( userNickName , message , args ) => Debug . Log ( $ "Whispering message to user { userNickName } : { message . Form ( args ) } " ) ;
104
96
}
105
97
106
98
/// <summary>
@@ -116,7 +108,7 @@ public static class KTInputManager
116
108
/// <value>
117
109
/// The current way the game is being controlled.
118
110
/// </value>
119
- public static ControlType CurrentControlType => ( ControlType ) KTInput . Instance . CurrentControlType ;
111
+ public static ControlType CurrentControlType => ControlType . Mouse ;
120
112
}
121
113
122
114
/// <summary>
@@ -127,58 +119,27 @@ public static class Mission
127
119
/// <value>
128
120
/// Determines whether or not all pacing events are enabled.
129
121
/// </value>
130
- public static bool IsPacingEvents => KTScene . Instance . GameplayState . Mission . PacingEventsEnabled ;
122
+ public static bool IsPacingEvents => false ;
131
123
132
124
/// <value>
133
125
/// The description as it appears in the bomb binder.
134
126
/// </value>
135
- public static string Description => GetLocalizedString ( KTScene . Instance . GameplayState . Mission . DescriptionTerm ) ;
127
+ public static string Description => "Everybody has to start somewhere. Let's just hope it doesn't end here too. \n \n Make sure your experts have the manual and are ready to help." ;
136
128
137
129
/// <value>
138
130
/// The mission name as it appears in the bomb binder.
139
131
/// </value>
140
- public static string DisplayName => GetLocalizedString ( KTScene . Instance . GameplayState . Mission . DisplayNameTerm ) ;
132
+ public static string DisplayName => "The First Bomb" ;
141
133
142
134
/// <value>
143
135
/// The ID of the mission.
144
136
/// </value>
145
- public static string ID => KTScene . Instance . GameplayState . Mission . ID ;
137
+ public static string ID => "firsttime" ;
146
138
147
139
/// <value>
148
140
/// Gets the generator setting of the mission.
149
141
/// </value>
150
- public static GeneratorSetting GeneratorSetting
151
- {
152
- get
153
- {
154
- var setting = KTScene . Instance . GameplayState . Mission . GeneratorSetting ;
155
-
156
- var list = new List < ComponentPool > ( ) ;
157
-
158
- foreach ( var pool in setting . ComponentPools )
159
- {
160
- var types = new List < ComponentTypeEnum > ( ) ;
161
-
162
- foreach ( var type in pool . ComponentTypes )
163
- types . Add ( ( ComponentTypeEnum ) type ) ;
164
-
165
- list . Add ( new ComponentPool (
166
- pool . Count ,
167
- ( ComponentSource ) pool . AllowedSources ,
168
- ( SpecialComponentTypeEnum ) pool . SpecialComponentType ,
169
- pool . ModTypes ,
170
- types ) ) ;
171
- }
172
-
173
- return new GeneratorSetting (
174
- setting . FrontFaceOnly ,
175
- setting . OptionalWidgetCount ,
176
- setting . NumStrikes ,
177
- setting . TimeBeforeNeedyActivation ,
178
- setting . TimeLimit ,
179
- list ) ;
180
- }
181
- }
142
+ public static GeneratorSetting GeneratorSetting => new GeneratorSetting ( ) ;
182
143
}
183
144
184
145
/// <summary>
@@ -189,17 +150,17 @@ public static class ModManager
189
150
/// <value>
190
151
/// Gets all of the disabled mod paths.
191
152
/// </value>
192
- public static Func < List < string > > GetDisabledModPaths => KTMod . Instance . GetDisabledModPaths ;
153
+ public static Func < List < string > > GetDisabledModPaths => ( ) => new List < string > ( ) ;
193
154
194
155
/// <value>
195
156
/// Gets all of the mod paths within the <see cref="ModSourceEnum"/> constraint.
196
157
/// </value>
197
- public static Func < ModSourceEnum , List < string > > GetAllModPathsFromSource => source => KTMod . Instance . GetAllModPathsFromSource ( ( KTModSourceEnum ) source ) ;
158
+ public static Func < ModSourceEnum , List < string > > GetAllModPathsFromSource => source => new List < string > ( ) ;
198
159
199
160
/// <value>
200
161
/// Gets all of the enabled mod paths within the <see cref="ModSourceEnum"/> constraint.
201
162
/// </value>
202
- public static Func < ModSourceEnum , List < string > > GetEnabledModPaths => source => KTMod . Instance . GetEnabledModPaths ( ( KTModSourceEnum ) source ) ;
163
+ public static Func < ModSourceEnum , List < string > > GetEnabledModPaths => source => new List < string > ( ) ;
203
164
}
204
165
205
166
/// <summary>
@@ -210,118 +171,108 @@ public static class PlayerSettings
210
171
/// <value>
211
172
/// Determines if vertical tilting is flipped or not.
212
173
/// </value>
213
- public static bool InvertTiltControls => KTPlayer . Instance . PlayerSettings . InvertTiltControls ;
174
+ public static bool InvertTiltControls => false ;
214
175
215
176
/// <value>
216
177
/// Determines if the option to lock the mouse to the window is enabled.
217
178
/// </value>
218
- public static bool LockMouseToWindow => KTPlayer . Instance . PlayerSettings . LockMouseToWindow ;
179
+ public static bool LockMouseToWindow => false ;
219
180
220
181
/// <value>
221
182
/// Determines if the option to show the leaderboards from the pamphlet.
222
183
/// </value>
223
- public static bool ShowLeaderBoards => KTPlayer . Instance . PlayerSettings . ShowLeaderBoards ;
184
+ public static bool ShowLeaderBoards => true ;
224
185
225
186
/// <value>
226
187
/// Determines if the option to show the rotation of the User Interface is enabled.
227
188
/// </value>
228
- public static bool ShowRotationUI => KTPlayer . Instance . PlayerSettings . ShowRotationUI ;
189
+ public static bool ShowRotationUI => true ;
229
190
230
191
/// <value>
231
192
/// Determines if the option to show scanlines is enabled.
232
193
/// </value>
233
- public static bool ShowScanline => KTPlayer . Instance . PlayerSettings . ShowScanline ;
194
+ public static bool ShowScanline => true ;
234
195
235
196
/// <value>
236
197
/// Determines if the option to skip the title screen is enabled.
237
198
/// </value>
238
- public static bool SkipTitleScreen => KTPlayer . Instance . PlayerSettings . SkipTitleScreen ;
199
+ public static bool SkipTitleScreen => false ;
239
200
240
201
/// <value>
241
202
/// Determines if the VR or regular controllers vibrate.
242
203
/// </value>
243
- public static bool RumbleEnabled => KTPlayer . Instance . PlayerSettings . RumbleEnabled ;
204
+ public static bool RumbleEnabled => false ;
244
205
245
206
/// <value>
246
207
/// Determines if the touchpad controls are inverted.
247
208
/// </value>
248
- public static bool TouchpadInvert => KTPlayer . Instance . PlayerSettings . TouchpadInvert ;
209
+ public static bool TouchpadInvert => false ;
249
210
250
211
/// <value>
251
212
/// Determines if the option to always use mods is enabled.
252
213
/// </value>
253
- public static bool UseModsAlways => KTPlayer . Instance . PlayerSettings . UseModsAlways ;
214
+ public static bool UseModsAlways => false ;
254
215
255
216
/// <value>
256
217
/// Determines if the option to use parallel/simultaneous mod loading is enabled.
257
218
/// </value>
258
- public static bool UseParallelModLoading => KTPlayer . Instance . PlayerSettings . UseParallelModLoading ;
219
+ public static bool UseParallelModLoading => false ;
259
220
260
221
/// <value>
261
222
/// Determines if VR mode is requested.
262
223
/// </value>
263
- public static bool VRModeRequested => KTPlayer . Instance . PlayerSettings . VRModeRequested ;
224
+ public static bool VRModeRequested => true ;
264
225
265
226
/// <value>
266
227
/// The intensity of anti-aliasing currently on the game. Ranges 0 to 8.
267
228
/// </value>
268
- public static int AntiAliasing => KTPlayer . Instance . PlayerSettings . AntiAliasing ;
229
+ public static int AntiAliasing => 8 ;
269
230
270
231
/// <value>
271
232
/// The current music volume from the dossier menu. Ranges 0 to 100.
272
233
/// </value>
273
- public static int MusicVolume => KTPlayer . Instance . PlayerSettings . MusicVolume ;
234
+ public static int MusicVolume => 100 ;
274
235
275
236
/// <value>
276
237
/// The current sound effects volume from the dosssier menu. Ranges 0 to 100.
277
238
/// </value>
278
- public static int SFXVolume => KTPlayer . Instance . PlayerSettings . SFXVolume ;
239
+ public static int SFXVolume => 100 ;
279
240
280
241
/// <value>
281
242
/// Determines if VSync is on or off.
282
243
/// </value>
283
- public static int VSync => KTPlayer . Instance . PlayerSettings . VSync ;
244
+ public static int VSync => 1 ;
284
245
285
246
/// <value>
286
247
/// The current language code.
287
248
/// </value>
288
- public static string LanguageCode => KTPlayer . Instance . PlayerSettings . LanguageCode ;
249
+ public static string LanguageCode => "en" ;
289
250
}
290
251
291
252
/// <value>
292
253
/// Adds an amount of strikes on the bomb.
293
254
/// </value>
294
- public static Action < GameObject , int > AddStrikes => ( gameObject , amount ) =>
295
- {
296
- Logger . Self ( $ "Adding the bomb's strike count with { amount } .") ;
297
- var bomb = ( Bomb ) Bomb ( gameObject ) ;
298
- bomb . StrikeIndicator . StrikeCount = bomb . NumStrikes += amount ;
299
- } ;
255
+ public static Action < GameObject , int > AddStrikes => ( gameObject , amount ) => Logger . Self ( $ "Adding the bomb's strike count with { amount } .") ;
300
256
301
257
/// <value>
302
258
/// Sets an amount of strikes on the bomb.
303
259
/// </value>
304
- public static Action < GameObject , int > SetStrikes => ( gameObject , amount ) =>
305
- {
306
- Logger . Self ( $ "Setting the bomb's strike count to { amount } .") ;
307
- var bomb = ( Bomb ) Bomb ( gameObject ) ;
308
- bomb . StrikeIndicator . StrikeCount = bomb . NumStrikes = amount ;
309
- } ;
260
+ public static Action < GameObject , int > SetStrikes => ( gameObject , amount ) => Logger . Self ( $ "Setting the bomb's strike count to { amount } .") ;
310
261
311
262
/// <value>
312
263
/// Gets the game's internal bomb component, not to be mistaken with <see cref="KMBomb"/>.
313
264
/// </value>
314
265
/// <remarks>
315
266
/// To prevent a reference to the game, the type is boxed in <see cref="object"/>. You can cast it to Bomb or <see cref="MonoBehaviour"/> type to restore its functionality.
316
267
/// </remarks>
317
- public static Func < GameObject , object > Bomb => gameObject => gameObject . GetComponentInParent ( typeof ( Bomb ) ) ;
268
+ public static Func < GameObject , object > Bomb => gameObject => null ;
318
269
319
270
/// <value>
320
271
/// Gets the game's internal timer component.
321
272
/// </value>
322
273
/// <remarks>
323
274
/// To prevent a reference to the game, the type is boxed in <see cref="object"/>. You can cast it to TimerComponent or <see cref="MonoBehaviour"/> type to restore its functionality.
324
275
/// </remarks>
325
- public static Func < GameObject , object > Timer => gameObject => ( ( Bomb ) Bomb ( gameObject ) ) . GetTimer ( ) ;
276
+ public static Func < GameObject , object > Timer => gameObject => null ;
326
277
}
327
278
}
0 commit comments