Skip to content
Snippets Groups Projects
Commit 38487b00 authored by Arkerthan's avatar Arkerthan
Browse files

added table to prosthetics config

parent 18b84ada
No related branches found
No related tags found
No related merge requests found
......@@ -259,38 +259,49 @@ This room is lined with shelves and cabinets, it could be easily mistaken for a
| [[Bovine|Prosthetics Config][$activeSlave.tailShape = "ushi", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
<</if>>
<<if $activeSlave.readyProsthetics.length > 0>>
<br><br>
These prosthetics are in storage or already equipped by $him:<br>
<<for _p range $activeSlave.readyProsthetics>>
&nbsp;&nbsp;<<= capFirstChar(setup.prosthetics[_p.id].name)>> <br>
<</for>>
<</if>>
<br><br>
Fit prosthetics to $him:
<style>
td.prosthetics, th.prosthetics {
padding: 0px 10px;
}
</style>
<table class="prosthetics" border="1">
<tr>
<th></th>
<th class="prosthetics">Buy and fit</th>
<th class="prosthetics">
<<= App.UI.disabledLink(`Construct in lab`, ["Takes longer than fitting an existing prosthetic but faster than first building and than fitting it to $him."])>>
</th>
</tr>
<<for _p range setup.prostheticIDs>>
<<if _p != "erectile">> /* exclude erectile implant */
<<if $adjustProsthetics.findIndex(function(p) {return p.id == _p && p.slaveID == $activeSlave.ID}) != -1 || $researchLab.tasks.findIndex(function(p) {return p.type == "craftFit" && p.id == _p && p.slaveID == $activeSlave.ID}) != -1>><br>
//<<= capFirstChar(addA(setup.prosthetics[_p].name))>> is already being fitted to $him.//
<<elseif setup.prosthetics[_p].level > $prostheticsUpgrade>><br>
//You need better contracts to buy <<= addA(setup.prosthetics[_p].name)>>.//
<<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == _p}) == -1>>
<br>
<tr>
<td class="prosthetics"><<= capFirstChar(setup.prosthetics[_p].name)>></td>
<<if $adjustProsthetics.findIndex(function(p) {return p.id == _p && p.slaveID == $activeSlave.ID}) != -1 || $researchLab.tasks.findIndex(function(p) {return p.type == "craftFit" && p.id == _p && p.slaveID == $activeSlave.ID}) != -1>>
<td class="prosthetics" colspan="2">//Already being fitted to $him.//</td>
<<elseif setup.prosthetics[_p].level > $prostheticsUpgrade>>
<td class="prosthetics" colspan="2">//Better contracts needed to buy this.//</td>
<<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == _p}) != -1>>
<td class="prosthetics" colspan="2">//Already finished.//</td>
<<else>>
<<capture _p>>
<td class="prosthetics">
<<if $prosthetics[_p].amount > 0>>
<<link "Fit <<= addA(setup.prosthetics[_p].name)>> from storage to <<= $him>>" "Prosthetics Config">>
<<link "From storage" "Prosthetics Config">>
<<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: $activeSlave.ID}), $prosthetics[_p].amount -= 1>>
<</link>>
<<else>>
<<link "Buy and fit <<= addA(setup.prosthetics[_p].name)>> to <<= $him>>" "Prosthetics Config">>
<<link "<<= cashFormat(setup.prosthetics[_p].costs)>>" "Prosthetics Config">>
<<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: $activeSlave.ID}), cashX(forceNeg(setup.prosthetics[_p].costs), "slaveMod", $activeSlave)>>
<</link>>
//Costs <<= cashFormat(setup.prosthetics[_p].costs)>>.//
<</if>>
<<if $researchLab.level > 0 & $prosthetics[_p].research > 0>>
<br>&nbsp;&nbsp;
<<link "Construct <<= addA(setup.prosthetics[_p].name)>> for <<= $him>>" "Prosthetics Config">>
</td>
<td class="prosthetics">
<<if $researchLab.level > 0 && $prosthetics[_p].research > 0>>
<<link "Construct" "Prosthetics Config">>
<<set $researchLab.tasks.push({
type: "craftFit",
id: _p,
......@@ -298,12 +309,16 @@ Fit prosthetics to $him:
slaveID: $activeSlave.ID})>>
/* 1.5: longer than adjust, but faster than adjust+craft. */
<</link>>
//Will take longer than fitting an existing prosthetic but faster than first building it and than fitting it to $him.//
<<elseif $researchLab < 1>>
//no lab//
<</if>>
</td>
<</capture>>
<</if>>
</tr>
<</if>>
<</for>>
</table>
/* base screen END */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment