This commit is contained in:
Crispy 2025-07-03 01:23:46 +02:00
parent 491112768c
commit 68ec37f994
66 changed files with 6591 additions and 10096 deletions

View file

@ -1,7 +1,7 @@
return {
{
name = "water",
amount = 1409400,
amount = 0,
},
{
name = "blood",
@ -9,7 +9,7 @@ return {
},
{
name = "molten_brass",
amount = 2991,
amount = 0,
},
{
name = "lava",
@ -29,7 +29,7 @@ return {
},
{
name = "molten_rose_gold",
amount = 9000,
amount = 0,
},
{
amount = 0,

View file

@ -78,6 +78,15 @@ function getFluidAmountInTanks(type, tanks)
return 0
end
function tanksAreEmpty(tanks)
for _, fluid in pairs(tanks) do
if fluid.amount > 0 then
return false
end
end
return true
end
function pumpToDevices(enable)
goTo(vector.new(4, 0, -1))
-- clutches invert the signal

View file

@ -116,11 +116,23 @@ end
function emptyInventory()
for i = 1, 16 do
if turtle.getItemCount(i) ~= 0 then
local item = turtle.getItemDetail(i);
if item then
turtle.select(i)
chest_items = pFront("items")
turtle.drop()
local chest_items = pFront("list")
local done = false
for slot, citem in pairs(chest_items) do
if citem.name == item.name and pFront("getItemLimit", slot) - citem.count >= item.count then
turtle.dropDown()
pFront("pullItems", "bottom", 1, 64, slot)
done = true
break
end
end
if not done then
turtle.drop()
end
end
end
end

View file

@ -209,9 +209,9 @@ function melt(_, product, yield)
connectTankOrAssign(product)
pumpToTanks(true)
goTo(melter_pos, "north")
while #pFront("items") > 0 do
sleep(1)
end
repeat
sleep(0.5)
until tanksAreEmpty(pFront("tanks"))
pumpToTanks(false)
fluidInvAdd(product, yield)
end

View file

@ -522,6 +522,11 @@ base bucket
steps:
spout water:1000
copper_ingot
yield 9
steps:
craft copper_block
brass_tunnel
yield 2
steps:

35
computer/13/secretvirus Normal file
View file

@ -0,0 +1,35 @@
speaker = peripheral.wrap("left")
mobs = {
"zombie",
"cow",
"pig",
"skeleton",
"spider",
"sheep"
}
function sound()
while true do
if math.random(10)>5 then
speaker.playSound("entity."..mobs[math.random(#mobs)]..".ambient",1)
elseif math.random(100) < 95 then
--noteblock.setInstrument(instruments[math.random(#instruments)])
--noteblock.play()
--noteblock.setNote(math.random(24))
elseif math.random(100) < 50 then
for i = 1,5 do
speaker.playSound("entity.creeper.step")
sleep(0.05)
end
speaker.playSound("entity.creeper.primed")
else
--speaker.playSound("BOOM")
end
sleep(math.random(10,20))
--os.reboot()
end
end
return function()
parallel.waitForAll(
sound
)
end

View file

@ -8,15 +8,17 @@ return {
speaker.playNote("pling",volume,8)
sleep(0.1)
speaker.playNote("pling",volume,16)
speaker.playSound("entity.cat.beg_for_food")
end,
fail = function ()
speaker.playSound("entity.cat.death")
speaker.playNote("didgeridoo", volume, 6)
sleep(0.2)
speaker.playNote("didgeridoo", volume, 3)
end,
eat = function ()
speaker.playSound("entity.generic.eat")
speaker.playSound("entity.cat.eat")
sleep(0.1)
speaker.playSound("entity.generic.eat")
end
}
}

View file

@ -1,10 +1,10 @@
term.clear()
term.setCursorPos(1,1)
_G.meow = function()
peripheral.call("left","playSound","entity.cat.ambient")
peripheral.call("left","playSound","entity.cat.ambient")
end
parallel.waitForAny(
function()
function()
shell.run("shell")
end,
function()
@ -16,5 +16,7 @@ parallel.waitForAny(
end
end
end
--,
--require("/secretvirus")
)
os.shutdown()

View file

@ -3,7 +3,7 @@
stock keeping
keep spout filled during repeated operations
multi-item crafting
push items into existing stacks in chest
-push items into existing stacks in chest
pull items from multiple stacks if necessary
-refuel self
refuel furnace

View file

@ -59,12 +59,7 @@ function doRecipe(recipe)
end
end
goHome()
for i = 1, 16 do
if turtle.getItemCount(i) ~= 0 then
turtle.select(i)
turtle.drop()
end
end
emptyInventory()
if turtle.getFuelLevel() < 1000 then
print("refueling")
goTo(vector.new(4, 0, -2), "east")