Random Factory Plus


For more content, but randomized.

Content
9 months ago
1.1
147
Logistics Combat Armor Enemies Mining Fluids Logistic network Manufacturing Power Storage

i Coding suggestions

1 year, 5 days ago

Just some general suggestions I had when browsing the code…

  1. You have the same code in a lot of the generator files. Maybe make a utility file for generators so that you don’t have to maintain all those bits at once.
  2. You have a long line of while loops to compute the remainder of some numbers after dividing by 1000 (you put them in the range from 1 to 1000). Instead, you could just use the modular arithmetic math.fmod function.
  3. You manually check ranges a lot and do things based on that. There’s probably a way to outsource that to tables and only run through the table to see what should be done based on the range you’re in. Should make life easier and more organized.

Great work!

New response