Ejemplo n.º 1
0
 private void End(IRecipeConductor rc)
 {
     if (subscriber is SituationController controller && controller.SendingAway)
     {
         Complete();
         return;
     }
     orig_End(rc);
 }
Ejemplo n.º 2
0
        private void RequireExecution(IRecipeConductor rc)
        {
            State = SituationState.RequiringExecution;
            // ReSharper disable once PossibleNullReferenceException
            IList <RecipeExecutionCommand> recipeExecutionCommands = (rc as RecipeConductor).GetActualRecipesToExecute(currentPrimaryRecipe);

            if (recipeExecutionCommands.First().Recipe.Id != currentPrimaryRecipe.Id)
            {
                currentPrimaryRecipe = ((Commands.RecipeExecutionCommand)recipeExecutionCommands.First()).Recipe;
            }

            foreach (Commands.RecipeExecutionCommand c in recipeExecutionCommands)
            {
                SituationEffectCommand ec = new SituationEffectCommand(
                    c.Recipe, c.Recipe.ActionId != currentPrimaryRecipe.ActionId, c.Expulsion)
                {
                    SendAway = c.SendAway
                };
                subscriber.SituationExecutingRecipe(ec);
            }
        }
Ejemplo n.º 3
0
 private extern void orig_End(IRecipeConductor rc);