public override bool Test(Sim a, DJTurntable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback)) { return(false); } if (target.DJOwnerSim == null) { return(false); } return(a.Household != target.DJOwnerSim.Household); }
protected static int GiveTipEx(DJTurntable ths, Sim tipper, Sim player) { if (ths.mTipJar == null) { return(0); } Route r = tipper.CreateRoute(); RadialRangeDestination destination = new RadialRangeDestination(); destination.mCenterPoint = ths.mTipJar.Position; destination.mConeVector = ths.mTipJar.ForwardVector; destination.mFacingPreference = RouteOrientationPreference.TowardsObject; destination.mfConeAngle = 3.141593f; destination.mfMinRadius = 1.25f; destination.mfPreferredSpacing = 0.1f; destination.mTargetObject = ths.mTipJar; r.AddDestination(destination); r.SetValidRooms(0x0L, null); r.ExitReasonsInterrupt &= -33; r.Plan(); if (!tipper.DoRoute(r)) { return(0); } tipper.PlaySoloAnimation("a2o_guitar_tip_x", true); int delta = 0; int dJLevel = ths.GetDJLevel(player); if (((dJLevel >= 0x0) && (dJLevel <= 0x5)) && (dJLevel >= DJTurntable.kMakeATipLevel)) { delta = DJTurntable.kTipAmountPerLevel[dJLevel]; } delta = (int)RandomUtil.GetDouble(delta * 0.75, delta * 1.25); delta++; NRaas.StoryProgression.Main.Money.AdjustFunds(player.SimDescription, "Tips", delta); NRaas.StoryProgression.Main.Money.AdjustFunds(tipper.SimDescription, "Tips", -delta); return(delta); }
protected static int GiveTipEx(DJTurntable ths, Sim tipper, Sim player) { if (ths.mTipJar == null) { return 0; } Route r = tipper.CreateRoute(); RadialRangeDestination destination = new RadialRangeDestination(); destination.mCenterPoint = ths.mTipJar.Position; destination.mConeVector = ths.mTipJar.ForwardVector; destination.mFacingPreference = RouteOrientationPreference.TowardsObject; destination.mfConeAngle = 3.141593f; destination.mfMinRadius = 1.25f; destination.mfPreferredSpacing = 0.1f; destination.mTargetObject = ths.mTipJar; r.AddDestination(destination); r.SetValidRooms(0x0L, null); r.ExitReasonsInterrupt &= -33; r.Plan(); if (!tipper.DoRoute(r)) { return 0; } tipper.PlaySoloAnimation("a2o_guitar_tip_x", true); int delta = 0; int dJLevel = ths.GetDJLevel(player); if (((dJLevel >= 0x0) && (dJLevel <= 0x5)) && (dJLevel >= DJTurntable.kMakeATipLevel)) { delta = DJTurntable.kTipAmountPerLevel[dJLevel]; } delta = (int)RandomUtil.GetDouble(delta * 0.75, delta * 1.25); delta++; NRaas.StoryProgression.Main.Money.AdjustFunds(player.SimDescription, "Tips", delta); NRaas.StoryProgression.Main.Money.AdjustFunds(tipper.SimDescription, "Tips", -delta); return delta; }
public override string GetInteractionName(Sim actor, DJTurntable target, InteractionObjectPair iop) { return(base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target))); }
public override bool Test(Sim a, DJTurntable target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback)) return false; if (target.DJOwnerSim == null) return false; return (a.Household != target.DJOwnerSim.Household); }
public override string GetInteractionName(Sim actor, DJTurntable target, InteractionObjectPair iop) { return base.GetInteractionName(actor, target, new InteractionObjectPair(sOldSingleton, target)); }