Fixed characters dragging husks by their tongue when GrabLimb is set to None, removed hardcoded texts from the grab button. Closes #210
This commit is contained in:
@@ -205,7 +205,7 @@ namespace Barotrauma
|
||||
{
|
||||
grabHoldButton = new GUIButton(
|
||||
new Rectangle(character.SelectedCharacter.Inventory.SlotPositions[0].ToPoint() + new Point(320, -60), new Point(130, 20)),
|
||||
"Grabbing: " + (character.AnimController.GrabLimb == LimbType.Torso ? "Torso" : "Hands"), "");
|
||||
TextManager.Get("Grabbing") + ": " + TextManager.Get(character.AnimController.GrabLimb == LimbType.None ? "Hands" : character.AnimController.GrabLimb.ToString()), "");
|
||||
|
||||
grabHoldButton.OnClicked = (button, userData) =>
|
||||
{
|
||||
@@ -223,7 +223,7 @@ namespace Barotrauma
|
||||
GameMain.Client.CreateEntityEvent(Character.Controlled, new object[] { NetEntityEvent.Type.Control });
|
||||
}
|
||||
|
||||
grabHoldButton.Text = "Grabbing: " + (Character.Controlled.AnimController.GrabLimb == LimbType.Torso ? "Torso" : "Hands");
|
||||
grabHoldButton.Text = TextManager.Get("Grabbing") + ": " + TextManager.Get(character.AnimController.GrabLimb == LimbType.None ? "Hands" : character.AnimController.GrabLimb.ToString());
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,11 +53,30 @@
|
||||
<PressureInfo>Water pressure increasing!</PressureInfo>
|
||||
<Grabbing>Grabbing</Grabbing>
|
||||
<Stun>Stun</Stun>
|
||||
|
||||
|
||||
<!-- Status -->
|
||||
<StatusOK>OK</StatusOK>
|
||||
<Unconscious>Unconscious</Unconscious>
|
||||
<Injured>Injured</Injured>
|
||||
|
||||
<!-- Limbs -->
|
||||
<LeftHand>Left hand</LeftHand>
|
||||
<RightHand>Right hand</RightHand>
|
||||
<Hands>Hands</Hands>
|
||||
<LeftArm>Left arm</LeftArm>
|
||||
<RightArm>Right arm</RightArm>
|
||||
<LeftLeg>Left leg</LeftLeg>
|
||||
<RightLeg>Right leg</RightLeg>
|
||||
<LeftFoot>Left foot</LeftFoot>
|
||||
<RightFoot>Right foot</RightFoot>
|
||||
<Head>Head</Head>
|
||||
<Torso>Torso</Torso>
|
||||
<Tail>Tail</Tail>
|
||||
<Legs>Legs</Legs>
|
||||
<RightThigh>Right thigh</RightThigh>
|
||||
<LeftThigh>Left thigh</LeftThigh>
|
||||
<Waist>Waist</Waist>
|
||||
|
||||
<!-- Misc -->
|
||||
<Yes>Yes</Yes>
|
||||
|
||||
@@ -1034,7 +1034,8 @@ namespace Barotrauma
|
||||
{
|
||||
Limb targetLimb = target.AnimController.GetLimb(GrabLimb);
|
||||
|
||||
if (targetLimb == null || targetLimb.IsSevered)
|
||||
//grab hands if GrabLimb is not specified (or torso if the character has no hands)
|
||||
if (GrabLimb == LimbType.None || targetLimb.IsSevered)
|
||||
{
|
||||
targetLimb = target.AnimController.GetLimb(LimbType.Torso);
|
||||
if (i == 0)
|
||||
|
||||
Reference in New Issue
Block a user