Factorissimo QRD fork

by eliont

A fork of fork of Factorissimo to made it compatible with QuantumResourceDistribution and SpaceExploration.

Content
1 year, 2 months ago
1.1
937

g What changed?

a month ago

Hello, I would like to add these into the original fork.
Can you explain what was changed so that it can be updated?

Or even better, make a pull request
https://github.com/notnotmelon/factorissimo-fork

a month ago

It not worth to merge, it is change specifically for "Quantum Resource Distribution" - so parent surface and factory surface have shared quantum storage - it's issue because QRD made compatible with Space Exploration and do not allow inter-surface transportation, but factory is another surface too.

So there are changed internal surface naming to distinguish "planet" surface and "factory" surface that build on that planet.

local surface_name = global.last_non_factory_surface..'|factory-floor-' .. global.next_factory_surface
-- local surface = game.surfaces[layout.surface_override or surface_name]
local surface = game.surfaces[surface_name]
a month ago
(updated a month ago)

And corresponding code from QRD

local surface_name = splitarray(surface.name,'|')[1]

if not global.pool[surface_name] then global.pool[surface_name] = {} end
if not global.pool[surface_name][item] then 
  global.pool[surface_name][item] = {amount=0, category='main', type = 'item'} 
end

Literally just need separator to get parent surface name from factory surface name.
Not exactly necessary how it currently done.

New response