Climbable localization fixes (#3645)
* Working on climable * Continue * Fixed typo * Fixed rest of climbable * Fixed localisation * Update climbable-component.ftl
This commit is contained in:
@@ -71,27 +71,27 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
{
|
{
|
||||||
if (!ActionBlockerSystem.CanInteract(user))
|
if (!ActionBlockerSystem.CanInteract(user))
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You can't do that!");
|
reason = Loc.GetString("comp-climbable-cant-interact");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user.HasComponent<ClimbingComponent>() ||
|
if (!user.HasComponent<ClimbingComponent>() ||
|
||||||
!user.TryGetComponent(out IBody body))
|
!user.TryGetComponent(out IBody body))
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You are incapable of climbing!");
|
reason = Loc.GetString("comp-climbable-cant-climb");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body.GetPartsOfType(BodyPartType.Leg).Count == 0 ||
|
if (body.GetPartsOfType(BodyPartType.Leg).Count == 0 ||
|
||||||
body.GetPartsOfType(BodyPartType.Foot).Count == 0)
|
body.GetPartsOfType(BodyPartType.Foot).Count == 0)
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You are unable to climb!");
|
reason = Loc.GetString("comp-climbable-cant-climb");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user.InRangeUnobstructed(target, Range))
|
if (!user.InRangeUnobstructed(target, Range))
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You can't reach there!");
|
reason = Loc.GetString("comp-climbable-cant-reach");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,13 +111,13 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
{
|
{
|
||||||
if (!ActionBlockerSystem.CanInteract(user))
|
if (!ActionBlockerSystem.CanInteract(user))
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You can't do that!");
|
reason = Loc.GetString("comp-climbable-cant-interact");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target == null || !dragged.HasComponent<ClimbingComponent>())
|
if (target == null || !dragged.HasComponent<ClimbingComponent>())
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You can't do that!");
|
reason = Loc.GetString("comp-climbable-cant-climb");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
if (!user.InRangeUnobstructed(target, Range, predicate: Ignored) ||
|
if (!user.InRangeUnobstructed(target, Range, predicate: Ignored) ||
|
||||||
!user.InRangeUnobstructed(dragged, Range, predicate: Ignored))
|
!user.InRangeUnobstructed(dragged, Range, predicate: Ignored))
|
||||||
{
|
{
|
||||||
reason = Loc.GetString("You can't reach there!");
|
reason = Loc.GetString("comp-climbable-cant-reach");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,11 +183,11 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
// we may potentially need additional logic since we're forcing a player onto a climbable
|
// we may potentially need additional logic since we're forcing a player onto a climbable
|
||||||
// there's also the cases where the user might collide with the person they are forcing onto the climbable that i haven't accounted for
|
// there's also the cases where the user might collide with the person they are forcing onto the climbable that i haven't accounted for
|
||||||
|
|
||||||
var othersMessage = Loc.GetString("{0:theName} forces {1:theName} onto {2:theName}!", user,
|
var othersMessage = Loc.GetString("comp-climbable-user-climbs-force-other",
|
||||||
entityToMove, Owner);
|
("user", user), ("moved-user", entityToMove), ("climbable", Owner));
|
||||||
user.PopupMessageOtherClients(othersMessage);
|
user.PopupMessageOtherClients(othersMessage);
|
||||||
|
|
||||||
var selfMessage = Loc.GetString("You force {0:theName} onto {1:theName}!", entityToMove, Owner);
|
var selfMessage = Loc.GetString("comp-climbable-user-climbs-force", ("moved-user", entityToMove), ("climbable", Owner));
|
||||||
user.PopupMessage(selfMessage);
|
user.PopupMessage(selfMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -229,10 +229,10 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
|
|
||||||
climbMode.TryMoveTo(userPos, endPoint);
|
climbMode.TryMoveTo(userPos, endPoint);
|
||||||
|
|
||||||
var othersMessage = Loc.GetString("{0:theName} jumps onto {1:theName}!", user, Owner);
|
var othersMessage = Loc.GetString("comp-climbable-user-climbs-other", ("user", user), ("climbable", Owner));
|
||||||
user.PopupMessageOtherClients(othersMessage);
|
user.PopupMessageOtherClients(othersMessage);
|
||||||
|
|
||||||
var selfMessage = Loc.GetString("You jump onto {0:theName}!", Owner);
|
var selfMessage = Loc.GetString("comp-climbable-user-climbs", ("climbable", Owner));
|
||||||
user.PopupMessage(selfMessage);
|
user.PopupMessage(selfMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,7 +250,7 @@ namespace Content.Server.GameObjects.Components.Movement
|
|||||||
data.Visibility = VerbVisibility.Invisible;
|
data.Visibility = VerbVisibility.Invisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Text = Loc.GetString("Vault");
|
data.Text = Loc.GetString("comp-climbable-verb-climb");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Activate(IEntity user, ClimbableComponent component)
|
protected override void Activate(IEntity user, ClimbableComponent component)
|
||||||
|
|||||||
28
Resources/Locale/en-US/components/climbable-component.ftl
Normal file
28
Resources/Locale/en-US/components/climbable-component.ftl
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
### UI
|
||||||
|
|
||||||
|
# Verb name for climbing
|
||||||
|
comp-climbable-verb-climb = Vault
|
||||||
|
|
||||||
|
### Interaction Messages
|
||||||
|
|
||||||
|
# Shown to you when your character climbs on $climbable
|
||||||
|
comp-climbable-user-climbs = You jump onto {$climbable}!
|
||||||
|
|
||||||
|
# Shown to others when $user climbs on $climbable
|
||||||
|
comp-climbable-user-climbs-other = {$user} jumps onto {$climbable}!
|
||||||
|
|
||||||
|
# Shown to you when your character force someone to climb on $climbable
|
||||||
|
comp-climbable-user-climbs-force = You force {$moved-user} onto {$climbable}!
|
||||||
|
|
||||||
|
# Shown to others when someone force other $moved-user to climb on $climbable
|
||||||
|
comp-climbable-user-climbs-force-other = {$user} forces {$moved-user} onto {$climbable}!
|
||||||
|
|
||||||
|
# Shown to you when your character is far away from climbable
|
||||||
|
comp-climbable-cant-reach = You can't reach there!
|
||||||
|
|
||||||
|
# Shown to you when your character can't interact with climbable for some reason
|
||||||
|
comp-climbable-cant-interact = You can't do that!
|
||||||
|
|
||||||
|
# Shown to you when your character can't climb
|
||||||
|
comp-climbable-cant-climb = You are incapable of climbing!
|
||||||
Reference in New Issue
Block a user