I am currently writing a mod for entity cloning, but there will be some residue after the cloning is completed, such as the handheld items of the robotic arm being copied together. How can I clean it up? thank you
The robotic arm I'm referring to is the 'inserter'. I couldn't find any instructions for cleaning. Can you help me?
May I ask how to clean items held by a robotic arm
Re: May I ask how to clean items held by a robotic arm
Code: Select all
if entity.type == "inserter" then
local stack = entity.held_stack
if stack.valid_for_read
then stack.clear()
end
end
if entity.has_items_inside()
then entity.clear_items_inside()
end
if entity.get_fluid_count() > 0
then entity.clear_fluid_inside()
end
Re: May I ask how to clean items held by a robotic arm
I understand the reason now. It's not a problem with the robotic arm, it's the machine that has ongoing work and is still working after cloning. So, how can we make the machine cancel the ongoing work?
Re: May I ask how to clean items held by a robotic arm
Thank you, friend. This works, but what about the stove?Natha wrote: Thu Feb 06, 2025 1:52 pm https://lua-api.factorio.com/latest/cla ... g_progress may be your friend