Example #1
0
 public static void PerformPostLoopArtClub(GoToSchoolInRabbitHole interaction, AfterschoolActivity activity)
 {
     try
     {
         activity.CheckForNewPainting(interaction.Actor);
     }
     catch (ResetException)
     {
         throw;
     }
     catch (Exception e)
     {
         Common.Exception(interaction.Actor, interaction.Target, e);
     }
 }
        public static void PostAfterSchoolLoop(GoToSchoolInRabbitHole ths, bool succeeded, AfterschoolActivity activity, InteractionInstance.InsideLoopFunction afterSchoolLoop)
        {
            try
            {
                if (afterSchoolLoop != null)
                {
                    ths.Target.ClearAmbientSounds(ths.Target);
                    ths.Target.AddAmbientSound("rhole_school_oneshot");

                    foreach (SkillNames names in activity.ActivitySkillNameList)
                    {
                        ths.Actor.SkillManager.StopSkillGain(names);
                    }

                    if (!sCareerPerformAfterschoolPostLoop.Invoke <bool>(new object[] { ths, activity }))
                    {
                        if (activity.CurrentActivityType == AfterschoolActivityType.ArtClub)
                        {
                            activity.CheckForNewPainting(ths.Actor);
                        }
                    }

                    ISchoolRabbitHole target = GetTarget(ths);

                    target.HasAfterschoolActivityToday = false;
                }

                ths.Actor.School.FinishWorking();

                ths.EndCommodityUpdates(succeeded);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(ths.Actor, ths.Target, e);
            }
        }
 public static void PerformPostLoopArtClub(GoToSchoolInRabbitHole interaction, AfterschoolActivity activity)
 {
     try
     {
         activity.CheckForNewPainting(interaction.Actor);
     }
     catch (ResetException)
     {
         throw;
     }
     catch (Exception e)
     {
         Common.Exception(interaction.Actor, interaction.Target, e);
     }
 }
        public static void PostAfterSchoolLoop(GoToSchoolInRabbitHole ths, bool succeeded, AfterschoolActivity activity, InteractionInstance.InsideLoopFunction afterSchoolLoop)
        {
            try
            {
                if (afterSchoolLoop != null)
                {
                    ths.Target.ClearAmbientSounds(ths.Target);
                    ths.Target.AddAmbientSound("rhole_school_oneshot");

                    foreach (SkillNames names in activity.ActivitySkillNameList)
                    {
                        ths.Actor.SkillManager.StopSkillGain(names);
                    }

                    if (!sCareerPerformAfterschoolPostLoop.Invoke<bool>(new object[] { ths, activity }))
                    {
                        if (activity.CurrentActivityType == AfterschoolActivityType.ArtClub)
                        {
                            activity.CheckForNewPainting(ths.Actor);
                        }
                    }

                    ISchoolRabbitHole target = GetTarget(ths);

                    target.HasAfterschoolActivityToday = false;
                }

                ths.Actor.School.FinishWorking();
                
                ths.EndCommodityUpdates(succeeded);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(ths.Actor, ths.Target, e);
            }
        }