Skip to content

Commit

Permalink
Merge pull request #13 from AstronIsTaken/dev
Browse files Browse the repository at this point in the history
Minor recipe fixes
  • Loading branch information
AstronIsTaken committed Jan 26, 2022
2 parents 9ce27a7 + 1147a8c commit ad3148e
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 33 deletions.
2 changes: 1 addition & 1 deletion data/craft_trans_german.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Gold Nuggets": "Goldnuggets",
"Rhodonite": "Rhodonit",
"Columbite": "Columbit",
"Illmenite": "Illmenit",
"Ilmenite": "Ilmenit",
"Vanadinite": "Vanadinit",
"Oxygen Pure": "Reiner Sauerstoff",
"Hydrogen Pure": "Reiner Wasserstoff",
Expand Down
4 changes: 3 additions & 1 deletion data/itemsAccordion.json
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,7 @@
"data": [
"Aluminium Honeycomb",
"Calcium Honeycomb",
"Carbon Honeycomb",
"Chromium Honeycomb",
"Cobalt Honeycomb",
"Copper Honeycomb",
Expand Down Expand Up @@ -1913,7 +1914,7 @@
"name": "Tier 5 Ores",
"data": [
"Columbite",
"Illmenite",
"Ilmenite",
"Rhodonite",
"Thoramine",
"Vanadinite"
Expand Down Expand Up @@ -2210,6 +2211,7 @@
"data": [
"Basic Antenna XS",
"Basic Antenna S",
"Basic Antenna XL",
"Uncommon Antenna S",
"Uncommon Antenna M",
"Uncommon Antenna L",
Expand Down
2 changes: 1 addition & 1 deletion data/orePrices.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Gold Nuggets": 1900,
"Kolbeckite": 1350,
"Columbite": 3800,
"Illmenite": 18000,
"Ilmenite": 18000,
"Rhodonite": 1350,
"Thoramine": 50000000,
"Vanadinite": 7000
Expand Down
18 changes: 16 additions & 2 deletions data/recipes.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"industry": "",
"input": {}
},
"Illmenite": {
"Ilmenite": {
"tier": 5,
"type": "Ore",
"volume": 1,
Expand Down Expand Up @@ -510,7 +510,7 @@
},
"industry": "Refiner M",
"input": {
"Illmenite": 65
"Ilmenite": 65
}
},
"Pure Vanadium": {
Expand Down Expand Up @@ -2413,6 +2413,20 @@
"Basic Screw": 5
}
},
"Basic Antenna XL": {
"tier": 1,
"type": "Functional Part",
"volume": 7020.8,
"outputQuantity": 1,
"time": 4860,
"byproducts": {},
"nanopack": false,
"industry": "Electronics Industry M",
"input": {
"Al-Fe Alloy": 2401,
"Basic Screw": 625
}
},
"Uncommon Antenna XS": {
"tier": 2,
"type": "Functional Part",
Expand Down
10 changes: 6 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/craft.css?v=4">
<link rel="stylesheet" type="text/css" href="css/craft.css?v=5">
<link href="https://fonts.googleapis.com/css?family=Aldrich&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
<title>Dual Universe Beta Crafting Calculator</title>
Expand Down Expand Up @@ -33,7 +33,9 @@
<button id="getDataButton" style="float:left;margin:0 5px;">Copy Config</button>
<button id="setDataButton" style="float:left;margin:0 5px;">Paste Config</button>

<span style="color:#fff;float:left;padding:0 0 0 15px;">Updated on&nbsp;<a id="lastUpdateTime" href="https://github.com/AstronIsTaken/du-craft/releases" target="_blank">Loading</a></span>
<span style="color:#fff;float:left;padding:0 0 0 15px;">Updated on&nbsp;<a id="lastUpdateTime"
href="https://github.com/AstronIsTaken/du-craft/releases"
target="_blank">Loading</a></span>
<span class="navright legend">
<span class="tier-1 tier-all">1 : Basic</span>
<span class="tier-2 tier-all">2 : Uncommon</span>
Expand Down Expand Up @@ -239,8 +241,8 @@ <h2>Input Config</h2>

</div>

<script src="js/crafting_calc.js?v=4"></script>
<script src="js/crafting_calc_interface.js?v=4"></script>
<script src="js/crafting_calc.js?v=5"></script>
<script src="js/crafting_calc_interface.js?v=5"></script>

</body>
</html>
51 changes: 27 additions & 24 deletions js/crafting_calc_interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Skill {
subject;
class;
amount;

constructor(categoryName, groupName, skillName) {
this.name = skillName;
this.id = [categoryName, groupName, skillName].join(".");
Expand All @@ -19,6 +20,7 @@ class SkillGroup {
name;
id;
skills = [];

constructor(categoryName, groupName) {
this.name = groupName;
this.id = [categoryName, groupName].join(".");
Expand All @@ -29,6 +31,7 @@ class SkillCategory {
name;
id;
groups = [];

constructor(name) {
this.name = name;
this.id = name;
Expand Down Expand Up @@ -106,7 +109,7 @@ function copyStringToClipboard(str) {
var itemsAccordion, prices, recipes, german;

const version = "1";
const lastUpdateTime = "2021-11-23";
const lastUpdateTime = "2022-01-25";
document.getElementById("lastUpdateTime").innerHTML = lastUpdateTime;
console.log("Crafting Calculator Updated On: " + lastUpdateTime)
console.log("Crafting Calculator Profile Version: " + version)
Expand Down Expand Up @@ -676,29 +679,29 @@ function updateSkillTreeDiv() {
if (skillValues.onlyApplicableSkills) {
skillTree.forEach(category => {
let emptyCategory = true;
category.groups.forEach(group => {
let emptyGroup = true;
group.skills.forEach(skill => {
if (shouldDisplaySkill(skill)) {
emptyGroup = false;
} else {
const skillElement = skillTreeDiv.querySelector('[skill-id="'+ skill.id + '"]');
if (skillElement) {
skillElement.classList.add("hidden-tree-node");
}
}
});
if (emptyGroup) {
const groupElement = skillTreeDiv.querySelector('[skill-group-id="'+ group.id + '"]');
if (groupElement) {
groupElement.classList.add("hidden-tree-node");
}
} else {
emptyCategory = false;
}
});
category.groups.forEach(group => {
let emptyGroup = true;
group.skills.forEach(skill => {
if (shouldDisplaySkill(skill)) {
emptyGroup = false;
} else {
const skillElement = skillTreeDiv.querySelector('[skill-id="' + skill.id + '"]');
if (skillElement) {
skillElement.classList.add("hidden-tree-node");
}
}
});
if (emptyGroup) {
const groupElement = skillTreeDiv.querySelector('[skill-group-id="' + group.id + '"]');
if (groupElement) {
groupElement.classList.add("hidden-tree-node");
}
} else {
emptyCategory = false;
}
});
if (emptyCategory) {
const categoryElement = skillTreeDiv.querySelector('[skill-category-id="'+ category.id + '"]');
const categoryElement = skillTreeDiv.querySelector('[skill-category-id="' + category.id + '"]');
if (categoryElement) {
categoryElement.classList.add("hidden-tree-node");
}
Expand Down Expand Up @@ -1399,7 +1402,7 @@ function tryRestoreState(profile) {
updatePrices();
} catch (e) {
console.log("failed to load prices");
prices = oldPrices;
prices = oldState.prices;
}

try {
Expand Down

0 comments on commit ad3148e

Please sign in to comment.