Skip to content

Commit

Permalink
Implement ATM Tool Salvage Recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyPandas committed May 30, 2022
1 parent 0d86b34 commit 757ac68
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions kubejs/server_scripts/mod_specific/silentsgear/silentsgear.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,52 @@ onEvent('recipes', e => {
})
}

const nuggetRatio = {"helmet": 2, "chestplate": 4, "leggings": 3, "boots": 2}
const armorNuggetRatio = {"helmet": 2, "chestplate": 4, "leggings": 3, "boots": 2}
const toolNuggetRatio = {
"pick": {
"allthemodium": 2,
"vibranium": 3,
"unobtainium": 3,
},
"axe": {
"allthemodium": 2,
"vibranium": 3,
"unobtainium": 3,
},
"sword": {
"allthemodium": 1,
"vibranium": 2,
"unobtainium": 2,
},
"shovel": {
"allthemodium": 2,
"vibranium": 1,
"unobtainium": 1,
},
"paxel": {
"allthemodium": 9,
"vibranium": 10,
"unobtainium": 10,
}
}

utils.listOf(['allthemodium', 'vibranium', 'unobtanium'])
utils.listOf(['allthemodium', 'vibranium', 'unobtainium'])
.forEach(type => {
utils.listOf(['helmet', 'chestplate', 'leggings', 'boots'])
.forEach(armor => {
salvage(e, `allthemodium:${type}_${armor}`, [{item: `allthemodium:${type}_nugget`, count: nuggetRatio[armor]}])
salvage(e, `allthemodium:${type}_${armor}`, [{item: `allthemodium:${type}_nugget`, count: armorNuggetRatio[armor]}])
})
})

utils.listOf(['pick', 'axe', 'sword', 'shovel', 'paxel'])
.forEach(tool => {
const result = [];

utils.listOf(['allthemodium', 'vibranium', 'unobtainium'])
.forEach(nugget => {
result.push({"item": `allthemodium:${nugget}_nugget`, "count": toolNuggetRatio[tool][nugget]})
})

salvage(e, `allthemodium:alloy_${tool}`, result)
})
})

0 comments on commit 757ac68

Please sign in to comment.