CanTrainCarCouple
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void CanTrainCarCouple( TrainCar owner, TrainCar owner2 )
{
Puts( "CanTrainCarCouple works!" );
}
Location
- TrainCoupling::TryCouple(TrainCoupling theirCoupling, bool reflect)
csharp
//---
}
if (this.IsCoupled)
{
return false;
}
object returnvar = Interface.CallHook("CanTrainCarCouple", this.owner, theirCoupling.owner);
if (returnvar is bool)
{
return (bool)returnvar;
}
if (reflect && !theirCoupling.TryCouple(this, false))
//---