public static void submit_missions_to([NotNull] MissionControl mission_control) { var watch_for_projects_to_compile = new MissionDescription<CompileProjects>(() => new CompileProjects(mission_control)); watch_for_projects_to_compile.send_new_fool_when<AppRun<CompilerUserInteractionModel>>() .and_have_it(run); mission_control.send_out_fools_to(watch_for_projects_to_compile); }
public void submit_missions_to([NotNull] MissionControl mission_control) { var tell_overlord_when_all_work_is_done = new MissionDescription<OverlordThrone>(() => this); tell_overlord_when_all_work_is_done.send_new_fool_when<DoMyBidding>(); tell_overlord_when_all_work_is_done.fools_shall_do<AppQuit>(stop_program); mission_control.send_out_fools_to(tell_overlord_when_all_work_is_done); }
public override Dictionary <string, object> SaveToDict() { var dict = new Dictionary <string, object>(); dict.Add(GDMConstants.SchemaKey, "Missions"); dict.Merge(true, FirstCard.ToGDEDict(FirstCardKey)); dict.Merge(true, Fight.ToGDEDict(FightKey)); dict.Merge(true, MissionLevel.ToGDEDict(MissionLevelKey)); dict.Merge(true, MissionName.ToGDEDict(MissionNameKey)); dict.Merge(true, MissionDescription.ToGDEDict(MissionDescriptionKey)); dict.Merge(true, NextCard.ToGDEDict(NextCardKey)); dict.Merge(true, AnswerA.ToGDEDict(AnswerAKey)); dict.Merge(true, AnswerB.ToGDEDict(AnswerBKey)); dict.Merge(true, AnswerC.ToGDEDict(AnswerCKey)); dict.Merge(true, AnswerD.ToGDEDict(AnswerDKey)); return(dict); }
private MissionDescription<OrcishRaidProgress> orc_raid() { var raid = new MissionDescription<OrcishRaidProgress>(() => new OrcishRaidProgress(9)); raid.send_new_fool_when<ElvesFound>() .and_have_it(_start_new_raid); raid.fools_shall_do<SayGo>(_begin_raiding); return raid; }
public override int GetHashCode() { int hash = Name.GetHashCode(); if (Item != null) { hash ^= Item.GetHashCode(); } hash ^= CrewSkillId.GetHashCode(); hash ^= SkillOrange.GetHashCode(); hash ^= SkillYellow.GetHashCode(); hash ^= SkillGreen.GetHashCode(); hash ^= SkillGrey.GetHashCode(); if (Mat1 != null) { hash ^= Mat1.GetHashCode(); hash ^= Mat1Quantity; } if (Mat2 != null) { hash ^= Mat2.GetHashCode(); hash ^= Mat2Quantity.GetHashCode(); } if (Mat3 != null) { hash ^= Mat3.GetHashCode(); hash ^= Mat3Quantity.GetHashCode(); } if (Mat4 != null) { hash ^= Mat4.GetHashCode(); hash ^= Mat4Quantity.GetHashCode(); } if (Mat5 != null) { hash ^= Mat5.GetHashCode(); hash ^= Mat5Quantity.GetHashCode(); } hash ^= CraftingTime.GetHashCode(); hash ^= Subtype.GetHashCode(); if (Research1 != null) { hash ^= CraftingTimeT1.GetHashCode(); hash ^= Research1.GetHashCode(); hash ^= ResearchChance1.GetHashCode(); hash ^= ResearchQuantity1.GetHashCode(); } if (Research2 != null) { hash ^= CraftingTimeT2.GetHashCode(); hash ^= Research2.GetHashCode(); hash ^= ResearchChance2.GetHashCode(); hash ^= ResearchQuantity2.GetHashCode(); } if (Research3 != null) { hash ^= CraftingTimeT3.GetHashCode(); hash ^= Research3.GetHashCode(); hash ^= ResearchChance3.GetHashCode(); hash ^= ResearchQuantity3.GetHashCode(); } hash ^= MissionCost.GetHashCode(); if (MissionDescription != null) { hash ^= MissionDescription.GetHashCode(); } hash ^= MissionUnlockable.GetHashCode(); hash ^= MissionLight.GetHashCode(); hash ^= MissionLightCrit.GetHashCode(); hash ^= MissionDark.GetHashCode(); hash ^= MissionDarkCrit.GetHashCode(); hash ^= TrainingCost.GetHashCode(); hash ^= DisableDisassemble.GetHashCode(); hash ^= DisableCritical.GetHashCode(); hash ^= MissionFaction.GetHashCode(); if (MissionYieldDescription != null) { hash ^= MissionYieldDescription.GetHashCode(); } hash ^= Deprecated.GetHashCode(); return(hash); }
private void Start() { md = FindObjectOfType <MissionDescription>(); mt = FindObjectOfType <MissionTimer>(); }