Rename IEntity.GetComponents to GetAllComponents. (#68)
* Rename IEntity.GetComponents to GetAllComponents. This is to avoid confusion. A single s to distinguish it from GetComponent() is quite hard to miss. * Update submodule.
This commit is contained in:
committed by
GitHub
parent
205a4fc530
commit
20cf3a6a9b
@@ -48,16 +48,16 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
StringBuilder fullexaminetext = new StringBuilder("This is " + examined.Name);
|
||||
|
||||
//Add an entity description if one is declared
|
||||
if(!string.IsNullOrEmpty(examined.Description))
|
||||
if (!string.IsNullOrEmpty(examined.Description))
|
||||
{
|
||||
fullexaminetext.Append(Environment.NewLine + examined.Description);
|
||||
}
|
||||
|
||||
//Add component statuses from components that report one
|
||||
foreach (var examinecomponents in examined.GetComponents<IExamine>())
|
||||
foreach (var examinecomponents in examined.GetAllComponents<IExamine>())
|
||||
{
|
||||
string componentdescription = examinecomponents.Examine();
|
||||
if(!string.IsNullOrEmpty(componentdescription))
|
||||
if (!string.IsNullOrEmpty(componentdescription))
|
||||
{
|
||||
fullexaminetext.Append(Environment.NewLine + componentdescription);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user