diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 4a37982a50aecc22e18309411ecf3bbbde1c2565..d4693f1c0875022a56fe0e8cc5d3e8860e511b7e 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1173,6 +1173,14 @@ App.Update.globalVariables = function(node) { V.StudCum = Math.max(+V.StudCum, 0) || 0; } + // Recalculate finished prosthetics + V.adjustProstheticsCompleted = 0; + for (const prosthetic of V.adjustProsthetics) { + if (prosthetic.workLeft <= 0) { + V.adjustProstheticsCompleted++; + } + } + EconomyDatatypeCleanup(); ArcologyDatatypeCleanup(); diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw index 0fd30c4d0c73eef8a3b0972ca3ca6d04e82de5d9..09e661aec1177c6ea24c58aa7994f95c0258f07a 100644 --- a/src/uncategorized/multiImplant.tw +++ b/src/uncategorized/multiImplant.tw @@ -87,6 +87,7 @@ that are ready be sent down. <<set _p = $adjustProsthetics[_k]>> <<if _p.slaveID == $activeSlave.ID && _p.workLeft <= 0>> <<set $adjustProsthetics.splice(_k, 1), _k-->> + <<set $adjustProstheticsCompleted-->> <<set addProsthetic($activeSlave, _p.id)>> <br><hr> <<switch _p.id>> @@ -205,7 +206,6 @@ that are ready be sent down. /* updates the interrogated slave */ <<set $slaves[_i] = $activeSlave>> <</for>> /* end of the $slaves loop */ -<<set $adjustProstheticsCompleted = 0>> /* This needs to be down here to over-ride any Surgery Degradation calls */ <<set $nextButton = "Continue">>