Фильтр логиста: группа «Стройматериалы» - древесина, булыжник, цемент, бетонная смесь; «Руда и камень» - только добыча (#18)

Новая группа у старых урн берёт выбор «Материалов»; значок «Материалов» - ткань. Сталь - в «Слитках».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-23 22:35:01 +03:00
co-authored by Claude Opus 5.5
parent 54cafab4f1
commit 61a7e35bad
4 changed files with 27 additions and 11 deletions
+20 -8
View File
@@ -21,8 +21,11 @@ namespace NecromancerTome
// 17.10: «Корм для кур вынеси в отдельную группу» (был в «Сыром»).
ChickenFeed = 22,
// 23.10 (проверка всех предметов: куры и сложенный транспорт падали в «Прочее»; «Можно и добавить группы»).
Livestock = 23, Vehicles = 24;
public const int Count = 25;
Livestock = 23, Vehicles = 24,
// 23.10: «Заведи группу стройматериалов. Руда и камень отдельно. Сортировка должна быть удобной и с учётом
// производства» - то, чем игра улучшает блоки и что для этого производят: булыжник, цемент, бетонная смесь.
Building = 25;
public const int Count = 26;
public const uint All = (1u << Count) - 1;
/// <summary>Значок группы - иконка типичного предмета (ItemIconAtlas).</summary>
@@ -30,12 +33,12 @@ namespace NecromancerTome
{
"foodMeatStew", "foodCanChili", "foodRawMeat", "foodCropCorn", "plantedChrysanthemum3Harvest", "plantedCorn1",
"drinkJarBoiledWater", "medicalFirstAidKit", "resourceRockSmall", "resourceForgedSteel", "resourceMechanicalParts",
"resourceWood", "resourceGunPowder", "meleeToolPickT1IronPickaxe", "gunHandgunT1Pistol", "ammo9mmBulletBall",
"resourceCloth", "resourceGunPowder", "meleeToolPickT1IronPickaxe", "gunHandgunT1Pistol", "ammo9mmBulletBall",
"armorMinerHelmet", "modGunLaserSight", "bookArtOfMiningLuckyStrike", "cobblestoneMaster", "necroSkull", "oldCash",
"resourceChickenFeed", "domesticatedChicken", "vehicleMinibikePlaceable"
"resourceChickenFeed", "domesticatedChicken", "vehicleMinibikePlaceable", "resourceConcreteMix"
};
/// <summary>Ключ названия группы в Localization.csv: necroGroup0..necroGroup24.</summary>
/// <summary>Ключ названия группы в Localization.csv: necroGroup0..necroGroup25.</summary>
public static string NameKey(int _g) => "necroGroup" + _g;
static readonly HashSet<string> OreNames = new HashSet<string>
@@ -43,9 +46,14 @@ namespace NecromancerTome
"resourceRockSmall", "resourceRockSmallBundle", "resourceScrapIron", "resourceScrapIronBundle", "resourceScrapLead",
"resourceLeadBundle", "resourceCoal", "resourceCoalBundle", "resourcePotassiumNitratePowder",
"resourcePotassiumNitratePowderBundle", "resourceOilShale", "resourceOilShaleBundle", "resourceClayLump",
"resourceCrushedSand", "resourceCobblestones", "resourceGoldNugget", "resourceSilverNugget", "resourceRawDiamond",
"resourceCrushedSand", "resourceGoldNugget", "resourceSilverNugget", "resourceRawDiamond",
"resourceSnowBall"
};
/// <summary>Стройматериалы (23.10): древесина, булыжник, цемент, бетонная смесь - чем строят и улучшают блоки; сталь - в «Слитках».</summary>
static readonly HashSet<string> BuildingNames = new HashSet<string>
{
"resourceCobblestones", "resourceCement", "resourceConcreteMix", "resourceWood", "resourceWoodBundle" // древесина - 23.10, пользователь
};
static readonly HashSet<string> IngotNames = new HashSet<string> { "resourceForgedIron", "resourceForgedSteel" };
static readonly HashSet<string> ChemNames = new HashSet<string>
{
@@ -54,8 +62,8 @@ namespace NecromancerTome
};
static readonly HashSet<string> MaterialNames = new HashSet<string>
{
"resourceWood", "resourceWoodBundle", "resourceCloth", "resourceLeather", "resourceBone", "resourceFeather",
"resourceYuccaFibers", "resourcePaper", "resourceCement", "resourceConcreteMix", "resourceBeeswax", "resourceCandleStick",
"resourceCloth", "resourceLeather", "resourceBone", "resourceFeather",
"resourceYuccaFibers", "resourcePaper", "resourceBeeswax", "resourceCandleStick",
"resourceAnimalFat"
};
/// <summary>Детали, которые теги отнесли бы не туда (гвозди - патроны гвоздомёта).</summary>
@@ -170,6 +178,10 @@ namespace NecromancerTome
{
return Books;
}
if (BuildingNames.Contains(n))
{
return Building;
}
if (OreNames.Contains(n))
{
return Ore;