File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ bool SWSidebarClass::AddButton(int superIdx)
132
132
133
133
const auto pSWExt = SWTypeExt::ExtMap.Find (pSWType);
134
134
135
- if (!pSWExt->SW_ShowCameo || !pSWExt->SuperWeaponSidebar_Allow .Get (RulesExt::Global ()->SuperWeaponSidebar_AllowByDefault ))
135
+ if (!pSWExt->SW_ShowCameo && pSWExt->SW_AutoFire )
136
+ return false ;
137
+
138
+ if (!pSWExt->SuperWeaponSidebar_Allow .Get (RulesExt::Global ()->SuperWeaponSidebar_AllowByDefault ))
136
139
return false ;
137
140
138
141
const unsigned int ownerBits = 1u << HouseClass::CurrentPlayer->Type ->ArrayIndex ;
@@ -148,6 +151,9 @@ bool SWSidebarClass::AddButton(int superIdx)
148
151
if (columns.empty () && !this ->AddColumn ())
149
152
return false ;
150
153
154
+ if (std::ranges::any_of (columns, [superIdx](SWColumnClass* column) { return std::ranges::any_of (column->Buttons , [superIdx](SWButtonClass* button) { return button->SuperIndex == superIdx; }); }))
155
+ return true ;
156
+
151
157
return columns.back ()->AddButton (superIdx);
152
158
}
153
159
You can’t perform that action at this time.
0 commit comments