Пример #1
0
        public void SendClientBodyParts(ConnectedPlayer SentByPlayer, BodyPartType inTargetBodyPart = BodyPartType.None)
        {
            if (currentlyOn == null)
            {
                var targetedBodyParts = new List <BodyPart>();
                foreach (var bodyPart in LivingHealthMasterBase.SurfaceBodyParts)
                {
                    targetedBodyParts.Add(bodyPart);
                }

                SendSurgeryBodyParts.SendTo(targetedBodyParts, this, SentByPlayer);
            }
            else
            {
                if (BodyPartIsopen)
                {
                    SendSurgeryBodyParts.SendTo(BodyPartIsOn.ContainBodyParts, this, SentByPlayer);
                }
                else
                {
                    SendSurgeryBodyParts.SendTo(new List <BodyPart>()
                    {
                        BodyPartIsOn
                    }, this, SentByPlayer);
                }
            }
        }
Пример #2
0
 public void SendClientBodyParts(ConnectedPlayer SentByPlayer, BodyPartType inTargetBodyPart = BodyPartType.None)
 {
     if (currentlyOn == null)
     {
         var targetedBodyParts = new List <BodyPart>();
         foreach (var bodyPart in LivingHealthMasterBase.BodyPartList)
         {
             targetedBodyParts.Add(bodyPart);
         }
         SendSurgeryBodyParts.SendTo(targetedBodyParts, this, SentByPlayer);
     }
     else
     {
         if (BodyPartIsopen)
         {
             //TODO: remove bodypart component from organs
             var organBodyPartList = new List <BodyPart>();
             foreach (var organ in BodyPartIsOn.OrganList)
             {
                 organBodyPartList.Add(organ.GetComponent <BodyPart>());
             }
             SendSurgeryBodyParts.SendTo(organBodyPartList, this, SentByPlayer);
         }
         else
         {
             SendSurgeryBodyParts.SendTo(new List <BodyPart>()
             {
                 BodyPartIsOn
             }, this, SentByPlayer);
         }
     }
 }
Пример #3
0
 public void SendClientBodyParts(ConnectedPlayer SentByPlayer, BodyPartType inTargetBodyPart = BodyPartType.None)
 {
     if (currentlyOn == null)
     {
         SendSurgeryBodyParts.SendTo(LivingHealthMasterBase.GetBodyPartsInZone(inTargetBodyPart), this,
                                     SentByPlayer);
     }
     else
     {
         if (BodyPartIsopen)
         {
             SendSurgeryBodyParts.SendTo(BodyPartIsOn.ContainBodyParts, this, SentByPlayer);
         }
         else
         {
             SendSurgeryBodyParts.SendTo(new List <BodyPart>()
             {
                 BodyPartIsOn
             }, this, SentByPlayer);
         }
     }
 }