Rampant icon indicating copy to clipboard operation
Rampant copied to clipboard

processPendingUpgrades

Open ldinc opened this issue 2 years ago • 3 comments

Hi, does it really need two calls of processPendingUpgrades ?

https://github.com/veden/Rampant/blob/c5e52bfc7a8363098f5b7c652a6a04624b2b5ad2/control.lua#L1071

ldinc avatar Jan 10 '23 21:01 ldinc

Required no, but otherwise the effect is that when new chunks are generated by the Factorio engine it takes twice the amount of time to convert vanilla enemy structures to Rampant New Enemies structures. This is really noticeable when moving with a car or artillery into unexplored areas quickly. #114

Currently planning to increase the size of enemy spawners and worms which will reduce the number per chunk which will reduce the need for the second processPendingUpgrades call #117

Happy to hear alternatives if you have them.

veden avatar Jan 11 '23 01:01 veden

Thx, now it's clear & good one solution for problems above maybe short comment or fn wrapper will be nice for code exploring =) but it's not necessary

With large sparsed bases I suppose it will be nice to have adjustable worms and splitters density. https://github.com/veden/Rampant/issues/124 Therefore I've started explore code. if I'm not mistaken, for enemies spreading code used settler's squads. What about buildings? Does it rely on original factorio code for spawn enemies building and only way control events over chucnk and check density by it?

The original issue can be closed, thx) The discussion i can move to more related issue (124)

ldinc avatar Jan 11 '23 11:01 ldinc

Yes, the spawning of buildings is using the vanilla factorio mechanism. Rampant hooks the on_biter_base_built and does a replacement of the entities or removal based on the base the structures belong to. Being able to control density would most likely be done at the chunk level which simplifies the calculation.

veden avatar Jan 15 '23 20:01 veden