예제 #1
0
 /// <summary>
 ///     Attempts to install a <see cref="DroppedMechanismComponent"/> into the given limb, potentially deleting the dropped <see cref="IEntity"/>. Returns true if successful, false if there was an error (e.g. not enough room in BodyPart).
 /// </summary>
 public bool TryInstallDroppedMechanism(DroppedMechanismComponent droppedMechanism)
 {
     if (!TryInstallMechanism(droppedMechanism.ContainedMechanism))
     {
         return(false); //Installing the mechanism failed for some reason.
     }
     droppedMechanism.Owner.Delete();
     return(true);
 }
예제 #2
0
 /// <summary>
 ///     Attempts to install a DroppedMechanismComponent into the given limb, potentially deleting the dropped IEntity. Returns true if successful, false if there was an error (e.g. not enough room in BodyPart).
 /// </summary>
 public bool InstallDroppedMechanism(DroppedMechanismComponent droppedMechanism)
 {
     if (_sizeUsed + droppedMechanism.ContainedMechanism.Size > Size)
     {
         return(false); //No space
     }
     InstallMechanism(droppedMechanism.ContainedMechanism);
     droppedMechanism.Owner.Delete();
     return(true);
 }