Skip to content
This repository was archived by the owner on Oct 26, 2020. It is now read-only.

Code cleanup & added outsourcing to EditorTime #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaffi95
Copy link

@jaffi95 jaffi95 commented Feb 18, 2019

No description provided.

@jaffi95 jaffi95 marked this pull request as ready for review February 18, 2019 00:45
@jaffi95
Copy link
Author

jaffi95 commented Feb 18, 2019

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 :)

@jaffi95
Copy link
Author

jaffi95 commented Feb 18, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant