public override void OKButton()
 {
     if (stage == 0)
     {
         stage++;
         scenarioUI.CloseAnnouncePanel();
         conditionQuest = new ConditionQuest(
             SimpleCondition.GetStoredEnergyCondition(ANCHOR_LAUNCH_ENERGYCOST),
             colony,
             false,
             ConditionQuest.ConditionQuestIcon.FoundationRouteIcon
             );
         scenario.StartQuest(conditionQuest);
         scenarioQuest.FillText(localizer.GetQuestData(FoundationScenarioStep.AnchorStart));
         scenarioUI.ChangeConditionButtonLabel(Localization.GetWord(LocalizedWord.Anchor_verb));
         scenarioUI.ChangeConditionIcon(UIController.iconsTexture, UIController.GetIconUVRect(Icons.FoundationRoute));
         conditionQuest.BindUIUpdateFunction(scenarioUI.UpdateConditionInfo);
         scenarioUI.ShowConditionPanel(scenarioQuest);
     }
 }
示例#2
0
        public override void OKButton()
        {
            if (stage == 0)
            {
                stage++;
                scenarioUI.CloseAnnouncePanel();
                conditionQuest = new ConditionQuest(
                    SimpleCondition.GetStoredEnergyCondition(ANCHOR_LAUNCH_ENERGYCOST),
                    colony,
                    false,
                    QuestIcon.FoundationRouteIcon
                    );
                scenario.StartQuest(conditionQuest);
                scenarioQuest.FillText(localizer.GetQuestData(FoundationScenarioStep.AnchorStart));

                conditionWindow = scenarioUI.ShowConditionPanel(0, conditionQuest, this.UIConditionProceedButton);
                conditionWindow.SetButtonText(Localization.GetWord(LocalizedWord.Anchor_verb));
                conditionWindow.SetMainIcon(UIController.iconsTexture, UIController.GetIconUVRect(Icons.PowerPlus));
                conditionQuest.BindUIUpdateFunction(conditionWindow.Refresh);
            }
        }
示例#3
0
        protected void StartSectorBuildingQuest(byte ring, byte index, System.Action clickAction)
        {
            var conditions = new SimpleCondition[3];

            if (ring == 0) // INNER RING
            {
                switch (index)
                {
                case 0:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.metal_K, 4100f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.metal_S, 1600f);
                    conditions[2] = SimpleCondition.GetMoneyCondition(2500f);
                    break;

                case 1:
                    conditions[0] = SimpleCondition.GetGearsCondition(4f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.metal_M, 2500f);
                    conditions[2] = SimpleCondition.GetResourceCondition(ResourceType.metal_E, 1200f);
                    break;

                case 2:
                    conditions[0] = SimpleCondition.GetMoneyCondition(2500f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.metal_P, 500f);
                    conditions[2] = SimpleCondition.GetResourceCondition(ResourceType.mineral_L, 2000f);
                    break;

                case 3:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.metal_S, 1500f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.Concrete, 7530f);
                    conditions[2] = SimpleCondition.GetResourceCondition(ResourceType.Plastics, 7530f);
                    break;

                case 4:
                    conditions[0] = SimpleCondition.GetFreeWorkersCondition(500);
                    conditions[1] = SimpleCondition.GetMoneyCondition(1200f);
                    conditions[2] = SimpleCondition.GetResourceCondition(ResourceType.Food, 40000f);
                    break;

                case 5:
                    conditions[0] = SimpleCondition.GetFreeWorkersCondition(600);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.metal_K, 1200f);
                    conditions[2] = SimpleCondition.GetMoneyCondition(1500f);
                    break;
                }
                conditionQuest = new ConditionQuest(conditions, colony, false, QuestIcon.FoundationRouteIcon);
            }
            else // OUTER RING
            {
                switch (index)
                {
                case 0:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.Plastics, 6800f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.metal_K, 1200f);
                    conditions[2] = SimpleCondition.GetStoredEnergyCondition(6100f);
                    break;

                case 1:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.Fuel, 250f);
                    conditions[1] = SimpleCondition.GetFreeWorkersCondition(700);
                    conditions[2] = SimpleCondition.GetMoneyCondition(1700f);
                    break;

                case 2:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.Concrete, 8000f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.Plastics, 8000f);
                    conditions[2] = SimpleCondition.GetCrewsCondition(2, 3);
                    break;

                case 3:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.metal_M, 5700f);
                    conditions[1] = SimpleCondition.GetShuttlesCondition(10);
                    conditions[2] = SimpleCondition.GetDummyCondition(true);
                    // 4 рейса с оборудованием
                    break;

                case 4:
                    conditions[0] = SimpleCondition.GetResourceCondition(ResourceType.Dirt, 12000f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.mineral_F, 2500f);
                    conditions[2] = SimpleCondition.GetResourceCondition(ResourceType.mineral_L, 1000f);
                    break;

                case 5:
                    conditions[0] = SimpleCondition.GetMoneyCondition(2000f);
                    conditions[1] = SimpleCondition.GetResourceCondition(ResourceType.Dirt, 1200f);
                    conditions[2] = SimpleCondition.GetGearsCondition(5f);
                    break;
                }
                //
                conditionQuest = new ConditionQuest(conditions, colony, false, QuestIcon.FoundationRouteIcon);
            }
            conditionQuest.CheckQuestConditions();
            conditionWindow = scenarioUI.ShowConditionPanel(0, conditionQuest, clickAction);
            conditionQuest.BindUIUpdateFunction(conditionWindow.Refresh);
            conditionQuest.SubscribeToUpdate(questUI);
        }