本文整理汇总了C#中Computer.IsComputerUsable方法的典型用法代码示例。如果您正苦于以下问题:C# Computer.IsComputerUsable方法的具体用法?C# Computer.IsComputerUsable怎么用?C# Computer.IsComputerUsable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Computer
的用法示例。
在下文中一共展示了Computer.IsComputerUsable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if (!target.IsComputerUsable(a, true, false, isAutonomous)) return false;
return Helpers.TravelUtilEx.CanSimTriggerTravelToHomeWorld(a, ref greyedOutTooltipCallback);
}
catch (Exception e)
{
Common.Exception(a, target, e);
return false;
}
}
示例2: Test
public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
if (!target.IsComputerUsable(a, true, false, isAutonomous))
{
return false;
}
else if (!AfterschoolActivityEx.MeetsCommonAfterschoolActivityRequirements(a.SimDescription, ChosenActivity, ref greyedOutTooltipCallback))
{
return false;
}
return true;
}
catch (Exception e)
{
Common.Exception(a, target, e);
return false;
}
}
示例3: Test
public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
try
{
return (target.IsComputerUsable(a, true, false, isAutonomous) && (GetValidSims(a, true).Count > 0x0));
}
catch (Exception e)
{
Common.Exception(a, target, e);
return false;
}
}
示例4: Test
public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
Journalism journalism = OmniCareer.Career<Journalism>(a.Occupation);
return ((target.IsComputerUsable(a, true, false, isAutonomous) && (journalism != null)) && journalism.CanWriteReview());
}
示例5: AddInteractions
public override void AddInteractions(InteractionObjectPair iop, Sim actor, Computer target, List<InteractionObjectPair> results)
{
Journalism job = OmniCareer.Career<Journalism>(actor.Occupation);
if ((target.IsComputerUsable(actor, true, false, false) && (job != null)) && job.CanWriteReview())
{
foreach (Journalism.ReviewedRabbitHole hole in job.RabbitHolesReviewed)
{
if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && !hole.IsReviewNegative))
{
string[] path = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("GoodReview", new object[0x0]) };
results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), path, hole, false), iop.Target));
}
if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && hole.IsReviewNegative))
{
string[] strArray2 = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("BadReview", new object[0x0]) };
results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), strArray2, hole, true), iop.Target));
}
}
}
}
示例6: Test
public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (!target.IsComputerUsable(a, true, false, isAutonomous))
{
return false;
}
if (!Helpers.TravelUtilEx.CanSimTriggerTravelToUniversityWorld(a, true, ref greyedOutTooltipCallback))
{
return false;
}
if (a.OccupationAsAcademicCareer != null)
{
return false;
}
return true;
}