diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 18e5a2ba208c91e138b6ea16131734f62984dedb..b1a178147bec7cddcb7f5fa79c7a8214232df830 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -303,46 +303,50 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <<else>> <<capture _p>> <div> - <<if $prosthetics[_p].amount > 0>> - <<link "From storage" "Prosthetics Configuration">> - <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), $prosthetics[_p].amount -= 1>> - <</link>> - <<else>> - <<link "<<= cashFormat(setup.prosthetics[_p].costs)>>" "Prosthetics Configuration">> - <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), cashX(forceNeg(setup.prosthetics[_p].costs), "slaveMod", getSlave($AS))>> - <</link>> - <</if>> + <<if $prosthetics[_p].amount > 0>> + <<link "From storage" "Prosthetics Configuration">> + <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), $prosthetics[_p].amount -= 1>> + <</link>> + <<else>> + <<link "<<= cashFormat(setup.prosthetics[_p].costs)>>" "Prosthetics Configuration">> + <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), cashX(forceNeg(setup.prosthetics[_p].costs), "slaveMod", getSlave($AS))>> + <</link>> + <</if>> </div> <<if $prosthetics[_p].research > 0>> - <div style="text-align:center"> - <<if $researchLab.level > 0 && $prosthetics[_p].research > 0>> - <<link "Construct" "Prosthetics Configuration">> - <<set $researchLab.tasks.push({ - type: "craftFit", - id: _p, - workLeft: (setup.prosthetics[_p].adjust + setup.prosthetics[_p].craft) / 1.5, - slaveID: $AS})>> - /* 1.5: longer than adjust, but faster than adjust+craft. */ - <</link>> - <</if>> - </div> - <div style="text-align:right"> - <<if $researchLab.speed >= 300 && $prosthetics[_p].research > 0>> /* max speed */ - <<if $prosthetics[_p].amount > 0>> - <<link "From storage: <<= cashFormat(setup.prosthetics[_p].adjust * 50)>>" "Prosthetics Configuration">> - <<set cashX(forceNeg(setup.prosthetics[_p].costs * 1.5), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> - <</link>> - <<else>> - <<link "<<= cashFormat(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100)>>" "Prosthetics Configuration">> - <<set cashX(forceNeg(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> - <</link>> - <</if>> - <</if>> - </div> + <div style="text-align:center"> + <<if $researchLab.level > 0 && $prosthetics[_p].research > 0>> + <<link "Construct" "Prosthetics Configuration">> + <<set $researchLab.tasks.push({ + type: "craftFit", + id: _p, + workLeft: (setup.prosthetics[_p].adjust + setup.prosthetics[_p].craft) / 1.5, + slaveID: $AS})>> + /* 1.5: longer than adjust, but faster than adjust+craft. */ + <</link>> + <</if>> + </div> + <div style="text-align:right"> + <<if $researchLab.speed >= 300 && $prosthetics[_p].research > 0>> /* max speed */ + <<if $prosthetics[_p].amount > 0>> + <<link "From storage: <<= cashFormat(setup.prosthetics[_p].adjust * 50)>>" "Prosthetics Configuration">> + <<set cashX(forceNeg(setup.prosthetics[_p].costs * 1.5), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> + <</link>> + <<else>> + <<link "<<= cashFormat(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100)>>" "Prosthetics Configuration">> + <<set cashX(forceNeg(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> + <</link>> + <</if>> + <</if>> + </div> <<elseif $researchLab.level > 0>> - <div class="research"> - //Not researched.// - </div> + <div class="research"> + //Not researched.// + </div> + <<else>> + <div class="research"> + //You need to construct a lab first.// + </div> <</if>> <</capture>> <</if>>