Skip to content

Commit

Permalink
Remove recipe rates from UI. Combine Factories and Items tabs into Fa…
Browse files Browse the repository at this point in the history
…ctory tab.
  • Loading branch information
KirkMcDonald committed Oct 28, 2017
1 parent caa0a7b commit b1cf6f9
Show file tree
Hide file tree
Showing 11 changed files with 638 additions and 209 deletions.
40 changes: 28 additions & 12 deletions calc.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ td.setting-label {
.top {
vertical-align: top;
}
input.prec {
input.prec, input.length {
width: 4em;
}
input.mprod {
Expand All @@ -109,29 +109,40 @@ input.beacon {
width: 4em;
}
#totals {
/*border-spacing: 2px;*/
border-collapse: collapse;
}
tr.recipe-row {
}
tr.recipe-row td {
padding: 0;
}
tr.recipe-row td.pad, th.pad {
tr.display-row td.pad, th.pad {
padding-left: 1em;
}
tr.recipe-row img.recipe-icon {
tr.display-row img.recipe-icon {
cursor: pointer;
}
tr.recipe-row .dropdown, tr.recipe-row .dropdown + img.spacer {
/*margin-left: 1px;
margin-right: 1px;*/
tr.display-row td.pad-right {
padding-right: 1em;
}
tr.display-row .dropdown, tr.display-row .dropdown + img.spacer {
margin-left: 5px;
margin-right: 5px;
}
tr.display-row td, tr.factory-header th {
padding-top: 8px;
padding-bottom: 8px;
}
tr.recipe-row td, tr.group-bottom-row td, tr.factory-header th {
border-bottom: 1px solid var(--light);
}
tr.group-row td.leftmost {
border-left: 1px solid var(--light);
}
tr.ignore img.display {
opacity: 0.2;
}
tr.no-mods td.module * {
display: none;
}
td.waste-hide, th.waste-hide {
display: none;
}
span.displaylink {
font-size: x-small;
}
Expand Down Expand Up @@ -178,6 +189,11 @@ g.node rect {
stroke: var(--foreground);
fill: var(--medium);
stroke-width: 1px;
cursor: pointer;
}
g.node div {
text-align: center;
cursor: pointer;
}
g.nodeHighlight rect {
stroke: var(--accent);
Expand Down
31 changes: 21 additions & 10 deletions calc.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<ul id="targets" class="targets"><li><button class="targetButton ui" title="Add new item." onclick="plusHandler()">+</a></li></ul>

<div class="tabs">
<button class="tab_button" id="totals_button" onclick="clickTab('totals_tab')">Factories</button>
<button class="tab_button" id="steps_button" onclick="clickTab('steps_tab')">Items</button>
<button class="tab_button" id="totals_button" onclick="clickTab('totals_tab')">Factory</button>
<!--<button class="tab_button" id="steps_button" onclick="clickTab('steps_tab')">Items</button>-->
<button class="tab_button" id="graph_button" onclick="clickVisualize('graph_tab')">Visualize</button>
<button class="tab_button" id="settings_button" onclick="clickTab('settings_tab')">Settings</button>
<button class="tab_button" id="faq_button" onclick="clickTab('faq_tab')">FAQ</button>
Expand Down Expand Up @@ -117,6 +117,16 @@
<td><span id="furnace"></span></td>
</tr>

<tr>
<td class="setting-label">Preferred belt:</td>
<td><span id="belt"></span></td>
</tr>

<tr>
<td class="setting-label">Minimum pipe length:</td>
<td><input id="pipe_length" class="length" type="number" value="17" min="0" onchange="changePipeLength(event)"></td>
</tr>

<tr>
<td class="setting-label">Mining productivity bonus:</td>
<td>+<input id="mprod" class="mprod" type="number" step="2" value="0" min="0" onchange="changeMprod()">%</td>
Expand Down Expand Up @@ -159,23 +169,24 @@

<div id="faq_tab" class="tab">
<div class="about-content">
<h3>Why are some of the numbers on the "Factories" tab different from what I expect?</h3>
The rates on the "Factories" tab are <i>recipe rates</i>, that is, the <i>rate at which the recipe is crafted</i>. If the recipe yields more than one copy of an item, or if productivity modules are being used, this number will differ from the <i>item rate</i>. The item rate may be seen on the "Items" tab, as well as on the edges of the graph on the "Visualize" tab.

<h3>Do the numbers in the "beacons" column represent the number of modules or the number of beacons?</h3>
They represent the number of modules.

<h3>What does clicking on a recipe's icon in the "Factories" tab do?</h3>
It omits the dependencies of that recipe from the solution. The intent behind this feature is to model the case of building a factory when you are shipping in one or more ingredients from elsewhere. For example, if you are making an advanced circuit factory and want to ship in electronic circuits, and want to see the remaining copper cable requirements on their own.
<h3>What does clicking on an item's icon in the "Factory" tab do?</h3>
It omits the dependencies of that item's recipe from the solution. The intent behind this feature is to model the case of building a factory when you are shipping in one or more ingredients from elsewhere. For example, if you are making an advanced circuit factory and want to ship in electronic circuits, and want to see the remaining copper cable requirements on their own.
<p>
Clicking on the icon a second time will restore its dependencies.
<p>
This feature is not compatible with certain items, namely those that have no dependencies, and those that don't map one-to-one with a recipe.

<h3>How do I interpret the pipe numbers on the "Items" tab?</h3>
<h3>How do I interpret the pipe numbers on the "Factory" tab?</h3>
Pipe throughput is inversely proportional to the length of the pipe. This means that the longer a pipe is, the more parallel lanes of pipes will be required.
<p>
Say the solution calls for 7500 units of heavy oil per second. The calculator will produce a default of "7 @ 47 max." This means you will need seven parallel lanes of pipes, each with a maximum length of 47 segments.
Say the solution calls for 7500 units of heavy oil per second. With the default "minimum pipe length" setting, the calculator will display a value of "[pipe] &times; 7 &le; 47." This means you will need seven parallel lanes of pipes, each with a maximum length of 47 segments.
<p>
The "minimum pipe length" setting controls the minimum number of segments that a pipe will be permitted before the calculator uses multiple lanes of pipes. It defaults to 17, which corresponds to a fluid rate of 1200/s, which is the output rate of an offshore pump.
<p>
Either value may be edited, and the calculator will produce the corresponding value for the other.
The number of pipes will be omitted if only one pipe is required.
</div>
</div>

Expand Down
Loading

0 comments on commit b1cf6f9

Please sign in to comment.