Ejemplo n.º 1
0
        public new CraftingSimEx Clone(bool copyActions = false)
        {
            CraftingSimEx result = new CraftingSimEx();

            result.SetRecipe(CurrentRecipe);
            CopyTo(result, copyActions);
            return(result);
        }
Ejemplo n.º 2
0
 private void ConditionalSolvingWindow_FinishedConditionExecution(CraftingSimEx obj)
 {
     Sim.RemoveActions();
     for (int i = 0; i < obj.StepSettings.Length; i++)
     {
         Sim.StepSettings[i].RecipeCondition = obj.StepSettings[i].RecipeCondition;
     }
     Sim.AddActions(true, obj.GetCraftingActions());
 }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            Sim = new CraftingSimEx();
            Sim.FinishedStep      += Sim_FinishedStep;
            Sim.FinishedExecution += Sim_FinishedExecution;
            Sim.PropertyChanged   += Sim_PropertyChanged;
        }
Ejemplo n.º 4
0
        public virtual void CopyTo(CraftingSimEx sim, bool copyActions = false)
        {
            sim.Level             = Level;
            sim.BaseCraftsmanship = BaseCraftsmanship;
            sim.BaseControl       = BaseControl;
            sim.BaseMaxCP         = BaseMaxCP;
            sim.CraftsmanshipBuff = CraftsmanshipBuff;
            sim.ControlBuff       = ControlBuff;
            sim.MaxCPBuff         = MaxCPBuff;
            sim.StepSettings      = new CraftingSimStepSettings[MaxActions];

            for (int i = 0; i < MaxActions; i++)
            {
                sim.StepSettings[i] = StepSettings[i].Clone();
            }
            ;
            if (copyActions)
            {
                sim.RemoveActions();
                sim.AddActions(false, GetCraftingActions());

                sim.Step = Step;
                sim.CurrentDurability = CurrentDurability;
                sim.CurrentProgress   = CurrentProgress;
                sim.CurrentQuality    = CurrentQuality;
                sim.CurrentCP         = CurrentCP;

                sim.InnerQuietBuff = InnerQuietBuff?.Clone() as InnerQuietBuff;
                if (sim.InnerQuietBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.InnerQuietBuff);
                }

                sim.WasteNotBuff = WasteNotBuff?.Clone() as WasteNotBuff;
                if (sim.WasteNotBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.WasteNotBuff);
                }

                sim.VenerationBuff = VenerationBuff?.Clone() as VenerationBuff;
                if (sim.VenerationBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.VenerationBuff);
                }

                sim.GreatStridesBuff = GreatStridesBuff?.Clone() as GreatStridesBuff;
                if (sim.GreatStridesBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.GreatStridesBuff);
                }

                sim.InnovationBuff = InnovationBuff?.Clone() as InnovationBuff;
                if (sim.InnovationBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.InnovationBuff);
                }

                sim.MuscleMemoryBuff = MuscleMemoryBuff?.Clone() as MuscleMemoryBuff;
                if (sim.MuscleMemoryBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.MuscleMemoryBuff);
                }

                sim.ManipulationBuff = ManipulationBuff?.Clone() as ManipulationBuff;
                if (sim.ManipulationBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.ManipulationBuff);
                }

                sim.ObserveBuff = ObserveBuff?.Clone() as ObserveBuff;
                if (sim.ObserveBuff != null)
                {
                    sim.CraftingBuffs.Add(sim.ObserveBuff);
                }

                sim.NameOfTheElementsBuff = NameOfTheElementsBuff?.Clone() as NameOfTheElementsBuff;

                sim.NameOfTheElementsUsed = NameOfTheElementsUsed;
            }
        }