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
@@ -8,11 +8,11 @@ namespace Content.Server.GameObjects
|
||||
public class ItemComponent : StoreableComponent, EntitySystems.IAttackHand
|
||||
{
|
||||
public override string Name => "Item";
|
||||
|
||||
|
||||
|
||||
public void RemovedFromSlot()
|
||||
{
|
||||
foreach (var component in Owner.GetComponents<ISpriteRenderableComponent>())
|
||||
foreach (var component in Owner.GetAllComponents<ISpriteRenderableComponent>())
|
||||
{
|
||||
component.Visible = true;
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects
|
||||
|
||||
public void EquippedToSlot(ContainerSlot slot)
|
||||
{
|
||||
foreach (var component in Owner.GetComponents<ISpriteRenderableComponent>())
|
||||
foreach (var component in Owner.GetAllComponents<ISpriteRenderableComponent>())
|
||||
{
|
||||
component.Visible = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user