fix(uxassist): align Dark Fog item IDs, names, and icons
Correct Dark Fog item constants and use one definition for belt signal names, icons, outputs, and exchange rates. Preserve the legacy signal and saved-stock order and the equivalent single-material exchange ratios. Rename the six embedded icons to match current English item names and synchronize localization and resource references. Validation: UXAssist Release build, item/name/icon/rate mapping checks, and git diff --check.
No files matched your search
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
- UXAssist Dark Fog buy-out belt signals keep each item ID, per-Metaverse rate, localization key, and embedded icon path in one definition. Name embedded icon files after the current English item names and synchronize resource includes and loader paths when renaming them. Preserve the legacy signal and saved-stock order. Rates represent equivalent single-material value: a native bundle of 10 Silicon-based Neurons, 10 Negentropy Singularities, and 10 Matter Recombinators per Metaverse corresponds to 30 of any one selected material per Metaverse.
|
||||||
- `ModFeatureRegistry` discovers dependent-mod features during `Awake`; feature initialization is eager, while UXAssist alone drives the deferred start, input, update, and uninitialization lifecycle. Keep dispatchers internal and idempotent.
|
- `ModFeatureRegistry` discovers dependent-mod features during `Awake`; feature initialization is eager, while UXAssist alone drives the deferred start, input, update, and uninitialization lifecycle. Keep dispatchers internal and idempotent.
|
||||||
- Proto-dependent features must tolerate calls before preload completes and retry via `UXAssist.Common.GameLogic.OnDataLoaded`. Mark changes applied only after capturing valid originals and successfully mutating the proto.
|
- Proto-dependent features must tolerate calls before preload completes and retry via `UXAssist.Common.GameLogic.OnDataLoaded`. Mark changes applied only after capturing valid originals and successfully mutating the proto.
|
||||||
- Architect-mode virtual stock applies only to player inventory and construction previews, including logistics bots, drones, and vessels. Keep cached package statistics consistent for inlined getters, preserve physical capacity and native ref/out contracts, and restore native statistics on disable.
|
- Architect-mode virtual stock applies only to player inventory and construction previews, including logistics bots, drones, and vessels. Keep cached package statistics consistent for inlined getters, preserve physical capacity and native ref/out contracts, and restore native statistics on disable.
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
## Changlog
|
## Changlog
|
||||||
|
|
||||||
* 1.6.2
|
* 1.6.2 - Unrelease
|
||||||
|
* `Belt signals for buy out dark fog items automatically`: Use the current in-game material names and retain the original exchange ratios.
|
||||||
* `Initialize This Planet`: Fix an occasional array index error after initializing a planet with Holo Beacons.
|
* `Initialize This Planet`: Fix an occasional array index error after initializing a planet with Holo Beacons.
|
||||||
* `Planet vein utilization`: Restore the original vertical alignment of vein-group counts and keep resource names in their original positions.
|
* `Planet vein utilization`: Restore the original vertical alignment of vein-group counts and keep resource names in their original positions.
|
||||||
* 1.6.1
|
* 1.6.1
|
||||||
@@ -425,7 +426,8 @@
|
|||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
* 1.6.2
|
* 1.6.2 - Unreleased
|
||||||
|
* `用于自动购买黑雾物品的传送带信号`:统一使用当前游戏中的材料名称,保留原有兑换比例。
|
||||||
* `初始化本行星`:修复行星上存在全息信标时,初始化后可能出现数组越界报错的问题。
|
* `初始化本行星`:修复行星上存在全息信标时,初始化后可能出现数组越界报错的问题。
|
||||||
* `宇宙视图行星/星系矿脉数量显示`:修复矿脉数量文字偏下和矿物名称向右偏移的问题。
|
* `宇宙视图行星/星系矿脉数量显示`:修复矿脉数量文字偏下和矿物名称向右偏移的问题。
|
||||||
* 1.6.1
|
* 1.6.1
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ public static class ItemIds
|
|||||||
|
|
||||||
/* Dark Fog items (combat expansion) */
|
/* Dark Fog items (combat expansion) */
|
||||||
public const int DarkFogMemoryUnit = 5201;
|
public const int DarkFogMemoryUnit = 5201;
|
||||||
public const int DarkFogEnergyFragment = 5202;
|
public const int DarkFogSiliconNeuron = 5202;
|
||||||
public const int DarkFogSiliconNeuron = 5203;
|
public const int DarkFogMatterReassembler = 5203;
|
||||||
public const int DarkFogNegentropySingularity = 5204;
|
public const int DarkFogNegentropySingularity = 5204;
|
||||||
public const int DarkFogMatterReassembler = 5205;
|
public const int DarkFogVirtualParticle = 5205;
|
||||||
public const int DarkFogVirtualParticle = 5206;
|
public const int DarkFogEnergyFragment = 5206;
|
||||||
|
|
||||||
/* Fuel and advanced items */
|
/* Fuel and advanced items */
|
||||||
public const int HydrogenFuelRod = 6001;
|
public const int HydrogenFuelRod = 6001;
|
||||||
@@ -80,8 +80,8 @@ public static class ItemIds
|
|||||||
public static readonly int[] ExtraOreItemIds =
|
public static readonly int[] ExtraOreItemIds =
|
||||||
[
|
[
|
||||||
Water, SulfuricAcid, Hydrogen, Deuterium, Photon,
|
Water, SulfuricAcid, Hydrogen, Deuterium, Photon,
|
||||||
DarkFogMemoryUnit, DarkFogEnergyFragment, DarkFogSiliconNeuron,
|
DarkFogMemoryUnit, DarkFogSiliconNeuron, DarkFogMatterReassembler,
|
||||||
DarkFogNegentropySingularity, DarkFogMatterReassembler, DarkFogVirtualParticle
|
DarkFogNegentropySingularity, DarkFogVirtualParticle, DarkFogEnergyFragment
|
||||||
];
|
];
|
||||||
|
|
||||||
public static readonly HashSet<int> ExtraProliferationItemIds =
|
public static readonly HashSet<int> ExtraProliferationItemIds =
|
||||||
@@ -114,10 +114,10 @@ public static class ItemIds
|
|||||||
(ProliferatorMkIII, 25f)
|
(ProliferatorMkIII, 25f)
|
||||||
];
|
];
|
||||||
|
|
||||||
/* Aliases used by UXAssist belt signal buy-out logic. */
|
/* Dark Fog materials used by production calculations. */
|
||||||
public static readonly int[] DarkFogItemIds =
|
public static readonly int[] DarkFogItemIds =
|
||||||
[
|
[
|
||||||
DarkFogMemoryUnit, DarkFogVirtualParticle, DarkFogEnergyFragment,
|
DarkFogMemoryUnit, DarkFogSiliconNeuron, DarkFogMatterReassembler,
|
||||||
DarkFogNegentropySingularity, DarkFogSiliconNeuron, DarkFogMatterReassembler
|
DarkFogNegentropySingularity, DarkFogVirtualParticle, DarkFogEnergyFragment
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -312,12 +312,12 @@ Close this function to resume mining and pumping, usually when you have enough l
|
|||||||
I18N.Add(BuildTeslaTowerAndWirelessPowerTowerAlternately, "Build Tesla Tower and Wireless Power Tower alternately", "交替建造电力感应塔和无线输电塔");
|
I18N.Add(BuildTeslaTowerAndWirelessPowerTowerAlternately, "Build Tesla Tower and Wireless Power Tower alternately", "交替建造电力感应塔和无线输电塔");
|
||||||
I18N.Add(AutoConstructButton, "Auto-construct button", "自动建造按钮");
|
I18N.Add(AutoConstructButton, "Auto-construct button", "自动建造按钮");
|
||||||
I18N.Add(BeltSignalsForBuyOutDarkFogItemsAutomatically, "Belt signals for buy out dark fog items automatically", "用于自动购买黑雾物品的传送带信号");
|
I18N.Add(BeltSignalsForBuyOutDarkFogItemsAutomatically, "Belt signals for buy out dark fog items automatically", "用于自动购买黑雾物品的传送带信号");
|
||||||
I18N.Add(MemoryUnit, "Memory Unit", "存储单元");
|
I18N.Add(MemoryUnit, "Dark Fog Matrix", "黑雾矩阵");
|
||||||
I18N.Add(EnergyFragment, "Energy Fragment", "能量碎片");
|
I18N.Add(EnergyFragment, "Energy Shard", "能量碎片");
|
||||||
I18N.Add(SiliconNeuron, "Silicon Neuron", "硅基神经元");
|
I18N.Add(SiliconNeuron, "Silicon-based Neuron", "硅基神经元");
|
||||||
I18N.Add(NegentropySingularity, "Negentropy Singularity", "负熵奇点");
|
I18N.Add(NegentropySingularity, "Negentropy Singularity", "负熵奇点");
|
||||||
I18N.Add(MatterReassembler, "Matter Reassembler", "物质重组器");
|
I18N.Add(MatterReassembler, "Matter Recombinator", "物质重组器");
|
||||||
I18N.Add(VirtualParticle, "Virtual Particle", "虚粒子");
|
I18N.Add(VirtualParticle, "Core Element", "核心素");
|
||||||
I18N.Add(CtrlShiftClickToPickItemsFromWholeBelts, "Ctrl+Shift+Click to pick items from whole belts", "按住Ctrl+Shift点击从整条传送带抓取物品");
|
I18N.Add(CtrlShiftClickToPickItemsFromWholeBelts, "Ctrl+Shift+Click to pick items from whole belts", "按住Ctrl+Shift点击从整条传送带抓取物品");
|
||||||
I18N.Add(IncludeBranchesOfBelts, "Include branches of belts", "包含传送带分支");
|
I18N.Add(IncludeBranchesOfBelts, "Include branches of belts", "包含传送带分支");
|
||||||
I18N.Add(IncludeConnectedInserters, "Include connected inserters (and their connected belts if above is checked)", "包含连接的分拣器(若勾选上面的选项则包含分拣器连接的传送带)");
|
I18N.Add(IncludeConnectedInserters, "Include connected inserters (and their connected belts if above is checked)", "包含连接的分拣器(若勾选上面的选项则包含分拣器连接的传送带)");
|
||||||
|
|||||||
@@ -58,8 +58,18 @@ internal static class BeltSignalPatch
|
|||||||
private static bool _initialized;
|
private static bool _initialized;
|
||||||
private static bool _loaded;
|
private static bool _loaded;
|
||||||
private static long _clusterSeedKey;
|
private static long _clusterSeedKey;
|
||||||
private static readonly int[] DarkFogItemIds = ItemIds.DarkFogItemIds;
|
// Signal IDs and persisted stock use this legacy order, not numeric item-ID order.
|
||||||
private static readonly int[] DarkFogItemExchangeRate = [20, 60, 30, 30, 30, 10];
|
// The native bundle gives 10 of each of three materials for one Metaverse.
|
||||||
|
// A belt selects one material, so its equivalent single-material rate is 30.
|
||||||
|
private static readonly (int ItemId, int ExchangeRate, string NameKey, string IconPath)[] DarkFogBuyOutDefinitions =
|
||||||
|
[
|
||||||
|
(ItemIds.DarkFogMemoryUnit, 20, I18NKeys.MemoryUnit, "assets/signal/dark-fog-matrix.png"),
|
||||||
|
(ItemIds.DarkFogEnergyFragment, 60, I18NKeys.EnergyFragment, "assets/signal/energy-shard.png"),
|
||||||
|
(ItemIds.DarkFogSiliconNeuron, 30, I18NKeys.SiliconNeuron, "assets/signal/silicon-based-neuron.png"),
|
||||||
|
(ItemIds.DarkFogNegentropySingularity, 30, I18NKeys.NegentropySingularity, "assets/signal/negentropy-singularity.png"),
|
||||||
|
(ItemIds.DarkFogMatterReassembler, 30, I18NKeys.MatterReassembler, "assets/signal/matter-recombinator.png"),
|
||||||
|
(ItemIds.DarkFogVirtualParticle, 10, I18NKeys.VirtualParticle, "assets/signal/core-element.png")
|
||||||
|
];
|
||||||
public static readonly int[] DarkFogItemsInVoid = [0, 0, 0, 0, 0, 0];
|
public static readonly int[] DarkFogItemsInVoid = [0, 0, 0, 0, 0, 0];
|
||||||
private static Dictionary<int, uint>[] _signalBelts = new Dictionary<int, uint>[64];
|
private static Dictionary<int, uint>[] _signalBelts = new Dictionary<int, uint>[64];
|
||||||
private static readonly HashSet<int> SignalBeltFactoryIndices = [];
|
private static readonly HashSet<int> SignalBeltFactoryIndices = [];
|
||||||
@@ -88,66 +98,20 @@ internal static class BeltSignalPatch
|
|||||||
if (!_initialized || _loaded) return;
|
if (!_initialized || _loaded) return;
|
||||||
var assembly = Assembly.GetExecutingAssembly();
|
var assembly = Assembly.GetExecutingAssembly();
|
||||||
var signals = LDB._signals;
|
var signals = LDB._signals;
|
||||||
SignalProto[] protos =
|
var protos = new SignalProto[DarkFogBuyOutDefinitions.Length];
|
||||||
[
|
for (var i = 0; i < protos.Length; i++)
|
||||||
new SignalProto
|
|
||||||
{
|
{
|
||||||
ID = 301,
|
var definition = DarkFogBuyOutDefinitions[i];
|
||||||
Name = "Memory Unit",
|
protos[i] = new SignalProto
|
||||||
GridIndex = 3801,
|
{
|
||||||
IconPath = "assets/signal/memory.png",
|
ID = 301 + i,
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/memory.png", assembly),
|
Name = definition.NameKey,
|
||||||
|
name = definition.NameKey.Translate(),
|
||||||
|
GridIndex = 3801 + i,
|
||||||
|
IconPath = definition.IconPath,
|
||||||
|
_iconSprite = Util.LoadEmbeddedSprite(definition.IconPath, assembly),
|
||||||
SID = ""
|
SID = ""
|
||||||
},
|
};
|
||||||
new SignalProto
|
|
||||||
{
|
|
||||||
ID = 302,
|
|
||||||
Name = "Energy Fragment",
|
|
||||||
GridIndex = 3802,
|
|
||||||
IconPath = "assets/signal/energy-fragment.png",
|
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/energy-fragment.png", assembly),
|
|
||||||
SID = ""
|
|
||||||
},
|
|
||||||
new SignalProto
|
|
||||||
{
|
|
||||||
ID = 303,
|
|
||||||
Name = "Silicon Neuron",
|
|
||||||
GridIndex = 3803,
|
|
||||||
IconPath = "assets/signal/silicon-neuron.png",
|
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/silicon-neuron.png", assembly),
|
|
||||||
SID = ""
|
|
||||||
},
|
|
||||||
new SignalProto
|
|
||||||
{
|
|
||||||
ID = 304,
|
|
||||||
Name = "Negentropy Singularity",
|
|
||||||
GridIndex = 3804,
|
|
||||||
IconPath = "assets/signal/negentropy.png",
|
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/negentropy.png", assembly),
|
|
||||||
SID = ""
|
|
||||||
},
|
|
||||||
new SignalProto
|
|
||||||
{
|
|
||||||
ID = 305,
|
|
||||||
Name = "Matter Reassembler",
|
|
||||||
GridIndex = 3805,
|
|
||||||
IconPath = "assets/signal/reassembler.png",
|
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/reassembler.png", assembly),
|
|
||||||
SID = ""
|
|
||||||
},
|
|
||||||
new SignalProto
|
|
||||||
{
|
|
||||||
ID = 306,
|
|
||||||
Name = "Virtual Particle",
|
|
||||||
GridIndex = 3806,
|
|
||||||
IconPath = "assets/signal/virtual-particle.png",
|
|
||||||
_iconSprite = Util.LoadEmbeddedSprite("assets/signal/virtual-particle.png", assembly),
|
|
||||||
SID = ""
|
|
||||||
},
|
|
||||||
];
|
|
||||||
foreach (var proto in protos)
|
|
||||||
{
|
|
||||||
proto.name = proto.Name.Translate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var index = signals.dataArray.Length;
|
var index = signals.dataArray.Length;
|
||||||
@@ -358,7 +322,8 @@ internal static class BeltSignalPatch
|
|||||||
var cargoPath = cargoTraffic.GetCargoPath(belt.segPathId);
|
var cargoPath = cargoTraffic.GetCargoPath(belt.segPathId);
|
||||||
var itemIdx = kvp.Value;
|
var itemIdx = kvp.Value;
|
||||||
if (cargoPath == null) continue;
|
if (cargoPath == null) continue;
|
||||||
var itemId = DarkFogItemIds[itemIdx];
|
var definition = DarkFogBuyOutDefinitions[itemIdx];
|
||||||
|
var itemId = definition.ItemId;
|
||||||
var consume = (byte)Math.Min(DarkFogItemsInVoid[itemIdx], 4);
|
var consume = (byte)Math.Min(DarkFogItemsInVoid[itemIdx], 4);
|
||||||
if (consume < 4)
|
if (consume < 4)
|
||||||
{
|
{
|
||||||
@@ -369,7 +334,7 @@ internal static class BeltSignalPatch
|
|||||||
propertySystem.AddItemConsumption(_clusterSeedKey, ItemIds.Metaverse, metaverse);
|
propertySystem.AddItemConsumption(_clusterSeedKey, ItemIds.Metaverse, metaverse);
|
||||||
var mainPlayer = GameMain.mainPlayer;
|
var mainPlayer = GameMain.mainPlayer;
|
||||||
GameMain.history.AddPropertyItemConsumption(ItemIds.Metaverse, metaverse, true);
|
GameMain.history.AddPropertyItemConsumption(ItemIds.Metaverse, metaverse, true);
|
||||||
var count = DarkFogItemExchangeRate[itemIdx] * metaverse;
|
var count = definition.ExchangeRate * metaverse;
|
||||||
DarkFogItemsInVoid[itemIdx] += count;
|
DarkFogItemsInVoid[itemIdx] += count;
|
||||||
consume = (byte)Math.Min(DarkFogItemsInVoid[itemIdx], 4);
|
consume = (byte)Math.Min(DarkFogItemsInVoid[itemIdx], 4);
|
||||||
mainPlayer.mecha.AddProductionStat(itemId, count, mainPlayer.nearestFactory);
|
mainPlayer.mecha.AddProductionStat(itemId, count, mainPlayer.nearestFactory);
|
||||||
|
|||||||
@@ -73,13 +73,13 @@
|
|||||||
* Belt signals for buy out dark fog items automatically
|
* Belt signals for buy out dark fog items automatically
|
||||||
* 6 belt signals are added to the signal panel, which can be used to buy out dark fog items automatically.
|
* 6 belt signals are added to the signal panel, which can be used to buy out dark fog items automatically.
|
||||||
* Generated items are stacked in 4 items.
|
* Generated items are stacked in 4 items.
|
||||||
* Exchange ratio is following the original game design, aka:
|
* Exchange ratios follow the original game design. The native mixed bundle gives 10 each of Silicon-based Neurons, Negentropy Singularities, and Matter Recombinators for 1 Metaverse; a belt chooses one material at an equivalent rate of 30:
|
||||||
* 1 Metaverse = 20 Dark Fog Matrices
|
* 1 Metaverse = 20 Dark Fog Matrices (item `5201`)
|
||||||
* 1 Metaverse = 60 Engery Shards
|
* 1 Metaverse = 60 Energy Shards (item `5206`)
|
||||||
* 1 Metaverse = 30 Silicon-based Neurons
|
* 1 Metaverse = 30 Silicon-based Neurons (item `5202`)
|
||||||
* 1 Metaverse = 30 Negentropy Singularities
|
* 1 Metaverse = 30 Negentropy Singularities (item `5204`)
|
||||||
* 1 Metaverse = 30 Matter Recombinators
|
* 1 Metaverse = 30 Matter Recombinators (item `5203`)
|
||||||
* 1 Metaverse = 10 Core Elements
|
* 1 Metaverse = 10 Core Elements (item `5205`)
|
||||||
* Tweak building buffer
|
* Tweak building buffer
|
||||||
* Factory recipe buffer formula: take the larger value between `Assembler buffer time multiplier(in seconds) * items needed per second` and `Assembler buffer minimum multiplier * items needed per recipe`
|
* Factory recipe buffer formula: take the larger value between `Assembler buffer time multiplier(in seconds) * items needed per second` and `Assembler buffer minimum multiplier * items needed per recipe`
|
||||||
* `Assembler buffer time multiplier(in seconds)`: Range 2-10, default is 4 (same as game)
|
* `Assembler buffer time multiplier(in seconds)`: Range 2-10, default is 4 (same as game)
|
||||||
@@ -240,7 +240,7 @@
|
|||||||
* 用于自动购买黑雾物品的传送带信号
|
* 用于自动购买黑雾物品的传送带信号
|
||||||
* 在信号面板上添加了6个传送带信号,可以用于自动购买黑雾道具。
|
* 在信号面板上添加了6个传送带信号,可以用于自动购买黑雾道具。
|
||||||
* 生成的物品堆叠数为4。
|
* 生成的物品堆叠数为4。
|
||||||
* 兑换比率遵循原始游戏设计,即:
|
* 兑换比率遵循原始游戏设计。原生组合兑换用 1 个元宇宙换取硅基神经元、负熵奇点和物质重组器各 10 个;传送带只选择其中一种材料,等值兑换数量为 30 个:
|
||||||
* 1个元宇宙 = 20个黑雾矩阵
|
* 1个元宇宙 = 20个黑雾矩阵
|
||||||
* 1个元宇宙 = 60个能量碎片
|
* 1个元宇宙 = 60个能量碎片
|
||||||
* 1个元宇宙 = 30个硅基神经元
|
* 1个元宇宙 = 30个硅基神经元
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="assets/signal/energy-fragment.png" />
|
<EmbeddedResource Include="assets/signal/dark-fog-matrix.png" />
|
||||||
<EmbeddedResource Include="assets/signal/memory.png" />
|
<EmbeddedResource Include="assets/signal/energy-shard.png" />
|
||||||
<EmbeddedResource Include="assets/signal/negentropy.png" />
|
<EmbeddedResource Include="assets/signal/silicon-based-neuron.png" />
|
||||||
<EmbeddedResource Include="assets/signal/reassembler.png" />
|
<EmbeddedResource Include="assets/signal/negentropy-singularity.png" />
|
||||||
<EmbeddedResource Include="assets/signal/silicon-neuron.png" />
|
<EmbeddedResource Include="assets/signal/matter-recombinator.png" />
|
||||||
<EmbeddedResource Include="assets/signal/virtual-particle.png" />
|
<EmbeddedResource Include="assets/signal/core-element.png" />
|
||||||
<EmbeddedResource Include="assets/icon/in.png" />
|
<EmbeddedResource Include="assets/icon/in.png" />
|
||||||
<EmbeddedResource Include="assets/icon/out.png" />
|
<EmbeddedResource Include="assets/icon/out.png" />
|
||||||
<EmbeddedResource Include="assets/icon/keep.png" />
|
<EmbeddedResource Include="assets/icon/keep.png" />
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |