diff --git a/CheatEnabler/CHANGELOG.md b/CheatEnabler/CHANGELOG.md index d5470fe..c160063 100644 --- a/CheatEnabler/CHANGELOG.md +++ b/CheatEnabler/CHANGELOG.md @@ -3,9 +3,11 @@ ## Changlog -* 2.4.8 - Unreleased - * `Finish build immediately`: Defer construction until the opening cutscene ends or is skipped to avoid possible errors when starting a new game. - * `Belt signal item generation`: Calculate raw-material, intermediate, and proliferator statistics from the game's current recipe data, counting by-products and consumption separately. If an item's recipe data is incomplete, only its upstream statistics pause, with the reason logged; item generation is unaffected. Fix signal belts built or destroyed on another planet, for example by Battlefield Analysis Base drones or Dark Fog attacks, affecting a belt on the current planet instead of their own; a destroyed belt could also keep generating items on a belt later built in its place. +* 2.4.8 + * `Finish build immediately`: Fix possible errors when starting a new game. Construction begins after the opening cutscene ends or is skipped. + * `Belt signal item generation`: + * Improve raw-material, intermediate, by-product and proliferator statistics using current recipes, with production and consumption counted separately. Incomplete recipe data only pauses the affected upstream statistics; item generation continues. + * Fix signal belts built or destroyed on other planets, such as by Battlefield Analysis Base drones or Dark Fog attacks, affecting belts on the current planet. Destroyed signal belts no longer cause replacement belts to keep generating items. * 2.4.7 * `Dev Shortcuts`: Work immediately when enabled after loading a save, and process each key press once per frame at accelerated game speeds. * Extend `Unlock Tech with Key-Modifiers` with a downgrade mode. @@ -204,9 +206,11 @@ ## 更新日志 -* 2.4.8 - Unreleased - * `建造秒完成`:延后到开场动画播放结束或跳过后再处理建造,避免开始新游戏时可能报错。 - * `传送带信号物品生成`:原料、中间产物和增产剂的统计改为按游戏当前配方数据计算,并分别计入副产物和消耗。某物品的配方数据不完整时,仅暂停该物品的上游统计并在日志中说明原因,不影响物品生成。修复在其他星球上建造或被摧毁的信号传送带(例如由战场分析基站的无人机建造或被黑雾摧毁)错误影响当前星球上传送带的问题;被摧毁的传送带也可能让之后在原处新建的传送带继续生成物品。 +* 2.4.8 + * `建造秒完成`:修复开始新游戏时可能报错的问题。建造会在开场动画播放结束或跳过后开始。 + * `传送带信号物品生成`: + * 按当前配方完善原料、中间产物、副产物和增产剂的统计,分别记录生产和消耗。配方数据不完整时,仅暂停受影响物品的上游统计,物品仍会正常生成。 + * 修复其他星球上的信号传送带在建造或被摧毁时,错误影响当前星球上传送带的问题,例如战场分析基站无人机建造或黑雾摧毁传送带。被摧毁的信号传送带也不会再让之后替换它的传送带继续生成物品。 * 2.4.7 * `开发模式快捷键`:修复载入存档后启用时不生效的问题;加速游戏时每次按键仍只执行一次。 * `使用组合键点击解锁科技` 新增降级模式。 diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md index 1ab1ed6..7de6eb9 100644 --- a/UXAssist/CHANGELOG.md +++ b/UXAssist/CHANGELOG.md @@ -3,10 +3,15 @@ ## Changlog -* 1.6.3 - Unreleased - * `Sunlight at night`: Base lighting on the camera and the viewed surface instead of Icarus's facing direction, including planet view. Keep building, terrain, solar-panel, and belt lighting directions synchronized, recover when the active light or planet changes, and restore native lighting when sailing, disabling the feature, or using white rendering mode. - * `Quick build Mining Machines`: Add a Factory-tab button that searches dense layouts at the nearest solid vein group using native collision shapes, including interleaving feet, joint placement of nearby miners, and a final pass to fill remaining compatible positions. Mines only the selected group, even when another group of the same resource is nearby. `Allow restoring/burying veins` is off by default: uses only visible nodes and skips all restoration and burial calculations. When enabled, restores available buried nodes and may bury unused nodes to improve coverage. Optimizes summed vein coverage, requires at least 3 covered nodes in the selected group per miner after any burial, and places the full ordinary miner layout regardless of stock, leaving ghosts awaiting missing materials. Accelerates layout searches with up to 4 background workers, capped at half the available logical processors. Writes replayable JSON snapshots during feature tuning and keeps the completion tip visible for about 8 seconds. - * `Blueprint descriptions`: Add an `Auto-fill description` button and a `Proliferation` checkbox above the description boxes in the blueprint browser, copy, and paste panels. The button replaces the main description with the blueprint's full-load material flows per minute on separate `Missing`, `Excess`, `Input`, `Output`, and `Research` lines, and writes factory and logistics power demand to a `Power` custom field. Inputs are limited to what downstream buildings can use, matrices made in a blueprint with a research-mode lab are listed under `Research`, and research-mode labs are budgeted at full working power. Large material rates use the largest exact K/M/G suffix with at most one decimal place, falling back to ordinary numbers when necessary to preserve display precision. The checkbox defaults to on when the blueprint contains a Spray Coater. Unknown values are marked instead of shown as zero, other custom fields are preserved, and nothing is saved automatically. +* 1.6.3 + * `Quick build Mining Machines`: + * Add a Factory-tab button to arrange ordinary Mining Machines densely around the nearest solid vein group. Each miner covers at least 3 nodes from that group, without including nearby groups. Layouts are not limited by stock; missing miners remain as ghosts awaiting materials. Placement respects construction range and does not include belts or power facilities. Click again to cancel a search. + * `Allow restoring/burying veins` is off by default, using only visible nodes without restoring or burying any. Enable it to restore unobstructed nodes away from Dark Fog Planetary Bases and allow unused nodes to be buried for better coverage. Nodes used by existing miners or miner ghosts are protected. + * `Blueprint descriptions`: + * Add `Auto-fill description` to the blueprint browser, copy, and paste panels. It replaces the main description with full-load material flows per minute, separating shortages, surpluses, inputs, outputs, and research use, and adds factory and logistics power demand to a `Power` custom field. + * A `Proliferation` checkbox controls whether calculations include proliferation, defaulting to on when the blueprint contains a Spray Coater. Large rates use K/M/G where display precision is preserved, and numbers with four or more integer digits use comma thousands separators, including before suffixes; unknown values are marked separately. Other custom fields are preserved, and the blueprint still needs to be saved manually. + * `Sunlight at night`: Lighting now follows the camera, including planet view, and stays consistent across buildings, terrain, solar panels, and belts. Restore lighting correctly after switching planets, and return to native lighting when sailing, disabling the feature, or using white rendering mode. + * `Protect veins from exhaustion`: Fix the option failing to take effect in 1.6.2, restoring protection of configured vein reserves and minimum oil rates, along with the corresponding mining statistics. * 1.6.2 * `Increase maximum power usage in Logistic Stations and Advanced Mining Machines`: Fix zero or corrupted mining speeds when adjusting an Advanced Mining Machine's speed slider with the option enabled. * `Tweak building buffers`: Restore the Ray Receiver Graviton Lens buffer setting on DSP 0.10.35.29104 and later, and correct the displayed native buffer value to 2. @@ -438,10 +443,15 @@ ## 更新日志 -* 1.6.3 - Unreleased - * `夜间日光灯`:按镜头和当前观察位置的地表方向计算光照,不再跟随机甲朝向,行星视图也适用。统一建筑、地表、太阳能板和传送带的光照方向,在光源或行星切换后恢复功能,并在航行、关闭功能或白模渲染时恢复原版光照。 - * `快速铺设采矿机`:在「工厂」页增加按钮,按游戏实际碰撞体在最近的固体矿脉搜索密集布局,支持脚部交错、邻近矿机联动调整及结束前补入剩余可用位置。仅开采选中的矿脉,不混入附近同种资源的其他矿脉。「允许恢复/掩埋矿物」默认关闭:仅使用可见矿点,跳过所有恢复和掩埋计算;开启后,恢复可恢复的掩埋矿点,并允许掩埋未被使用的矿点来提高覆盖数。以各台矿机覆盖矿点数之和为目标,要求每台在掩埋后仍覆盖选中矿脉的至少 3 个矿点,不受库存限制地生成完整布局,缺少采矿机的位置保留待建造虚影。使用最多 4 个后台线程加速布局搜索,线程数不超过可用逻辑线程数的一半。功能调试期间输出可离线重放的 JSON 数据,完成提示保留约 8 秒。 - * `蓝图说明`:在蓝图浏览、复制和粘贴界面的说明框上方增加「自动填写说明」按钮和「增产」复选框。点击按钮会用蓝图满负荷运行时每分钟的物料流量替换原说明,按需分行列出「缺少」「多余」「输入」「输出」「研究」,并将工厂与物流耗电写入「耗电」自定义字段。输入量以下游建筑实际能消耗的量为限;蓝图含研究模式研究站时,蓝图内产出的矩阵列入「研究」行,研究模式研究站均按满负荷计入耗电。较大的物料流量使用能精确表示的最大 K/M/G 单位,小数最多一位;无法保留显示精度时,保留普通数字。蓝图含喷涂机时,复选框默认勾选。无法计算的数值会单独标注而不显示为零,其他自定义字段保持不变,也不会自动保存蓝图。 +* 1.6.3 + * `快速铺设采矿机`: + * 在「工厂」页增加按钮,自动在最近的固体矿脉周围密集铺设普通采矿机。每台至少覆盖选中矿脉的 3 个矿点,不混入附近其他矿脉。布局数量不受库存限制,采矿机不足的位置保留待建造虚影。遵守建造范围,不自动铺设传送带和电力设施。计算期间再次点击可取消。 + * 「允许恢复/掩埋矿物」默认关闭,仅使用可见矿点,不恢复或掩埋矿点。开启后可恢复未被建筑阻挡、且远离黑雾行星基地的矿点,并允许掩埋未使用的矿点来提高覆盖数;已有矿机和待建造矿机使用的矿点会受到保护。 + * `蓝图说明`: + * 在蓝图浏览、复制和粘贴界面增加「自动填写说明」按钮,用满负荷运行时每分钟的物料流量替换原说明,分别列出「缺少」「多余」「输入」「输出」「研究」,并将工厂与物流耗电写入「耗电」自定义字段。 + * 可用「增产」复选框选择是否计入增产效果,蓝图含喷涂机时默认勾选。较大的流量在保留显示精度的前提下使用 K/M/G 单位;整数部分达到四位的数字用逗号每三位分隔,带单位时也适用。无法计算的数值单独标注。保留其他自定义字段,填写后仍需手动保存蓝图。 + * `夜间日光灯`:光照改为随镜头变化,行星视图也适用;建筑、地表、太阳能板和传送带的光照方向保持一致。切换行星后正确恢复光照,航行、关闭功能或进入白模渲染时恢复原版光照。 + * `保护矿脉不会枯竭`:修复 1.6.2 中开启后仍不生效的问题,恢复设定的矿脉剩余量、油井最低流速保护及相应开采统计。 * 1.6.2 * `提升物流塔和大型采矿机的最大功耗`:修复启用后调整大型采矿机开采速度时出现 0% 或异常速度的问题。 * `调整建筑输入缓冲`:修复 DSP 0.10.35.29104 及后续版本中射线接收器透镜缓冲设置不生效的问题,并将显示的游戏原始值更正为 2。 diff --git a/UXAssist/Production/BlueprintDescriptionText.cs b/UXAssist/Production/BlueprintDescriptionText.cs index 15747a7..b10b4ac 100644 --- a/UXAssist/Production/BlueprintDescriptionText.cs +++ b/UXAssist/Production/BlueprintDescriptionText.cs @@ -159,7 +159,7 @@ public static class BlueprintDescriptionFormatter var scale = Math.Pow(1000, unit + 1); // Keep the existing display precision; abbreviate only exact tenths of a unit. if (rounded >= scale && rounded % (scale / 10) == 0) - return (rounded / scale).ToString("0.#", CultureInfo.InvariantCulture) + RateUnits[unit]; + return (rounded / scale).ToString("#,##0.#", CultureInfo.InvariantCulture) + RateUnits[unit]; } return FormatNumber(value); @@ -191,7 +191,7 @@ public static class BlueprintDescriptionFormatter throw new InvalidOperationException("A blueprint report contains an invalid rate or power value."); var rounded = RoundForDisplay(value); if (rounded > 0 || value == 0) - return rounded.ToString(value < 1 ? "0.###" : "0.##", CultureInfo.InvariantCulture); + return rounded.ToString(value < 1 ? "0.###" : "#,##0.##", CultureInfo.InvariantCulture); var precise = value.ToString("0.######", CultureInfo.InvariantCulture); return precise != "0" ? precise : value.ToString("0.###E+0", CultureInfo.InvariantCulture); } diff --git a/UXAssist/README.md b/UXAssist/README.md index 721b483..a8d5b09 100644 --- a/UXAssist/README.md +++ b/UXAssist/README.md @@ -18,7 +18,8 @@ * Fix a bug that warning popup on `Veins Utilization` upgraded to level 8000+ * Sort blueprint structures before saving, to reduce generated blueprint data size a little * Add an `Auto-fill description` button and a `Proliferation` checkbox to the blueprint browser, copy, and paste panels, to fill the description with the blueprint's material flows per minute and its power demand - * Large material rates use the largest exact `K`/`M`/`G` suffix with at most one decimal place; rates that cannot be shortened without losing display precision keep their ordinary format + * Replaces the main description with full-load material flows and writes power demand to a `Power` custom field, preserving other custom fields. Proliferation defaults to on when the blueprint contains a Spray Coater. Save the blueprint manually to keep the changes. + * Large material rates use the largest exact `K`/`M`/`G` suffix with at most one decimal place; rates that cannot be shortened without losing display precision keep their ordinary format. Numbers with four or more integer digits use comma thousands separators, including before suffixes (for example, `12,345` and `1,234.5K`). * Increase maximum count of Metadata Instantiations to 20000 (from 2000) * Increase capacity of player order queue to 128 (from 16) * Enable `Hide UI` (`F11` by default) in Star Map view, hiding UI and other scene elements @@ -222,7 +223,8 @@ * 修复了`矿物利用`升级到8000级以上时弹出警告的bug * 保存蓝图前对建筑进行排序,以减少生成的蓝图数据大小 * 在蓝图浏览、复制和粘贴界面增加「自动填写说明」按钮和「增产」复选框,用蓝图每分钟的物料流量和耗电自动填写说明 - * 较大的物料流量使用能精确表示的最大 `K`/`M`/`G` 单位,小数最多一位;无法在保留显示精度的前提下缩写时,保留普通数字格式 + * 用满负荷运行时的物料流量替换原说明,将耗电写入「耗电」自定义字段,保留其他自定义字段。蓝图含喷涂机时默认勾选增产。填写后需手动保存蓝图。 + * 较大的物料流量使用能精确表示的最大 `K`/`M`/`G` 单位,小数最多一位;无法在保留显示精度的前提下缩写时,保留普通数字格式。整数部分达到四位的数字用逗号每三位分隔,带单位时也适用,例如 `12,345` 和 `1,234.5K`。 * 将元数据提取的最大数量增加到20000(原来为2000) * 将玩家指令队列的容量增加到128(原来为16) * 在星图视图中启用 `隐藏 UI` 功能(默认按键为 `F11`),同时隐藏 UI 和场景中的其他元素 diff --git a/UXAssist/docs/ProductionArchitecture.md b/UXAssist/docs/ProductionArchitecture.md index 313ac51..808ff5e 100644 --- a/UXAssist/docs/ProductionArchitecture.md +++ b/UXAssist/docs/ProductionArchitecture.md @@ -68,7 +68,7 @@ Native research uses the current lab technology's matrix point requirements, wit The shared `UIBlueprintInspector` in browser, copy, and paste modes hosts `Auto-fill description` with `Proliferation` immediately to its right in one row above every description box. Move the first native inspector group down once, and offset later groups and the scroll height after each native refresh so the controls do not split the smaller fields from the main description. The checkbox initially reflects the blueprint's Spray Coater prefab capability and tracks content changes until manually changed in the current editing session; changing it does not modify the blueprint. Clicking the button captures only `blueprint.buildings` with `BlueprintSelectionReader.FromBlueprint` on the game thread, then runs `FactoryBlackBoxAnalyzer` against the captured catalog. The maximum supported proliferation level applies while each building keeps its acceleration or extra-products mode. Input coating is assumed to be supplied externally; no spray routing or spray consumption is inferred from the Spray Coater. -`BlueprintDescriptionFormatter` builds replacement multiline `blueprint.desc` text in this order: optional `Missing:` and `Excess:` lines for intermediate shortages and true overbuild; `Input:` for external inputs capped by downstream demand; `Output:` for ordinary final products and necessary coproduct surplus; and `Research:` for positive net matrix production accepted by a selected research-mode lab. Each warning category has one label followed by comma-separated items; warnings do not repeat in Input, and a matrix on Research does not repeat in Output. It uses `SteadyStateExternalSupply` for complete and independently known partial inputs, labeling partial values as known portions. The assumed lab adds no numerical matrix consumption or external input; other buildings' known matrix demand is subtracted from the Research rate. Omit each empty line, including Research when no produced matrix remains. A single optional `Power` custom field separates factory and configured logistics consumption, omitting categories with no demand and removing the field altogether if neither consumes power; a present but unknown category displays `Unknown` rather than zero. Material rates remain items per minute even though the description labels omit the unit. Rates are rounded only for display. Large displayed rates use the largest exact K/M/G suffix with at most one decimal place (for example, 1,234,000 becomes 1234K); if no suffix preserves that display precision, keep the ordinary number. Rates are ordered by item ID within each category, and use native item icon/name tags with comma-separated entries inside each description line. Uncertain final-product, overbuild, or coproduct conclusions are omitted. Veins and other scene objects are not blueprint entries or requested parameters. +`BlueprintDescriptionFormatter` builds replacement multiline `blueprint.desc` text in this order: optional `Missing:` and `Excess:` lines for intermediate shortages and true overbuild; `Input:` for external inputs capped by downstream demand; `Output:` for ordinary final products and necessary coproduct surplus; and `Research:` for positive net matrix production accepted by a selected research-mode lab. Each warning category has one label followed by comma-separated items; warnings do not repeat in Input, and a matrix on Research does not repeat in Output. It uses `SteadyStateExternalSupply` for complete and independently known partial inputs, labeling partial values as known portions. The assumed lab adds no numerical matrix consumption or external input; other buildings' known matrix demand is subtracted from the Research rate. Omit each empty line, including Research when no produced matrix remains. A single optional `Power` custom field separates factory and configured logistics consumption, omitting categories with no demand and removing the field altogether if neither consumes power; a present but unknown category displays `Unknown` rather than zero. Material rates remain items per minute even though the description labels omit the unit. Rates are rounded only for display. Large displayed rates use the largest exact K/M/G suffix with at most one decimal place (for example, 1,234,000 becomes 1,234K); if no suffix preserves that display precision, keep the ordinary number. Numbers with four or more integer digits use comma thousands separators, including coefficients before material or power units. Rates are ordered by item ID within each category, and use native item icon/name tags with comma-separated entries inside each description line. Uncertain final-product, overbuild, or coproduct conclusions are omitted. Veins and other scene objects are not blueprint entries or requested parameters. `BlueprintDescriptionFields` matches only exact English or Simplified Chinese power field titles, updates or removes matching power fields, and collapses duplicate matches; all other fields, including input/output custom fields, stay intact. The inspector first collects pending custom-field edits, checks the native 2,000-character description limit and `kMaxFieldCount`, and applies native `ExternalFieldEscape` and `ExternalFieldUnescape` rules to the remaining power field. An invalid blueprint, unavailable catalog, failed calculation, malformed fields, overlong description, or insufficient capacity does not overwrite the description or generated fields. A successful update replaces the original description, synchronizes its native input control, and refreshes the inspector and share-code preview through the native modification path, leaving save and copy actions to the native buttons. Native `Refresh` recalculates the later groups' positions and the scroll height but not the first group's position, and `Refresh(forModify: true)` does not reload `descTextInput`, so assign it explicitly. `BlueprintData.Validate` strips newlines from custom fields, so multiline text belongs only in the main description. Recheck these inspector behaviors against the original DLL after game updates. The formatting and field updater remain pure-managed so `ProductionCheck` can verify them without loading Unity. diff --git a/UXAssist/tools/ProductionCheck/Program.cs b/UXAssist/tools/ProductionCheck/Program.cs index b2db4d4..faf377e 100644 --- a/UXAssist/tools/ProductionCheck/Program.cs +++ b/UXAssist/tools/ProductionCheck/Program.cs @@ -2074,7 +2074,11 @@ internal static class Program "gigawatt and megawatt display matches the native Chinese field example"); Check(large.Input == "" && large.Output == "" && large.Description == "", "empty material categories add no description lines"); - foreach (var (watts, expected) in new[] { (999.999, "1kW"), (999999.0, "1MW"), (999.994, "999.99W") }) + foreach (var (watts, expected) in new[] + { + (999.999, "1kW"), (999999.0, "1MW"), (999.994, "999.99W"), + (1234567890000000.0, "1,234.57TW") + }) { var boundary = new ProductionReport(ProductionStatus.Complete, true, true, Array.Empty(), Array.Empty(), @@ -2162,9 +2166,11 @@ internal static class Program (1000.0, "1K"), (1200.0, "1.2K"), (1200.0000000001, "1.2K"), (1000000.0, "1M"), (1200000.0, "1.2M"), (1000000000.0, "1G"), (1200000000.0, "1.2G"), - (1234000.0, "1234K"), (1234500.0, "1234.5K"), (1230000000.0, "1230M"), - (12345.0, "12345"), (1200.01, "1200.01"), - (999999.0, "999999"), (999999.99, "999999.99"), + (1234000.0, "1,234K"), (1234500.0, "1,234.5K"), (1230000000.0, "1,230M"), + (12345.0, "12,345"), (1200.01, "1,200.01"), + (999.99, "999.99"), (1000.01, "1,000.01"), + (999999.0, "999,999"), (999999.99, "999,999.99"), + (1234567890123.0, "1,234,567,890,123"), (1234000000000.0, "1,234G"), (0.125, "0.125"), (0.00001, "0.00001"), (0.0000001, "1E-7") }) {