Merge pull request #75 from NachoToast/main

Fix duplicate deadlife dust label at the bottom left and in the add gas menu
This commit is contained in:
bbradson
2025-03-22 16:15:39 +01:00
committed by GitHub
3 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<PerformanceFish.GasDef>
<defName>DeadLifeDust</defName>
<label>dead life dust</label>
<label>deadlife dust</label>
<dissipationRate>3</dissipationRate>
<diffuses>true</diffuses>
<color>(3,13,51)</color>
+3
View File
@@ -20,6 +20,9 @@ public class GasDef : Def
GasType.BlindSmoke => GasDefOf.BlindSmoke,
GasType.RotStink => GasDefOf.RotStink,
GasType.ToxGas => GasDefOf.ToxGas,
#if !V1_4
GasType.DeadlifeDust => GasDefOf.DeadLifeDust,
#endif
_ => null
};
}
@@ -26,6 +26,13 @@ namespace PerformanceFish;
public sealed class GasGridOptimization : ClassWithFishPrepatches
{
private const int START_INDEX
#if V1_4
= 3;
#else
= 4;
#endif
public sealed class SetDirectPatch : FishPrepatch
{
public override bool ShowSettings => false;
@@ -493,7 +500,7 @@ public sealed class GasGridOptimization : ClassWithFishPrepatches
{
var gasDefs = DefDatabase<GasDef>.AllDefsListForReading;
for (var i = 3; i < gasDefs.Count; i++)
for (var i = START_INDEX; i < gasDefs.Count; i++)
{
var gasDef = gasDefs[i];
@@ -550,7 +557,7 @@ public sealed class GasGridOptimization : ClassWithFishPrepatches
var gasGrids = map.gasGrid.ParallelGasGrids();
var cellIndex = new CellIndex(cell, map);
for (var i = 3; i < gasGrids.Length; i++)
for (var i = START_INDEX; i < gasGrids.Length; i++)
{
var gasGrid = gasGrids[i];
if (!gasGrid.AnyGasAt(cellIndex))