diff options
| author | Michael <[email protected]> | 2017-06-24 19:52:57 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-06-24 19:52:57 -0400 |
| commit | ad7328882b60470ba546219cb73c14adb078a7a4 (patch) | |
| tree | b99303043c092edb0a8029abcaa7fc2865bce3cd /ShiftOS_TheReturn/Story.cs | |
| parent | 9c1a409f24da92f1e6d95ee4cdd777b52d53488f (diff) | |
| download | shiftos_thereturn-ad7328882b60470ba546219cb73c14adb078a7a4.tar.gz shiftos_thereturn-ad7328882b60470ba546219cb73c14adb078a7a4.tar.bz2 shiftos_thereturn-ad7328882b60470ba546219cb73c14adb078a7a4.zip | |
Mission backend.
Diffstat (limited to 'ShiftOS_TheReturn/Story.cs')
| -rw-r--r-- | ShiftOS_TheReturn/Story.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ShiftOS_TheReturn/Story.cs b/ShiftOS_TheReturn/Story.cs index 2b00686..02fe6e3 100644 --- a/ShiftOS_TheReturn/Story.cs +++ b/ShiftOS_TheReturn/Story.cs @@ -141,7 +141,7 @@ namespace ShiftOS.Engine { foreach (var mth in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) { - foreach (var attrib in Array.FindAll(mth.GetCustomAttributes(false), a => a is StoryAttribute)) + foreach (var attrib in Array.FindAll(mth.GetCustomAttributes(false), a => a is StoryAttribute || a is MissionAttribute)) { var story = attrib as StoryAttribute; if (story.StoryID == stid) @@ -157,6 +157,17 @@ namespace ShiftOS.Engine SaveSystem.CurrentSave.PickupPoint = Context.Id; Context.OnComplete += () => { + if(story is MissionAttribute) + { + var mission = story as MissionAttribute; + ConsoleEx.ForegroundColor = ConsoleColor.Yellow; + ConsoleEx.Bold = true; + Console.WriteLine(" - mission complete - "); + ConsoleEx.Bold = false; + ConsoleEx.ForegroundColor = ConsoleColor.White; + Console.WriteLine($"{mission.Name} successfully finished. You have earned {mission.CodepointAward} Codepoints for your efforts."); + SaveSystem.CurrentSave.Codepoints += mission.CodepointAward; + } StoryComplete?.Invoke(stid); SaveSystem.CurrentSave.PickupPoint = null; }; @@ -209,5 +220,6 @@ namespace ShiftOS.Engine /// </summary> public string StoryID { get; private set; } + public ulong CodepointAward { get; protected set; } } } |
