Add simple tasks for jobs.
This commit is contained in:
parent
8e9692fa28
commit
1257ce7636
1 changed files with 47 additions and 0 deletions
47
ShiftOS.WinForms/JobTasks.cs
Normal file
47
ShiftOS.WinForms/JobTasks.cs
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue