like this:
Code: Select all
stonegear_counter=0
game.onevent(defines.events.onplayercrafteditem, function(event)
if event.itemstack.name=="stone-gear-wheel" then
if stonegear_counter == nil then return
elseif stonegear_counter < 99 then
stonegear_counter = stonegear_counter + event.itemstack.count
elseif stonegear_counter > 98 then
game.player.force.recipes["iron-gear-wheel"].enabled = true
game.player.print("I think i can make stronger gears with Iron Plates")
stonegear_counter=nil
end
end
end)
devs, anyway i can check those intermediates so they can be added to the counter?