weaponplanner: add upgrade links

- add 'children' field to weapon JSON, with list of dicts
  containing 'id' and 'name' keys for weapons that can be
  upgraded from current weapon.
This commit is contained in:
Bryce Allen
2015-07-02 08:55:53 -05:00
parent 4362b0f7f7
commit be5d3ca633
3 changed files with 56 additions and 16 deletions

View File

@@ -33,4 +33,13 @@
<span style="width:<%= sharpness_plus[6] %>px" class="purple"></span>
</div>
</td>
<% if (children.length) { %>
<tr><td colspan="5"> -&gt;
<% for(var i=0; i<children.length; i++) { %>
<a href="weaponplanner.html?weapon=<%= encodeURIComponent(children[i]['name']) %>"
><%= children[i]["name"] %></a>
<% if (i != children.length - 1) { %>|<% } %>
<% } %>
</td></tr>
<% } %>
</table>