/// <summary>Tries to give transformations</summary> protected virtual void TryGiveTransformations() { if (CurStage == null) { return; } RandUtilities.PushState(); foreach (var tfGiver in CurStage.GetAllTransformers()) { if (tfGiver.TryTransform(pawn, this)) { break; //try each one, one by one. break at first one that succeeds } } RandUtilities.PopState(); }
/// <summary>Tries to give transformations</summary> protected virtual void TryGiveTransformations() { if (CurStage == null) { return; } if (!CanMutatePawn) { return; } foreach (var tfGiver in CurStage.GetAllTransformers()) { if (tfGiver.TryTransform(pawn, this)) { break; //try each one, one by one. break at first one that succeeds } } }