Remove random reaction system (#1345)

* wow

* d
This commit is contained in:
Red
2025-06-01 15:01:32 +03:00
committed by GitHub
parent 759e7c73d9
commit a99f2fcd50
11 changed files with 38 additions and 139 deletions

View File

@@ -26,27 +26,6 @@
<!-- Products will be added as children here -->
</BoxContainer>
</BoxContainer>
<!-- CP14 random reactions begin -->
<!--<BoxContainer Name="RandomVariations"
Orientation="Vertical"
VerticalExpand="True"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<controls:SplitBar MinHeight="10">
</controls:SplitBar>
<Label Name="RandomVariationsLabel"
Text="{Loc 'cp14-guidebook-random-variations-title'}"
Visible="False"
HorizontalAlignment="Center"
FontColorOverride="#1e6651" />
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalAlignment="Center">
<BoxContainer Name="RandomProductsContainer" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
~1~ Random products will be added as children here @1@
</BoxContainer>
</BoxContainer>
</BoxContainer>-->
<!-- CP14 random reactions end -->
</BoxContainer>
<PanelContainer StyleClasses="LowDivider" Margin="0 5 0 5" />
</BoxContainer>

View File

@@ -37,7 +37,7 @@ public sealed partial class GuideReagentReaction : BoxContainer, ISearchableCont
Container container = ReactantsContainer;
SetReagents(prototype.Reactants, ref container, protoMan);
Container productContainer = ProductsContainer;
var products = new Dictionary<string, FixedPoint2>(prototype._products); // CP14 random reactions
var products = new Dictionary<string, FixedPoint2>(prototype.Products);
foreach (var (reagent, reactantProto) in prototype.Reactants)
{
if (reactantProto.Catalyst)
@@ -45,14 +45,6 @@ public sealed partial class GuideReagentReaction : BoxContainer, ISearchableCont
}
SetReagents(products, ref productContainer, protoMan, false);
// CP14 random reagents begin
if (prototype.Cp14RandomProducts.Count > 0)
{
var randomProducts = new Dictionary<string, FixedPoint2>(prototype.Cp14RandomProducts[prototype.Cp14RandomProductIndex]);
SetReagents(randomProducts, ref productContainer, protoMan, false);
}
// CP14 random reagents end
var mixingCategories = new List<MixingCategoryPrototype>();
if (prototype.MixingCategories != null)
{