diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index ff0850c..e885add 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.pdb b/1.6/1.6/Assemblies/ArachnaeSwarm.pdb index 527b991..96bf47e 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.pdb and b/1.6/1.6/Assemblies/ArachnaeSwarm.pdb differ diff --git a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/CompProperties_EquipmentIncubatorData.cs b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/CompProperties_EquipmentIncubatorData.cs index be56f71..95acfcd 100644 --- a/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/CompProperties_EquipmentIncubatorData.cs +++ b/Source/ArachnaeSwarm/Buildings/Building_EquipmentOotheca/CompProperties_EquipmentIncubatorData.cs @@ -296,10 +296,14 @@ namespace ArachnaeSwarm ArachnaeLog.Debug($"Built {cachedConfigs.Count} equipment incubation configs for {parent.def.defName}"); } - // 切换到特定索引 + // 切换到特定索引(-1 表示清除选择) public void SwitchToConfig(int index) { - if (index >= 0 && index < IncubationConfigs.Count) + if (index == -1) + { + selectedIndex = -1; // 清除选择 + } + else if (index >= 0 && index < IncubationConfigs.Count) { selectedIndex = index; } diff --git a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs index 4b1ccfe..a887979 100644 --- a/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs +++ b/Source/ArachnaeSwarm/Buildings/Building_Ootheca/CompProperties_IncubatorData.cs @@ -360,10 +360,14 @@ namespace ArachnaeSwarm // 获取当前选择的PawnKind public PawnKindDef SelectedPawnKind => SelectedConfig?.pawnKind; - // 切换到特定索引 + // 切换到特定索引(-1 表示清除选择) public void SwitchToConfig(int index) { - if (index >= 0 && index < IncubationConfigs.Count) + if (index == -1) + { + selectedIndex = -1; // 清除选择 + } + else if (index >= 0 && index < IncubationConfigs.Count) { selectedIndex = index; }