Open Escuadrin opened 1 year ago
How did you install the pack? Was it through the content tab in minetest, download from minetest.content, or from github itself?
from contentdb, maybe the error is because i had the old version installed i will try to delete and reinstall it
Yeah sorry about that. I did some rather major overhauls so it's possible that updating didn't implement all the changes it needed to.
Deletin and reinstalling the game seemed to fix it. Other bugs i noticed are: You can spawn stuck inside a mountain, apparently i cant destroy workshops and when you die all the trains die. Hope that helps :)
The error message says "It should be "workshop_recipes" and not to be Refinery_recipes in line:118. And workshop has two outputs (it's interesting). I tried to modify your code as below, and really enjoy! FYI. new workshop.lua: line:113-125 for input, output in pairs(RecipiesInStructure.Workshop) do --items[input] = ItemStack(input) items[input] = ItemStack(input) product1[input] = ItemStack(output[1]) product2[input] = ItemStack(output[2])
end
local inventories = inv:get_lists()
for name, list in pairs(inventories) do
for index, item in pairs(items) do
while inv:contains_item(name, item) do
local item_name = item:get_name()
local product1 = product1[item_name]
local stack1 = ItemStack(product1)
local product2 = product2[item_name]
local stack2 = ItemStack(product2)
inv:remove_item(name, item)
inv:add_item("output", stack1)
inv:add_item("output", stack2)
working = true
end
end
end
Thanks ik160 it looks like because of the changes I made to organization you'll need to uninstall and reinstall it to make it work. I will be comparing code to see which way would be better.
I have this crash aswell. Installed today from contentdb in game Attempting to add ik160's fix doesnt help sadly
Reinstalling from github also doesnt help. It crashes as soon as I have a workshop running.
I found a fix
replace 109-1 with:
local working = false
local product1 = {}
local product2 = {}
for input, output in pairs(RecipiesInStructure.Workshop) do
items[input] = ItemStack(input)
product1[input] = ItemStack(output[1])
product2[input] = ItemStack(output[2])
--print("product1 inoutpairs"..tostring(product1))
end
local inventories = inv:get_lists()
for name, list in pairs(inventories) do
for index, item in pairs(items) do
while inv:contains_item(name, item) do
local item_name = item:get_name()
local product1 = product1[item_name]
local stack1 = ItemStack(product1)
local product2 = product2[item_name]
local stack2 = ItemStack(product2)
inv:remove_item(name, item)
inv:add_item("output", product1)
inv:add_item("output", stack2)
working = true
end
end
end
I got this error too while trying to connect a refinery to a workshop using a train and track. When the train put a lump into the workshop, the ~10 second ticking time bomb started. I realised later that the workshop was the culprit, so tried to remove it but couldn't break it even though it had no items. I eventually needed to pull out the super pickaxe since simply reinstalling the game didn't work, which destroyed it (along with the ground) with ease and stopped the loop.
I got this error too while trying to connect a refinery to a workshop using a train and track. When the train put a lump into the workshop, the ~10 second ticking time bomb started. I realised later that the workshop was the culprit, so tried to remove it but couldn't break it even though it had no items. I eventually needed to pull out the super pickaxe since simply reinstalling the game didn't work, which destroyed it (along with the ground) with ease and stopped the loop.
Reinstalling didn't work for me either, I put a fix above. It might work for you? Factories also don't work but don't crash, they just steal your items and produce nothing.
one problem with (I think it's a problem) after Kazooo100 fix: it processes everything in the inventory at the same time.... if you adjust the while you can eliminate that: `
local inventories = inv:get_lists()
for name, list in pairs(inventories) do
for index, item in pairs(items) do
-- only let it work on one at a time
while not working and inv:contains_item(name, item) do
local item_name = item:get_name()
The game crashes and Debug says this :