Monday, September 4, 2017

Year 17 - Day 247

I got a lot of coding done today on colonies. First I killed some bugs related to mining and the onscreen updating of the current stockpile. I left one variable in an equation that was doubling the rate calculated on the server versus what was being displayed by the player. That one took a while to find.

After that I've implemented the Priority rating for each colony module and made some updates to the Colony Overview screen that is the first screen a player will see when they click on their colony. The screenshot below is what it looks like in its current state. I've still got to add some more bells and whistles to the screen, but the button in the Man Hours section is fully functional and will appear when there are surplus man hours available and not every module has enough man hours assigned to it.

The button calls a method that will sort all of the modules by priority then moduleID in ascending order. So a module that is Priority 1 will go before a Module that is Priority 10. If two or more modules have the same Priority, which they will by default, then the oldest module will take priority, so the module with the lowest serial number.

If the manhours available ever drop below what is the current total for all modules, the game will automatically call a similar method that will run in reverse and remove man hours from each module until everything is rebalanced.

Power allocation will work in exactly the same way, and is the next thing on the list to be worked on after some more man hour tweaks.


No comments:

Post a Comment