MDM
30th May 2012, 09:54 PM
I'm usually good at these, but this one in particular had me screaming in pain cos I can't figure out how to accomplish what I want :cry:
This is what I have so far :
protected override bool Test(Sim a, Stereo target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (target.Repairable.Broken || isAutonomous && a.Motives.GetValue(CommodityKind.Fun) > (float)Tuning.kMotiveThresholdToAllowConverse && a.Motives.GetValue(CommodityKind.Social) > (float)Tuning.kMotiveThresholdToAllowConverse)
{
return false;
}
if (target.InUse && a.HasTrait(TraitNames.Insane))
{
greyedOutTooltipCallback = new GreyedOutTooltipCallback(Common.greyedOutTooltipCallbackObjectInUse);
return false;
}
return a.HasTrait(TraitNames.Insane) && a.SimDescription.TeenOrAbove;
}
What I want to accomplish is, keeping everything as it is, just adding that the sim actually using the interaction with the object, will have the string available, so Test should return true.
I tried adding a == null but it makes the string available for all, even if in use.
Can anyone help me here, please?
This is what I have so far :
protected override bool Test(Sim a, Stereo target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
{
if (target.Repairable.Broken || isAutonomous && a.Motives.GetValue(CommodityKind.Fun) > (float)Tuning.kMotiveThresholdToAllowConverse && a.Motives.GetValue(CommodityKind.Social) > (float)Tuning.kMotiveThresholdToAllowConverse)
{
return false;
}
if (target.InUse && a.HasTrait(TraitNames.Insane))
{
greyedOutTooltipCallback = new GreyedOutTooltipCallback(Common.greyedOutTooltipCallbackObjectInUse);
return false;
}
return a.HasTrait(TraitNames.Insane) && a.SimDescription.TeenOrAbove;
}
What I want to accomplish is, keeping everything as it is, just adding that the sim actually using the interaction with the object, will have the string available, so Test should return true.
I tried adding a == null but it makes the string available for all, even if in use.
Can anyone help me here, please?