diff options
| author | Michael <[email protected]> | 2017-01-18 21:07:22 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-01-18 21:07:22 -0500 |
| commit | 1257ce76362c8df9a73c9fcd44aa48c6e8cb2bea (patch) | |
| tree | 46b82a590fbea17106bf34a1761881b1fe195555 /ShiftOS.WinForms | |
| parent | 8e9692fa28cc55520cfd084cd398bd5897bc60fe (diff) | |
| download | shiftos_thereturn-1257ce76362c8df9a73c9fcd44aa48c6e8cb2bea.tar.gz shiftos_thereturn-1257ce76362c8df9a73c9fcd44aa48c6e8cb2bea.tar.bz2 shiftos_thereturn-1257ce76362c8df9a73c9fcd44aa48c6e8cb2bea.zip | |
Add simple tasks for jobs.
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/JobTasks.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/JobTasks.cs b/ShiftOS.WinForms/JobTasks.cs new file mode 100644 index 0000000..77917d9 --- /dev/null +++ b/ShiftOS.WinForms/JobTasks.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Objects; +using ShiftOS.Engine; + + +namespace ShiftOS.WinForms +{ + public class AcquireCodepointsJobTask : JobTask + { + public AcquireCodepointsJobTask(int amount) + { + CodepointsRequired = SaveSystem.CurrentSave.Codepoints + amount; + } + + public int CodepointsRequired { get; private set; } + + public override bool IsComplete + { + get + { + return (SaveSystem.CurrentSave.Codepoints >= CodepointsRequired); + } + } + } + + public class AcquireUpgradeJobTask : JobTask + { + public AcquireUpgradeJobTask(string upgId) + { + UpgradeID = upgId; + } + + public string UpgradeID { get; private set; } + + public override bool IsComplete + { + get + { + return Shiftorium.UpgradeInstalled(UpgradeID); + } + } + } +} |
