1+ using System . Linq ;
2+ using System . Numerics ;
13using Content . Client . Stylesheets ;
24using Content . Client . UserInterface . Controls ;
35using Content . Shared . Chemistry ;
46using Content . Shared . Chemistry . Reagent ;
7+ using Content . Shared . FixedPoint ;
58using Robust . Client . AutoGenerated ;
9+ using Robust . Client . Graphics ;
610using Robust . Client . UserInterface ;
711using Robust . Client . UserInterface . Controls ;
812using Robust . Client . UserInterface . XAML ;
913using Robust . Client . Utility ;
1014using Robust . Shared . Prototypes ;
1115using Robust . Shared . Utility ;
12- using System . Linq ;
13- using System . Numerics ;
14- using Content . Shared . FixedPoint ;
15- using Robust . Client . Graphics ;
1616using static Robust . Client . UserInterface . Controls . BoxContainer ;
1717
1818namespace Content . Client . Chemistry . UI
@@ -47,14 +47,15 @@ public ChemMasterWindow()
4747 {
4848 // For every button decide which stylebase to have
4949 // Every row has 10 buttons
50- String styleBase = StyleBase . ButtonOpenBoth ;
51- uint modulo = i % 10 ;
52- if ( i > 0 && modulo == 0 )
53- styleBase = StyleBase . ButtonOpenRight ;
54- else if ( i > 0 && modulo == 9 )
55- styleBase = StyleBase . ButtonOpenLeft ;
56- else if ( i == 0 )
57- styleBase = StyleBase . ButtonOpenRight ;
50+ var styleBase = StyleBase . ButtonOpenBoth ;
51+ var modulo = i % 10 ;
52+ styleBase = i switch
53+ {
54+ > 0 when modulo == 0 => StyleBase . ButtonOpenRight ,
55+ > 0 when modulo == 9 => StyleBase . ButtonOpenLeft ,
56+ 0 => StyleBase . ButtonOpenRight ,
57+ _ => styleBase ,
58+ } ;
5859
5960 // Generate buttons
6061 PillTypeButtons [ i ] = new Button
@@ -67,7 +68,7 @@ public ChemMasterWindow()
6768
6869 // Generate buttons textures
6970 var specifier = new SpriteSpecifier . Rsi ( resourcePath , "pill" + ( i + 1 ) ) ;
70- TextureRect pillTypeTexture = new TextureRect
71+ var pillTypeTexture = new TextureRect
7172 {
7273 Texture = specifier . Frame0 ( ) ,
7374 TextureScale = new Vector2 ( 1.75f , 1.75f ) ,
@@ -103,14 +104,16 @@ private ReagentButton MakeReagentButton(string text, ChemMasterReagentAmount amo
103104 private List < ReagentButton > CreateReagentTransferButtons ( ReagentId reagent , bool isBuffer , bool addReagentButtons )
104105 {
105106 if ( ! addReagentButtons )
106- return new List < ReagentButton > ( ) ; // Return an empty list if reagentTransferButton creation is disabled.
107+ return [ ] ; // Return an empty list if reagentTransferButton creation is disabled.
107108
108109 var buttonConfigs = new ( string text , ChemMasterReagentAmount amount , string styleClass ) [ ]
109110 {
110111 ( "1" , ChemMasterReagentAmount . U1 , StyleBase . ButtonOpenBoth ) ,
111112 ( "5" , ChemMasterReagentAmount . U5 , StyleBase . ButtonOpenBoth ) ,
112113 ( "10" , ChemMasterReagentAmount . U10 , StyleBase . ButtonOpenBoth ) ,
114+ ( "15" , ChemMasterReagentAmount . U15 , StyleBase . ButtonOpenBoth ) ,
113115 ( "25" , ChemMasterReagentAmount . U25 , StyleBase . ButtonOpenBoth ) ,
116+ ( "30" , ChemMasterReagentAmount . U30 , StyleBase . ButtonOpenBoth ) ,
114117 ( "50" , ChemMasterReagentAmount . U50 , StyleBase . ButtonOpenBoth ) ,
115118 ( "100" , ChemMasterReagentAmount . U100 , StyleBase . ButtonOpenBoth ) ,
116119 ( Loc . GetString ( "chem-master-window-buffer-all-amount" ) , ChemMasterReagentAmount . All , StyleBase . ButtonOpenLeft ) ,
@@ -392,7 +395,7 @@ private Control BuildReagentRow(Color reagentColor, int rowCount, string name, R
392395 {
393396 rowContainer . AddChild ( reagentTransferButton ) ;
394397 }
395- //Apply panencontainer to allow for striped rows
398+ //Apply PanelContainer to allow for striped rows
396399 return new PanelContainer
397400 {
398401 PanelOverride = new StyleBoxFlat ( currentRowColor ) ,
0 commit comments