Allow self-cuffing and appropriate text changes (#7829)
This commit is contained in:
@@ -154,12 +154,6 @@ namespace Content.Server.Cuffs.Components
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eventArgs.Target == eventArgs.User)
|
|
||||||
{
|
|
||||||
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-target-self-error"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Broken)
|
if (Broken)
|
||||||
{
|
{
|
||||||
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-cuffs-broken-error"));
|
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-cuffs-broken-error"));
|
||||||
@@ -184,9 +178,15 @@ namespace Content.Server.Cuffs.Components
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", eventArgs.Target)));
|
if (eventArgs.Target == eventArgs.User)
|
||||||
eventArgs.User.PopupMessage(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User)));
|
{
|
||||||
|
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-target-self"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", eventArgs.Target)));
|
||||||
|
eventArgs.User.PopupMessage(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User)));
|
||||||
|
}
|
||||||
SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound.GetSound(), Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound.GetSound(), Owner);
|
||||||
|
|
||||||
TryUpdateCuff(eventArgs.User, target, cuffed);
|
TryUpdateCuff(eventArgs.User, target, cuffed);
|
||||||
@@ -225,15 +225,28 @@ namespace Content.Server.Cuffs.Components
|
|||||||
if (cuffs.TryAddNewCuffs(user, Owner))
|
if (cuffs.TryAddNewCuffs(user, Owner))
|
||||||
{
|
{
|
||||||
SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound.GetSound(), Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound.GetSound(), Owner);
|
||||||
|
if (target == user)
|
||||||
user.PopupMessage(Loc.GetString("handcuff-component-cuff-other-success-message",("otherName", target)));
|
{
|
||||||
target.PopupMessage(Loc.GetString("handcuff-component-cuff-by-other-success-message", ("otherName", user)));
|
user.PopupMessage(Loc.GetString("handcuff-component-cuff-self-success-message"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.PopupMessage(Loc.GetString("handcuff-component-cuff-other-success-message",("otherName", target)));
|
||||||
|
target.PopupMessage(Loc.GetString("handcuff-component-cuff-by-other-success-message", ("otherName", user)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user.PopupMessage(Loc.GetString("handcuff-component-cuff-interrupt-message",("targetName", target)));
|
if (target == user)
|
||||||
target.PopupMessage(Loc.GetString("handcuff-component-cuff-interrupt-other-message",("otherName", user)));
|
{
|
||||||
|
user.PopupMessage(Loc.GetString("handcuff-component-cuff-interrupt-self-message"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.PopupMessage(Loc.GetString("handcuff-component-cuff-interrupt-message",("targetName", target)));
|
||||||
|
target.PopupMessage(Loc.GetString("handcuff-component-cuff-interrupt-other-message",("otherName", user)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
handcuff-component-target-self-error = You can't cuff yourself!
|
handcuff-component-target-self = You start cuffing yourself.
|
||||||
handcuff-component-cuffs-broken-error = The cuffs are broken!
|
handcuff-component-cuffs-broken-error = The cuffs are broken!
|
||||||
handcuff-component-target-has-no-hands-error = {$targetName} has no hands!
|
handcuff-component-target-has-no-hands-error = {$targetName} has no hands!
|
||||||
handcuff-component-target-has-no-free-hands-error = {$targetName} has no free hands!
|
handcuff-component-target-has-no-free-hands-error = {$targetName} has no free hands!
|
||||||
handcuff-component-too-far-away-error = You are too far away to use the cuffs!
|
handcuff-component-too-far-away-error = You are too far away to use the cuffs!
|
||||||
handcuff-component-start-cuffing-target-message = You start cuffing {$targetName}.
|
handcuff-component-start-cuffing-target-message = You start cuffing {$targetName}.
|
||||||
handcuff-component-start-cuffing-by-other-message = {$otherName} starts cuffing you!
|
handcuff-component-start-cuffing-by-other-message = {$otherName} starts cuffing you!
|
||||||
handcuff-component-cuff-other-success-message = You successfully cuff {$otherName}.
|
handcuff-component-cuff-other-success-message = You successfully cuff {$otherName}.
|
||||||
handcuff-component-cuff-by-other-success-message = You have been cuffed by {$otherName}!
|
handcuff-component-cuff-by-other-success-message = You have been cuffed by {$otherName}!
|
||||||
|
handcuff-component-cuff-self-success-message = You cuff yourself.
|
||||||
handcuff-component-cuff-interrupt-message = You were interrupted while cuffing {$targetName}!
|
handcuff-component-cuff-interrupt-message = You were interrupted while cuffing {$targetName}!
|
||||||
handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while they are cuffing you!
|
handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while they are cuffing you!
|
||||||
|
handcuff-component-cuff-interrupt-self-message = You were interrupted while cuffing yourself.
|
||||||
|
|||||||
Reference in New Issue
Block a user