Rig: base power draw follows the installed cards
The game recomputes a machine's draw from its base-draw tag whenever a module is added or removed. The rig kept that tag at the body's 2 kJ, so the game briefly rewrote the draw to a percentage of 2 kJ before the mod put it back. The tag now carries the body plus all cards (without modules). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a4572efb6
commit
8bdaad474e
2 files changed
+5
No files matched your search
@@ -15,3 +15,4 @@
|
|||||||
- 交易终端和显卡重画成略微俯视:终端是带顶面的显示器加梯形键盘;显卡是一块真正的显卡(左端金属挡板带接口、两个风扇、品牌色条、底边金手指和 PCIe 缺口、顶上供电口),尺寸改为 2×2 格。
|
- 交易终端和显卡重画成略微俯视:终端是带顶面的显示器加梯形键盘;显卡是一块真正的显卡(左端金属挡板带接口、两个风扇、品牌色条、底边金手指和 PCIe 缺口、顶上供电口),尺寸改为 2×2 格。
|
||||||
- 矿架默认 2 个显卡槽,投入电子元件升级,最多 5 个:第 3 槽 4 个普通电子元件,第 4 槽 1 个稀有,第 5 槽 2 个稀有。窗口里新增"升级槽位",只收下一级需要的元件,放进去立即消耗并累计进度;显卡格子的形状随槽数变化,槽数与进度存在矿架标签上。
|
- 矿架默认 2 个显卡槽,投入电子元件升级,最多 5 个:第 3 槽 4 个普通电子元件,第 4 槽 1 个稀有,第 5 槽 2 个稀有。窗口里新增"升级槽位",只收下一级需要的元件,放进去立即消耗并累计进度;显卡格子的形状随槽数变化,槽数与进度存在矿架标签上。
|
||||||
|
|
||||||
|
- 矿架的"基础耗电"标签随显卡变化(机身 + 各卡耗电,不含模块),游戏装卸模块时据此重算,不会把耗电改回只有机身的 2 kJ。
|
||||||
@@ -207,6 +207,10 @@ namespace Decentralized
|
|||||||
{
|
{
|
||||||
var b = Bonus(rig, modules);
|
var b = Bonus(rig, modules);
|
||||||
int kj = RigKj(cards, b);
|
int kj = RigKj(cards, b);
|
||||||
|
// 基础耗电 = 机身 + 所有显卡(不含模块)。游戏装卸模块时用这个基础值重算耗电,所以它必须随显卡变化,
|
||||||
|
// 否则游戏会把耗电改回"只有机身的 2 kJ"再按百分比折算。
|
||||||
|
int baseKj = RigKj(cards, ModuleBonus.None);
|
||||||
|
rig.ModifyTag("MACHINERY_DRAWN_POWER_BASE", s => s.Enable().SetInt(baseKj));
|
||||||
rig.ModifyTag(MachineryHelper.MACHINERY_DRAWN_POWER, s => s.Enable().SetInt(kj));
|
rig.ModifyTag(MachineryHelper.MACHINERY_DRAWN_POWER, s => s.Enable().SetInt(kj));
|
||||||
double hash = Cards(cards).Select(ToUnit).Sum(u => u.Hash(b));
|
double hash = Cards(cards).Select(ToUnit).Sum(u => u.Hash(b));
|
||||||
int slots = SlotsOf(rig);
|
int slots = SlotsOf(rig);
|
||||||
|
|||||||
Reference in new issue
Block a user