ComfyFactory / ComfyFactorio

A compilation of factorio scenarios, featuring many different maps.
GNU General Public License v3.0
45 stars 53 forks source link

MTN: spawn_random_buildings always spawns medium for high zones #452

Closed vadcx closed 6 months ago

vadcx commented 7 months ago

https://github.com/ComfyFactory/ComfyFactorio/blob/cd2cda7a0e7a92d76180cd41bd2692b21e140fc4/maps/mountain_fortress_v3/resource_generator.lua#L685-L697

  1. for depth > 5.5 it always spawns medium even though previously it spawned high with 100% chance. Is this intended?
  2. There's a tiny hole in the if condition, it will never work for depth exactly 5.5. It should be if abs(p.y) >= depth * 5.5 then instead of >. And it probably should be an elseif too?
  3. There are random chances being rolled with same outcome. Intended or just dead code?
    • 2.5 is medium/medium
    • 4.5 and above are all high/high/high
Gerkiz commented 6 months ago

Not dead code - I've adjusted so whenever the abs(p.y) is higher than 3.8K the rarity is always high, since that is expected. Thanks!