@@ -712,20 +712,23 @@ public sealed class ChatUIController : UIController
|
|||||||
|
|
||||||
var msg = chatBox.ChatInput.Input.Text.TrimEnd();
|
var msg = chatBox.ChatInput.Input.Text.TrimEnd();
|
||||||
// Don't send on OOC/LOOC obviously!
|
// Don't send on OOC/LOOC obviously!
|
||||||
if (SplitInputContents(msg).chatChannel
|
|
||||||
is not (
|
// we need to handle selected channel
|
||||||
ChatSelectChannel.Local or
|
// and prefix-channel separately..
|
||||||
ChatSelectChannel.Radio or
|
var allowedChannels = ChatSelectChannel.Local | ChatSelectChannel.Whisper;
|
||||||
ChatSelectChannel.Whisper
|
if ((chatBox.SelectedChannel & allowedChannels) == ChatSelectChannel.None)
|
||||||
)
|
return;
|
||||||
)
|
|
||||||
|
// none can be returned from this if theres no prefix,
|
||||||
|
// so we allow it in that case (assuming the previous check will have exited already if its an invalid channel)
|
||||||
|
var prefixChannel = SplitInputContents(msg).chatChannel;
|
||||||
|
if (prefixChannel != ChatSelectChannel.None && (prefixChannel & allowedChannels) == ChatSelectChannel.None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_player.LocalSession?.AttachedEntity is not { } ent
|
if (_player.LocalSession?.AttachedEntity is not { } ent
|
||||||
|| !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
|
|| !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(msg))
|
if (string.IsNullOrWhiteSpace(msg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public sealed partial class DamageForceSayComponent : Component
|
|||||||
/// a force say occurs.
|
/// a force say occurs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public FixedPoint2 DamageThreshold = FixedPoint2.New(10);
|
public FixedPoint2 DamageThreshold = FixedPoint2.New(5);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of damage group types that are considered when checking <see cref="DamageThreshold"/>.
|
/// A list of damage group types that are considered when checking <see cref="DamageThreshold"/>.
|
||||||
|
|||||||
Reference in New Issue
Block a user