Port fancy speech bubbles (#29349)
This commit is contained in:
@@ -45,7 +45,7 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
|
||||
private void OnPlayerDetached(EntityUid uid, TypingIndicatorComponent component, PlayerDetachedEvent args)
|
||||
{
|
||||
// player left entity body - hide typing indicator
|
||||
SetTypingIndicatorEnabled(uid, false);
|
||||
SetTypingIndicatorState(uid, TypingIndicatorState.None);
|
||||
}
|
||||
|
||||
private void OnGotEquipped(Entity<TypingIndicatorClothingComponent> entity, ref ClothingGotEquippedEvent args)
|
||||
@@ -76,18 +76,18 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
|
||||
if (!_actionBlocker.CanEmote(uid.Value) && !_actionBlocker.CanSpeak(uid.Value))
|
||||
{
|
||||
// nah, make sure that typing indicator is disabled
|
||||
SetTypingIndicatorEnabled(uid.Value, false);
|
||||
SetTypingIndicatorState(uid.Value, TypingIndicatorState.None);
|
||||
return;
|
||||
}
|
||||
|
||||
SetTypingIndicatorEnabled(uid.Value, ev.IsTyping);
|
||||
SetTypingIndicatorState(uid.Value, ev.State);
|
||||
}
|
||||
|
||||
private void SetTypingIndicatorEnabled(EntityUid uid, bool isEnabled, AppearanceComponent? appearance = null)
|
||||
private void SetTypingIndicatorState(EntityUid uid, TypingIndicatorState state, AppearanceComponent? appearance = null)
|
||||
{
|
||||
if (!Resolve(uid, ref appearance, false))
|
||||
return;
|
||||
|
||||
_appearance.SetData(uid, TypingIndicatorVisuals.IsTyping, isEnabled, appearance);
|
||||
_appearance.SetData(uid, TypingIndicatorVisuals.State, state, appearance);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user