1+ using System . Collections . Generic ;
2+ using System . Drawing ;
3+ using System . Linq ;
4+ using System . Runtime . Serialization ;
5+ using AuroraRgb . EffectsEngine ;
6+ using AuroraRgb . Settings ;
7+ using AuroraRgb . Settings . Layers ;
8+ using AuroraRgb . Settings . Overrides . Logic ;
9+ using AuroraRgb . Settings . Overrides . Logic . Boolean ;
10+ using AuroraRgb . Utils ;
11+ using Common . Devices ;
12+ using Common . Utils ;
13+ using Newtonsoft . Json ;
14+ using Color = System . Drawing . Color ;
15+
16+ namespace AuroraRgb . Profiles . BlackOps6 ;
17+
18+ [ JsonObject ( ItemTypeNameHandling = TypeNameHandling . None ) ]
19+ public class Bo6Profile : ApplicationProfile
20+ {
21+ [ OnDeserialized ]
22+ void OnDeserialized ( StreamingContext context )
23+ {
24+ if ( Layers . Any ( lyr => lyr . Handler is IcueSdkLayerHandler ) ) return ;
25+ Layers . Add ( new Layer ( "iCUE Lighting" , new IcueSdkLayerHandler ( ) ) ) ;
26+ }
27+
28+ public override void Reset ( )
29+ {
30+ base . Reset ( ) ;
31+ OverlayLayers =
32+ [
33+ new Layer ( "Loading Animation" , new RadialLayerHandler
34+ {
35+ Properties = new RadialLayerProperties
36+ {
37+ Brush = new SegmentedRadialBrushFactory ( new ColorStopCollection
38+ {
39+ { 0.0f , Color . Red } ,
40+ { 0.10797343f , Color . Orange } ,
41+ { 0.2690457f , Color . FromArgb ( 0 , 121 , 212 , 0 ) } ,
42+ { 0.42602244f , Color . FromArgb ( 93 , 222 , 0 ) } ,
43+ { 0.5946844f , Color . Aqua } ,
44+ { 0.7819433f , Color . FromArgb ( 0 , 68 , 187 , 187 ) } ,
45+ { 1.0f , Color . Red }
46+ } )
47+ } ,
48+ } , new OverrideLogicBuilder ( )
49+ . SetDynamicBoolean ( "_Enabled" , new BooleanIcueState ( "SDKL_SmokeBlackout" ) )
50+ ) ,
51+ new Layer ( "Endgame" , new BreathingLayerHandler
52+ {
53+ Properties = new BreathingLayerHandlerProperties
54+ {
55+ _PrimaryColor = CommonColorUtils . FastColor ( 35 , 5 , 215 ) ,
56+ SecondaryColor = CommonColorUtils . FastColor ( 255 , 0 , 29 ) ,
57+ CurveFunction = CurveFunction . SineSquared ,
58+ EffectSpeed = 15 ,
59+ Sequence = new KeySequence
60+ {
61+ Keys = [ DeviceKeys . ARROW_LEFT , DeviceKeys . ARROW_DOWN , DeviceKeys . ARROW_RIGHT , DeviceKeys . ARROW_UP ] ,
62+ } ,
63+ }
64+ } , new OverrideLogicBuilder ( )
65+ . SetDynamicBoolean ( "_Enabled" , new BooleanOr (
66+ [
67+ new BooleanIcueState ( "BO6_Victory" ) ,
68+ new BooleanIcueState ( "BO6_Defeat" )
69+ ]
70+ )
71+ )
72+ ) ,
73+ ] ;
74+ Layers =
75+ [
76+ new Layer ( "Death" , new SolidColorLayerHandler
77+ {
78+ Properties = new LayerHandlerProperties
79+ {
80+ _PrimaryColor = Color . Red ,
81+ _Sequence = new KeySequence
82+ {
83+ Keys =
84+ [
85+ DeviceKeys . ESC ,
86+ DeviceKeys . TILDE ,
87+ DeviceKeys . TAB ,
88+ DeviceKeys . CAPS_LOCK ,
89+ DeviceKeys . LEFT_SHIFT ,
90+ DeviceKeys . LEFT_CONTROL ,
91+ DeviceKeys . LEFT_WINDOWS ,
92+ DeviceKeys . LEFT_ALT ,
93+ DeviceKeys . SPACE ,
94+ DeviceKeys . RIGHT_ALT ,
95+ DeviceKeys . FN_Key ,
96+ DeviceKeys . APPLICATION_SELECT ,
97+ DeviceKeys . RIGHT_CONTROL ,
98+ DeviceKeys . RIGHT_SHIFT ,
99+ DeviceKeys . ENTER ,
100+ DeviceKeys . BACKSPACE ,
101+ DeviceKeys . F12 ,
102+ DeviceKeys . F11 ,
103+ DeviceKeys . F10 ,
104+ DeviceKeys . F9 ,
105+ DeviceKeys . F8 ,
106+ DeviceKeys . F7 ,
107+ DeviceKeys . F6 ,
108+ DeviceKeys . F5 ,
109+ DeviceKeys . F4 ,
110+ DeviceKeys . F3 ,
111+ DeviceKeys . F2 ,
112+ DeviceKeys . F1 ,
113+ ] ,
114+ Type = KeySequenceType . Sequence ,
115+ }
116+ } ,
117+ } ,
118+ new OverrideLogicBuilder ( )
119+ . SetDynamicBoolean ( "_Enabled" , new BooleanIcueState ( "BO6_Death" ) )
120+ ) ,
121+ new Layer ( "Near Death" , new BlinkingLayerHandler
122+ {
123+ Properties = new BlinkingLayerHandlerProperties
124+ {
125+ _PrimaryColor = Color . Red ,
126+ SecondaryColor = CommonColorUtils . FastColor ( 238 , 104 , 62 ) ,
127+ _Sequence = new KeySequence
128+ {
129+ Keys =
130+ [
131+ DeviceKeys . ESC ,
132+ DeviceKeys . TILDE ,
133+ DeviceKeys . TAB ,
134+ DeviceKeys . CAPS_LOCK ,
135+ DeviceKeys . LEFT_SHIFT ,
136+ DeviceKeys . LEFT_CONTROL ,
137+ DeviceKeys . LEFT_WINDOWS ,
138+ DeviceKeys . LEFT_ALT ,
139+ DeviceKeys . SPACE ,
140+ DeviceKeys . RIGHT_ALT ,
141+ DeviceKeys . FN_Key ,
142+ DeviceKeys . APPLICATION_SELECT ,
143+ DeviceKeys . RIGHT_CONTROL ,
144+ DeviceKeys . RIGHT_SHIFT ,
145+ DeviceKeys . ENTER ,
146+ DeviceKeys . BACKSPACE ,
147+ DeviceKeys . F12 ,
148+ DeviceKeys . F11 ,
149+ DeviceKeys . F10 ,
150+ DeviceKeys . F9 ,
151+ DeviceKeys . F8 ,
152+ DeviceKeys . F7 ,
153+ DeviceKeys . F6 ,
154+ DeviceKeys . F5 ,
155+ DeviceKeys . F4 ,
156+ DeviceKeys . F3 ,
157+ DeviceKeys . F2 ,
158+ DeviceKeys . F1 ,
159+ ] ,
160+ Type = KeySequenceType . Sequence ,
161+ } ,
162+ EffectSpeed = 10 ,
163+ }
164+ } ,
165+ new OverrideLogicBuilder ( )
166+ . SetDynamicBoolean ( "_Enabled" , new BooleanIcueState ( "BO6_NearDeath" ) )
167+ ) ,
168+ new Layer ( "On Kill" , new SimpleParticleLayerHandler
169+ {
170+ Properties = new SimpleParticleLayerProperties
171+ {
172+ _Sequence = new KeySequence ( Effects . Canvas . WholeFreeForm ) ,
173+ MinSpawnTime = 0.1f ,
174+ MaxSpawnTime = 0.1f ,
175+ MinSpawnAmount = 1 ,
176+ MaxSpawnAmount = 1 ,
177+ MinInitialVelocityX = 0.0f ,
178+ MaxInitialVelocityX = 0.0f ,
179+ MinInitialVelocityY = - 1.0f ,
180+ MaxInitialVelocityY = - 1.0f ,
181+ MinLifetime = 0.0f ,
182+ MaxLifetime = 3.0f ,
183+ AccelerationX = 0.0f ,
184+ AccelerationY = 0.3f ,
185+ DragX = 0.0f ,
186+ DragY = 0.80147064f ,
187+ MinSize = 30.0f ,
188+ MaxSize = 35.0f ,
189+ DeltaSize = 7.0f ,
190+ SpawnLocation = ParticleSpawnLocations . BottomEdge ,
191+ ParticleColorStops = new ColorStopCollection
192+ {
193+ { 0f , Color . FromArgb ( 250 , 104 , 0 ) } ,
194+ { 1f , Color . FromArgb ( 0 , 250 , 103 , 0 ) }
195+ } ,
196+ SpawningEnabled = false ,
197+ PrimaryColor = Color . FromArgb ( 41 , 126 , 81 ) ,
198+ }
199+ } ,
200+ new OverrideLogicBuilder ( )
201+ . SetDynamicBoolean ( "SpawningEnabled" , new BooleanIcueEventTriggered ( "SDKL_FlashOrange" , 1.5 ) )
202+ ) ,
203+ new Layer ( "Main Gradient" , new GradientLayerHandler
204+ {
205+ Properties = new GradientLayerHandlerProperties
206+ {
207+ GradientConfig = new LayerEffectConfig
208+ {
209+ Primary = Color . FromArgb ( 117 , 226 , 176 ) ,
210+ Secondary = Color . FromArgb ( 211 , 112 , 172 ) ,
211+ Speed = 2.5f ,
212+ Angle = 0.0f ,
213+ GradientSize = 28.0f ,
214+ AnimationType = AnimationType . TranslateXy ,
215+ Brush = new EffectBrush ( EffectBrush . BrushType . Linear , EffectBrush . BrushWrap . Repeat )
216+ {
217+ Start = new PointF ( 0 , - 0.5f ) ,
218+ Center = new PointF ( 0 , 0 ) ,
219+ End = new PointF ( 1 , 1 ) ,
220+ ColorGradients = new SortedDictionary < double , Color >
221+ {
222+ { 0 , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
223+ { 0.2709030100334449 , Color . FromArgb ( 250 , 104 , 0 ) } ,
224+ { 0.5000000000000002 , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
225+ { 0.7722169135212613 , Color . FromArgb ( 250 , 104 , 0 ) } ,
226+ { 1 , Color . FromArgb ( 0 , 0 , 0 , 0 ) }
227+ } ,
228+ } ,
229+ } ,
230+ SecondaryColor = Color . FromArgb ( 213 , 204 , 113 ) ,
231+ _PrimaryColor = Color . FromArgb ( 82 , 165 , 152 ) ,
232+ _Sequence = new KeySequence ( Effects . Canvas . WholeFreeForm ) ,
233+ } ,
234+ } ,
235+ new OverrideLogicBuilder ( )
236+ . SetDynamicBoolean ( "_Enabled" , new BooleanIcueState ( "BO6_ThemeMain" ) )
237+ ) ,
238+ new Layer ( "Main Radial" , new RadialLayerHandler
239+ {
240+ Properties = new RadialLayerProperties
241+ {
242+ Brush = new SegmentedRadialBrushFactory ( new ColorStopCollection
243+ {
244+ { 0.058139537f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
245+ { 0.18936878f , Color . FromArgb ( 255 , 179 , 0 ) } ,
246+ { 0.3122924f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
247+ { 0.45910186f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
248+ { 0.5714286f , Color . Orange } ,
249+ { 0.679402f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
250+ { 0.7669741f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
251+ { 0.85714287f , Color . Orange } ,
252+ { 0.9593023f , Color . FromArgb ( 0 , 0 , 0 , 0 ) } ,
253+ } ) ,
254+ _Sequence = new KeySequence ( Effects . Canvas . WholeFreeForm ) ,
255+ AnimationSpeed = 60 ,
256+ } ,
257+ } ,
258+ new OverrideLogicBuilder ( )
259+ . SetDynamicBoolean ( "_Enabled" , new BooleanIcueState ( "BO6_ThemeMain" ) )
260+ ) ,
261+ new Layer ( "Background" , new SolidColorLayerHandler
262+ {
263+ Properties = new LayerHandlerProperties
264+ {
265+ _PrimaryColor = Color . FromArgb ( 250 , 104 , 0 ) ,
266+ _Sequence = new KeySequence ( Effects . Canvas . WholeFreeForm ) ,
267+ } ,
268+ } ,
269+ new OverrideLogicBuilder ( )
270+ . SetLookupTable (
271+ "_LayerOpacity" ,
272+ new OverrideLookupTableBuilder < double > ( )
273+ . AddEntry ( 0.75 , new BooleanIcueState ( "BO6_ThemeMain" ) )
274+ . AddEntry ( 0.15 , new BooleanConstant ( true ) )
275+ )
276+ ) ,
277+ ] ;
278+ }
279+ }
0 commit comments