/// <summary> /// Attempts to perform surgery with the given tooltype. Returns whether the operation was successful. /// </summary> /// /// <param name="toolType">The SurgeryToolType used for this surgery.</param> /// /// <param name="performer">The entity performing the surgery.</param> public bool PerformSurgery(SurgeryToolType toolType, BodyManagerComponent target, IEntity performer) { SurgeryAction step = GetSurgeryStep(toolType); if (step == null) { return(false); } step(target, performer); return(true); }
/// <summary> /// Attempts to perform surgery of the given <see cref="SurgeryType"/>. Returns whether the operation was successful. /// </summary> /// <param name="surgeryType">The <see cref="SurgeryType"/> used for this surgery.</param> /// <param name="performer">The entity performing the surgery.</param> public bool PerformSurgery(SurgeryType surgeryType, IBodyPartContainer container, ISurgeon surgeon, IEntity performer) { SurgeryAction step = GetSurgeryStep(surgeryType); if (step == null) { return(false); } step(container, surgeon, performer); return(true); }