Created
September 6, 2018 23:26
-
-
Save khionu/d3a5d1b06526641dcc6abf8cbb8568b4 to your computer and use it in GitHub Desktop.
A CraftTweaker script to enable AE2-esque recycling of Disks for Refined/Reborn storage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crafttweaker.item.IItemStack; | |
var diskToParts_refined = { | |
<refinedstorage:storage_disk:0> : <refinedstorage:storage_part:0>, | |
<refinedstorage:storage_disk:1> : <refinedstorage:storage_part:1>, | |
<refinedstorage:storage_disk:2> : <refinedstorage:storage_part:2>, | |
<refinedstorage:storage_disk:3> : <refinedstorage:storage_part:3>, | |
<refinedstorage:fluid_storage_disk:0> : <refinedstorage:fluid_storage_part:0>, | |
<refinedstorage:fluid_storage_disk:1> : <refinedstorage:fluid_storage_part:1>, | |
<refinedstorage:fluid_storage_disk:2> : <refinedstorage:fluid_storage_part:2>, | |
<refinedstorage:fluid_storage_disk:3> : <refinedstorage:fluid_storage_part:3>, | |
} as IItemStack[IItemStack]; | |
var diskToParts_reborn = { | |
<rebornstorage:storagecell:0> : <rebornstorage:storagepart:0>, | |
<rebornstorage:storagecell:1> : <rebornstorage:storagepart:1>, | |
<rebornstorage:storagecell:2> : <rebornstorage:storagepart:2>, | |
<rebornstorage:storagecell:3> : <rebornstorage:storagepart:3>, | |
<rebornstorage:storagecellfluid:0> : <rebornstorage:storagepart:4>, | |
<rebornstorage:storagecellfluid:1> : <rebornstorage:storagepart:5>, | |
<rebornstorage:storagecellfluid:2> : <rebornstorage:storagepart:6>, | |
<rebornstorage:storagecellfluid:3> : <rebornstorage:storagepart:7>, | |
} as IItemStack[IItemStack]; | |
var recipeIndex = 0; | |
for disk, part in diskToParts_refined { | |
recipes.addShapeless("storage_disk_recycle_" + recipeIndex, part, [disk], | |
function(out, ins, cinfo) { | |
return out; | |
}, | |
function(out, cinfo, player) { | |
player.give(<refinedstorage:storage_housing>); | |
} | |
); | |
recipeIndex += 1; | |
} | |
for disk, part in diskToParts_reborn { | |
recipes.addShapeless("storage_disk_recycle_" + recipeIndex, part, [disk], | |
function(out, ins, cinfo) { | |
return out; | |
}, | |
function(out, cinfo, player) { | |
player.give(<refinedstorage:storage_housing>); | |
} | |
); | |
recipeIndex += 1; | |
} | |
for disk, part in diskToParts_reborn { | |
recipes.addShapeless("storage_disk_recycle_" + recipeIndex, disk, [part, <refinedstorage:storage_housing>]); | |
recipeIndex += 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment