Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ReactorControll by SergOmarov
- local robot=require("robot")
- local c=require("component")
- local craft=c.crafting
- local rs=c.redstone
- inv.select(1)
- if(inv.getStackInInternalSlot(2).name~="minecraft:blockRedstone" or inv.getStackInInternalSlot(2).name~="minecraft:blockLapis")then
- print("Пожалуйста, вставьте во второй слот блоки красной пыли или лазурита(в зависимости от ващих конденсаторов")
- end
- local inv=c.inventory_controller
- local function repairItem(slot)
- inv.suckFromSlot(0,j)
- craft.craft()
- inv.dropIntoSlot(0,j)
- end
- local slots={
- }
- local i=true
- while i do
- for j=1,#slots do
- local item=inv.getStackInSlot(0,j)
- if(item.damage/item.maxDamage>0.1)then
- repairItem(j)
- end
- end
- and
- rs.setOutput(3,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement