Quality Control

by raley

Assemblers and furnaces earn quality upgrades for the entire factory.

Content
4 days ago
2.0
1.83K
Factorio: Space Age Icon Space Age Mod
Logistic network Manufacturing Cheats

b [Fixed] Few problems for some vanilla and space age entity

10 months ago
  • Recycler vertical rotation are reset
  • An entity that get upgraded when there is an order of deconstruction get upgraded but remove the deconstruction order
  • When Rocket silo upgrade it's reset the "sent to orbit automatically" option
10 months ago

Ah great finds, thank you! I'll work on patches for these.

10 months ago

Ok released! Thanks again for taking the time to report these.

Unfortunately I couldn't find a way to manage the send to orbit setting via the modding API. For now I removed upgrades for rocket silos so that it won't mess up any games.

10 months ago

how do you upgrade entity ? When I was thinking about doing such mod I was looking at https://lua-api.factorio.com/latest/classes/LuaEntity.html#order_upgrade and https://lua-api.factorio.com/latest/classes/LuaEntity.html#apply_upgrade that should work for any entity no ? Since base game can fast replace rocket silo without forget setting of auto launch.

10 months ago
(updated 10 months ago)

Oooh, apply_upgrade looks perfect. I would use that, but it looks like it isn't in factorio stable (2.0.60) yet. Once version 2.0.61 ships then I would definitely try using that instead.

order_upgrade is available now, but without apply_upgrade the player would need to have the item in the logistic's network or inventory. That would be really nice for a non-cheat version of the mod now though.

For now, I use surface.create_entity, and pass in all the parameters available to setup the entity correctly, then set the mirror flag.
https://lua-api.factorio.com/stable/classes/LuaSurface.html#create_entity

You can see the code here: https://github.com/aarons/factorio-quality-control/blob/main/scripts/core.lua#L303

I'll be traveling for the next week, so probably won't be able to do much, but a patch is absolutely welcome if you want to take a pass at it if 2.0.61 is released soon. The ./package.sh command will zip all the lua files for the mod and copy it to factorio's directory for easy testing.

I think enabling a non-cheat mode that uses order_upgrade instead of create_entity would be a really nice option.

New response