Examine verbs + tooltip buttons (#6489)
This commit is contained in:
@@ -12,9 +12,12 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
public readonly EntityUid EntityUid;
|
||||
|
||||
public RequestExamineInfoMessage(EntityUid entityUid)
|
||||
public readonly bool GetVerbs;
|
||||
|
||||
public RequestExamineInfoMessage(EntityUid entityUid, bool getVerbs=false)
|
||||
{
|
||||
EntityUid = entityUid;
|
||||
GetVerbs = getVerbs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +27,18 @@ namespace Content.Shared.Examine
|
||||
public readonly EntityUid EntityUid;
|
||||
public readonly FormattedMessage Message;
|
||||
|
||||
public ExamineInfoResponseMessage(EntityUid entityUid, FormattedMessage message)
|
||||
public readonly bool GetVerbs;
|
||||
public readonly bool CenterAtCursor;
|
||||
public readonly bool OpenAtOldTooltip;
|
||||
|
||||
public ExamineInfoResponseMessage(EntityUid entityUid, FormattedMessage message,
|
||||
bool getVerbs=false, bool centerAtCursor=true, bool openAtOldTooltip=true)
|
||||
{
|
||||
EntityUid = entityUid;
|
||||
Message = message;
|
||||
GetVerbs = getVerbs;
|
||||
CenterAtCursor = centerAtCursor;
|
||||
OpenAtOldTooltip = openAtOldTooltip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,12 @@ namespace Content.Shared.Examine
|
||||
public const float ExamineRange = 16f;
|
||||
protected const float ExamineDetailsRange = 3f;
|
||||
|
||||
private bool IsInDetailsRange(EntityUid examiner, EntityUid entity)
|
||||
/// <summary>
|
||||
/// Creates a new examine tooltip with arbitrary info.
|
||||
/// </summary>
|
||||
public abstract void SendExamineTooltip(EntityUid player, EntityUid target, FormattedMessage message, bool getVerbs, bool centerAtCursor);
|
||||
|
||||
public bool IsInDetailsRange(EntityUid examiner, EntityUid entity)
|
||||
{
|
||||
// check if the mob is in ciritcal or dead
|
||||
if (EntityManager.TryGetComponent(examiner, out MobStateComponent mobState) && mobState.IsIncapacitated())
|
||||
|
||||
Reference in New Issue
Block a user