Code cleanup & added outsourcing to EditorTime#5
Code cleanup & added outsourcing to EditorTime#5jaffi95 wants to merge 1 commit intomagico13:masterfrom
Conversation
|
This adds a feature which i call "outsourcing". it's a simple push of a button which pauses the EditorTime for a few minutes at the cost of funds. by default it pauses for 10 minutes at the cost of 1000 funds, but that is editable in the config file. This is to simulate a space agency distributing it's work between multiple companies to get the work done quicker but at an increased cost. This adds no noticeable changes except that when you hover over the time window it turns into a button which says "Outsource!". Pressing this button will pause the world time and turn the window into a countdown telling you how much time you have left until the pause goes out of effect. Once the outsource timer hits 0 then it turns back into the default clock telling you the world time. I understand this is not a requested change so it is up to you if you add this to your branch or if you wish for me to release this as a different version or just keep it for myself. let me know what you think :) |
|
The code cleanup I did was simply move the code to 3 different classes. It now has a Settings class which holds all the values in the config file and is responsible for loading and saving them. It has a TimeKeeper class which updates the time and keeps track of the outsourcing. And finally there is the TimeWindow class which holds the code related to displaying the window. Most of the actual code is the same as it was. |
No description provided.