private void End(IRecipeConductor rc) { if (subscriber is SituationController controller && controller.SendingAway) { Complete(); return; } orig_End(rc); }
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); } }
private extern void orig_End(IRecipeConductor rc);