public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters) { InteractionInstance na = new GetMakeoverEx(); na.Init(ref parameters); return(na); }
public static void OnFinishMakeoverFreestyle(Sim actor, Sim target, string interaction, ActiveTopic topic, InteractionInstance i) { try { bool tookSemaphore = false; Styling.MakeoverOutcome makeoverOutcome = Styling.GetMakeoverOutcome(target, actor, true); bool forceFailureOutfit = makeoverOutcome == Styling.MakeoverOutcome.EpicFailure; bool flag3 = false; try { if (forceFailureOutfit) { Styling.LoadMakeoverEpicFailureOutfitForCasOverride(target); } flag3 = GetMakeoverEx.DisplayCAS(target, actor, ref tookSemaphore, forceFailureOutfit); } catch (Exception) { throw; } finally { if (tookSemaphore) { GameStates.ReleaseInteractionStateChangeSemaphore(); } } if (CASChangeReporter.Instance.GetPropertyChanged(CASChangeReporter.ChangeFlags.Any)) { SkillLevel customerReactionType = Styling.GetCustomerReactionType(target, actor, makeoverOutcome, false); SkillLevel stylerReactionType = Styling.GetStylerReactionType(customerReactionType); StateMachineClient client = StateMachineClient.Acquire(actor, "StylistActiveCareer"); client.SetActor("x", target); client.SetActor("y", actor); client.SetParameter("doClothesSpin", !flag3); client.SetParameter("customerReactionType", customerReactionType); client.SetParameter("stylistReactionType", stylerReactionType); client.EnterState("x", "Enter"); client.EnterState("y", "Enter"); actor.LoopIdle(); client.RequestState("x", "Customer Reaction"); Styling.PostMakeover(target, actor, makeoverOutcome, false, customerReactionType, true, true, new Styling.OnMakeoverCompletedCallback(SocialCallback.OnMakeoverFreestyleCompleted)); client.RequestState(false, "x", "Exit"); client.RequestState("y", "Stylist Reaction"); client.RequestState("y", "Exit"); } } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(actor, target, e); } }
public override bool Run() { try { if (!Actor.RouteToSlotAndCheckInUse(Target, StylingStation.kPlatformRoutingSlot)) { return(false); } StandardEntry(); Styling.PreMakeover(Actor, Actor); EnterStateMachine("StylingStation", "Enter", "x", "stylistStation"); AddSynchronousOneShotScriptEventHandler(0x384, new SacsEventHandler(SnapSimToPlatform)); AddSynchronousOneShotScriptEventHandler(0x385, new SacsEventHandler(SnapSimToGround)); AnimateSim("Get On Platform"); if (Actor.HasExitReason()) { AnimateSim("Get Off Platform"); AnimateSim("Exit"); StandardExit(); return(false); } BeginCommodityUpdates(); AnimateSim("Customer Alone Loop"); float duration = Actor.IsNPC ? StylingStation.kNPCMakeoverDurationInMinutes : StylingStation.kMakeoverDurationInMinutes; bool succeeded = DoTimedLoop(duration); if (succeeded) { Styling.MakeoverOutcome success = Styling.MakeoverOutcome.Success; bool isSelectable = Actor.IsSelectable; if (!isSelectable) { Sim.SwitchOutfitHelper switchOutfitHelper = null; Styling.LoadMakeoverOutfitForClothesSpin(Actor, false, Autonomous, ref switchOutfitHelper); mSwitchOutfitHelper = switchOutfitHelper; } Animate("x", "Gussy Anims Done"); if (!isSelectable && (mSwitchOutfitHelper != null)) { mSwitchOutfitHelper.Wait(true); mSwitchOutfitHelper.AddScriptEventHandler(this); } if (isSelectable) { bool tookSemaphore = mTookSemaphore; isSelectable = GetMakeoverEx.DisplayCAS(Actor, null, ref tookSemaphore, false); mTookSemaphore = tookSemaphore; } SkillLevel expert = SkillLevel.expert; SetParameter("doClothesSpin", !isSelectable); SetParameter("customerReactionType", expert); Animate("x", "Customer Reaction"); ReleaseSemaphore(); Styling.PostMakeover(Actor, Actor, success, false, expert, isSelectable, isSelectable, null); } if (succeeded) { Actor.SkillManager.AddElement(SkillNames.Styling); } EndCommodityUpdates(succeeded); AnimateSim("Get Off Platform"); AnimateSim("Exit"); StandardExit(); return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters) { InteractionInstance na = new GetMakeoverEx(); na.Init(ref parameters); return na; }