Add Sticky Card (#371)

Co-authored-by: NotMyWing <winwyv@gmail.com>
This commit is contained in:
Serenibyss
2024-01-15 19:27:13 -06:00
committed by GitHub
parent dd3cdfcec5
commit a8f0bbe06b
23 changed files with 187 additions and 11 deletions
@@ -113,6 +113,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.getConfigManager().registerSetting(Settings.ACCESS, AccessRestriction.READ_WRITE);
this.getConfigManager().registerSetting(Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL);
this.getConfigManager().registerSetting(Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY);
this.getConfigManager().registerSetting(Settings.STICKY_MODE, YesNo.NO);
this.mySrc = new MachineSource(this);
}
@@ -467,6 +468,10 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
}
if (this.getInstalledUpgrades(Upgrades.STICKY) > 0) {
this.handler.setSticky(true);
}
if (this.getInstalledUpgrades(Upgrades.FUZZY) > 0) {
this.handler.setPartitionList(new FuzzyPriorityList<>(priorityList, (FuzzyMode) this.getConfigManager().getSetting(Settings.FUZZY_MODE)));
} else {