Skip to content

Commit

Permalink
Merge pull request #2457 from MuteTiefling/develop
Browse files Browse the repository at this point in the history
Re-add Ingot/Gem to Dust recipe unification
  • Loading branch information
NielsPilgaard committed Jun 19, 2021
2 parents 5fc870f + af7b5ca commit d9d5bff
Showing 1 changed file with 26 additions and 0 deletions.
Expand Up @@ -74,6 +74,7 @@ onEvent('recipes', (event) => {

thermal_metal_ore_pulverizing(event, material, ore, dust, ingot);
thermal_gem_ore_pulverizing(event, material, ore, dust, gem, shard);
thermal_ingot_gem_pulverizing(event, material, ingot, dust, gem);
thermal_metal_casting(event, material, ingot, nugget, gear, rod, plate);
thermal_gem_casting(event, material, gem, gear, rod, plate);

Expand Down Expand Up @@ -1060,6 +1061,31 @@ onEvent('recipes', (event) => {
event.recipes.thermal.pulverizer(outputs, input).experience(experience);
}

function thermal_ingot_gem_pulverizing(event, material, ingot, dust, gem) {
if (dust == air) {
return;
}

var input,
output = Item.of(dust, 1);
if (ingot != air) {
type = 'ingot';
input = `#forge:ingots/${material}`;
} else if (gem != air) {
input = `#forge:gems/${material}`;
type = 'gem';
} else {
return;
}

event.remove({
input: input,
mod: 'thermal',
type: 'thermal:pulverizer'
});
event.recipes.thermal.pulverizer(output, input);
}

function thermal_metal_casting(event, material, ingot, nugget, gear, rod, plate) {
if (ingot == air) {
return;
Expand Down

0 comments on commit d9d5bff

Please sign in to comment.