raiguard / MouseOverConstruction

MIT License
2 stars 1 forks source link

Infinite wind turbines when combined with pyanodons. #10

Open notnotmelon opened 2 weeks ago

notnotmelon commented 2 weeks ago

Description

Cross posted from the py repo: https://github.com/pyanodon/pybugreports/issues/511

I noticed in your code that items are only removed if the created entity is valid.

if upgraded_entity then
  player.play_sound({
    path = "entity-build/" .. upgraded_entity.name,
    position = upgraded_entity.position,
  })
  if is_inventory then
    item_source.remove(use_item)
  else
    item_source.count = item_source.count - use_item.count
  end
  return true
end

However py instantly destroys any built wind turbines and replaces them for another entity. This causes a duplication glitch.

Reproduction

  1. Install pyAE
  2. Build a fish turbine ghost
  3. Use mouse over construction

The wind turbine is created for free. factorio-current.log

oorzkws commented 2 weeks ago

Maybe a dupe of #9