Wear and Tear

by withers

Adds wear and tear mechanics to the game, plus automated maintenance.

6 years ago
0.14 - 0.15
14

i Other entities

7 years ago
(updated 7 years ago)

Not to be annoying or anything but is it possible to extend the wear and tear mod to all entities? Maybe as an optional config setting?

7 years ago

"Mining drills, assembling machines, pumpjacks, oils refineries and chemical plants"
imo Electric Furnaces should be added :P

7 years ago

Yeah only electric ones though.

7 years ago

I do plan on expanding to other entities. Currently working on adding solar panels and steam engines. Solar are easy but I'm running into issues on the steam engines. As far as I can see there's currently no function to read whether a steam engine is running, so unless there's some way I am not seeing, I won't be able to make steam engines that are being used age faster than idle ones, which is annoying.

I'll look into electric furnaces as well. It will all be configurable.

7 years ago
(updated 7 years ago)

Maybe you could have a look at the function weartear.wear(player). You have two loops over the roster and call twice find_entities. I can already see the game freezing every update in my large factory with more than 1000 assemblers. If you also add furnace-like buildings or solar panels, the freeze would become infeasible long. But I really want to play with this mod :)

Maybe you could only update a fixed amount of buildings per tick event, at the cost that some building need more time to age because they are not no longer updated in every function call.

7 years ago

just make Steam Engines age longer..

7 years ago

I'll take a look at optimizing the code. I could definitely limit to a fixed number of buildings per tick event, just have to use a randomizer function to make sure it's not always the same buildings every event.

New response