[0.18.26] Mining drills mine their last resource twice

Bugs that are actually features.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 754
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

[0.18.26] Mining drills mine their last resource twice

Post by raiguard »

I have been trying to figure out how mining drills work so I can accurately represent mining drill rates in my Rate Calculator mod. While experimenting, I discovered that whichever resource is at the end of the drill's "list" gets two sets of mining operations (mined 20 times instead of 10).

Here is a video demonstrating the bug in action:



Here is the code for the "resource tracker" mod I created to help debug this:

Code: Select all

local draw_text = rendering.draw_text
local clear = rendering.clear

script.on_nth_tick(10, function()
  clear()
  local nauvis = game.surfaces.nauvis
  local resources = nauvis.find_entities_filtered{
    type = "resource"
  }

  for _, resource in ipairs(resources) do
    draw_text{
      text = resource.amount,
      surface = nauvis,
      target = resource,
      color = {r=1, g=1, b=1},
    }
  end
end)
Attachments
a287bf9b-7c91-4db6-832f-5faeefe97803.mp4
(537 KiB) Downloaded 91 times
Don't forget, you're here forever.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16097
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.26] Mining drills mine their last resource twice

Post by Rseding91 »

Thanks for the report. I don't care if it works that way - making it work otherways will just add more complexity for no real gain. If one of the other developers wants to tinker with the logic and change it they are free to do so.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”