Фильтр логиста: отдельная группа «Корм для кур»; призраками - только торговцы игры (NPCCore)
Корм кур - группа 22 в конце (биты старых не сдвинуты); у урн из прошлых сейвов она берёт выбор «Сырого», где корм был раньше. Число групп теперь пишется вторым числом. Призрачный вид - только у точного класса EntityTrader: NPC NPCCore (наследники EntityTrader) становились почти невидимыми (Nexus, Crozekanov, 16.10). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d0f66c784e
commit
1b60cfd627
@@ -67,6 +67,7 @@ necroGroup18,UI,Tooltip,,,,Books and schematics,,Bücher und Baupläne,Libros y
|
||||
necroGroup19,UI,Tooltip,,,,Blocks,,Blöcke,Bloques,Blocs,Blocchi,ブロック,블록,Bloki,Blocos,Блоки,Bloklar,方块,方塊
|
||||
necroGroup20,UI,Tooltip,,,,Necromancy,,Nekromantie,Nigromancia,Nécromancie,Negromanzia,降霊術,강령술,Nekromancja,Necromancia,Некромантия,Nekromansi,亡灵法术,亡靈法術
|
||||
necroGroup21,UI,Tooltip,,,,Other,,Sonstiges,Otros,Divers,Altro,その他,기타,Inne,Outros,Прочее,Diğer,其他,其他
|
||||
necroGroup22,UI,Tooltip,,,,Chicken feed,,Hühnerfutter,Pienso para gallinas,Nourriture pour poules,Mangime per galline,鶏の餌,닭 모이,Karma dla kur,Ração para galinhas,Корм для кур,Tavuk yemi,鸡饲料,雞飼料
|
||||
necroGroupOn,UI,Tooltip,,,,carried,,wird getragen,se transporta,transporté,si trasporta,運ぶ,옮김,przenoszone,transportado,носит,taşınır,搬运,搬運
|
||||
necroGroupOff,UI,Tooltip,,,,not carried,,wird nicht getragen,no se transporta,pas transporté,non si trasporta,運ばない,옮기지 않음,nieprzenoszone,não transportado,не носит,taşınmaz,不搬运,不搬運
|
||||
necroUrnFilterTitle,UI,Tooltip,,,,What to carry,,Was tragen,Qué llevar,Quoi porter,Cosa portare,運ぶもの,옮길 것,Co nosić,O que levar,Что носить,Ne taşınsın,搬运什么,搬運什麼
|
||||
|
||||
|
@@ -262,6 +262,8 @@
|
||||
<sprite depth="3" name="g20" pos="120,-219" width="48" height="48" atlas="ItemIconAtlas" sprite="oldCash" on_press="true" sound="[paging_click]" foregroundlayer="true" />
|
||||
<sprite depth="2" name="f21" pos="174,-217" width="52" height="52" sprite="menu_empty2px" type="sliced" fillcenter="false" />
|
||||
<sprite depth="3" name="g21" pos="176,-219" width="48" height="48" atlas="ItemIconAtlas" sprite="oldCash" on_press="true" sound="[paging_click]" foregroundlayer="true" />
|
||||
<sprite depth="2" name="f22" pos="230,-217" width="52" height="52" sprite="menu_empty2px" type="sliced" fillcenter="false" />
|
||||
<sprite depth="3" name="g22" pos="232,-219" width="48" height="48" atlas="ItemIconAtlas" sprite="oldCash" on_press="true" sound="[paging_click]" foregroundlayer="true" />
|
||||
</window>
|
||||
</append>
|
||||
</windows>
|
||||
|
||||
@@ -168,7 +168,8 @@ namespace NecromancerTome
|
||||
t.Add(HasThreadTo ? 1 : 0);
|
||||
t.Add(ThreadTo.x); t.Add(ThreadTo.y); t.Add(ThreadTo.z);
|
||||
CinerariumWriteHelper.WriteInts(_bw, t.ToArray());
|
||||
CinerariumWriteHelper.WriteInts(_bw, new[] { unchecked((int)GroupMask) });
|
||||
// Второе число - сколько групп было при записи: новые группы (в конец) у старых урн включаются по правилу ниже.
|
||||
CinerariumWriteHelper.WriteInts(_bw, new[] { unchecked((int)GroupMask), CinerariumGroups.Count });
|
||||
}
|
||||
|
||||
public override void Read(PooledBinaryReader _br, StreamModeRead _eStreamMode)
|
||||
@@ -203,6 +204,7 @@ namespace NecromancerTome
|
||||
if (version >= 3)
|
||||
{
|
||||
int n = _br.ReadInt32();
|
||||
int known = 22; // до 17.10 число групп не писалось - их было 22
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
int v = _br.ReadInt32();
|
||||
@@ -210,6 +212,16 @@ namespace NecromancerTome
|
||||
{
|
||||
GroupMask = unchecked((uint)v);
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
known = v;
|
||||
}
|
||||
}
|
||||
// Группы, которых урна ещё не знала: корм кур раньше ехал с «Сырым» - берёт его выбор, прочие новые - включены.
|
||||
for (int g = known; g < CinerariumGroups.Count; g++)
|
||||
{
|
||||
bool on = g == CinerariumGroups.ChickenFeed ? (GroupMask & (1u << CinerariumGroups.Raw)) != 0 : true;
|
||||
GroupMask = on ? GroupMask | (1u << g) : GroupMask & ~(1u << g);
|
||||
}
|
||||
}
|
||||
_threadsDirty = true;
|
||||
|
||||
@@ -17,8 +17,10 @@ namespace NecromancerTome
|
||||
{
|
||||
public const int Cooked = 0, Canned = 1, Raw = 2, Harvest = 3, Flowers = 4, Seeds = 5, Drinks = 6, Medicine = 7, Ore = 8,
|
||||
Ingots = 9, Parts = 10, Materials = 11, Chemicals = 12, Tools = 13, Weapons = 14, Ammo = 15, Armor = 16, Mods = 17,
|
||||
Books = 18, Blocks = 19, Necro = 20, Other = 21;
|
||||
public const int Count = 22;
|
||||
Books = 18, Blocks = 19, Necro = 20, Other = 21,
|
||||
// 17.10: «Корм для кур вынеси в отдельную группу» (был в «Сыром»).
|
||||
ChickenFeed = 22;
|
||||
public const int Count = 23;
|
||||
public const uint All = (1u << Count) - 1;
|
||||
|
||||
/// <summary>Значок группы - иконка типичного предмета (ItemIconAtlas).</summary>
|
||||
@@ -27,10 +29,11 @@ namespace NecromancerTome
|
||||
"foodMeatStew", "foodCanChili", "foodRawMeat", "foodCropCorn", "plantedChrysanthemum3Harvest", "plantedCorn1",
|
||||
"drinkJarBoiledWater", "medicalFirstAidKit", "resourceRockSmall", "resourceForgedSteel", "resourceMechanicalParts",
|
||||
"resourceWood", "resourceGunPowder", "meleeToolPickT1IronPickaxe", "gunHandgunT1Pistol", "ammo9mmBulletBall",
|
||||
"armorMinerHelmet", "modGunLaserSight", "bookArtOfMiningLuckyStrike", "cobblestoneMaster", "necroSkull", "oldCash"
|
||||
"armorMinerHelmet", "modGunLaserSight", "bookArtOfMiningLuckyStrike", "cobblestoneMaster", "necroSkull", "oldCash",
|
||||
"resourceChickenFeed"
|
||||
};
|
||||
|
||||
/// <summary>Ключ названия группы в Localization.csv: necroGroup0..necroGroup21.</summary>
|
||||
/// <summary>Ключ названия группы в Localization.csv: necroGroup0..necroGroup22.</summary>
|
||||
public static string NameKey(int _g) => "necroGroup" + _g;
|
||||
|
||||
static readonly HashSet<string> OreNames = new HashSet<string>
|
||||
@@ -62,7 +65,7 @@ namespace NecromancerTome
|
||||
};
|
||||
static readonly HashSet<string> RawNames = new HashSet<string>
|
||||
{
|
||||
"foodRawMeat", "foodRawMeatBundle", "foodEgg", "foodHoney", "foodRottingFlesh", "resourceChickenFeed"
|
||||
"foodRawMeat", "foodRawMeatBundle", "foodEgg", "foodHoney", "foodRottingFlesh"
|
||||
};
|
||||
|
||||
/// <summary>Предметы и блоки самого мода - по его Config/items.xml и blocks.xml (у многих нет «necro» в имени: книги
|
||||
@@ -124,6 +127,10 @@ namespace NecromancerTome
|
||||
{
|
||||
return Necro;
|
||||
}
|
||||
if (n == "resourceChickenFeed")
|
||||
{
|
||||
return ChickenFeed;
|
||||
}
|
||||
if (_ic is ItemClassModifier)
|
||||
{
|
||||
return Mods;
|
||||
|
||||
@@ -319,7 +319,9 @@ namespace NecromancerTome
|
||||
{
|
||||
if (_entity is EntityTrader)
|
||||
{
|
||||
return true;
|
||||
// Только торговцы самой игры (класс EntityTrader). 16.10 (Nexus, Crozekanov): NPC мода NPCCore построены на
|
||||
// наследнике EntityTrader и тоже становились призраками - «практически невидимыми».
|
||||
return _entity.GetType() == typeof(EntityTrader);
|
||||
}
|
||||
EntityClass entityClass = EntityClass.list[_entity.entityClass];
|
||||
if (entityClass == null || entityClass.entityClassName == null)
|
||||
|
||||
Reference in New Issue
Block a user