Adds /me command. (#414)
* Adds /me command. * Update Content.Server/Chat/ChatManager.cs Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
committed by
Pieter-Jan Briers
parent
12cf5559c2
commit
7d307832a0
@@ -14,6 +14,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
bool CanThrow();
|
||||
|
||||
bool CanSpeak();
|
||||
|
||||
bool CanEmote();
|
||||
}
|
||||
|
||||
public class ActionBlockerSystem : EntitySystem
|
||||
@@ -67,5 +69,17 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
}
|
||||
return canspeak;
|
||||
}
|
||||
|
||||
public static bool CanEmote(IEntity entity)
|
||||
{
|
||||
bool canemote = true;
|
||||
|
||||
foreach (var actionblockercomponents in entity.GetAllComponents<IActionBlocker>())
|
||||
{
|
||||
canemote &= actionblockercomponents.CanEmote();
|
||||
}
|
||||
|
||||
return canemote;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user