Base ItemComponents can apply OnUse statuseffects, grenades can be placed in detonators. Closes #113

This commit is contained in:
Joonas Rikkonen
2018-01-09 14:55:16 +02:00
parent c2e3f60641
commit 18ae9d7820
4 changed files with 26 additions and 11 deletions
@@ -516,15 +516,12 @@ namespace Barotrauma
}
}
#endif
if (useItemCount > 0)
for (int i = 0; i < useItemCount; i++)
{
for (int i=0; i<useItemCount; i++)
foreach (Item item in targets.FindAll(t => t is Item).Cast<Item>())
{
foreach (Item item in targets.FindAll(t => t is Item).Cast<Item>())
{
item.Use(deltaTime, targets.FirstOrDefault(t => t is Character) as Character);
}
item.Use(deltaTime, targets.FirstOrDefault(t => t is Character) as Character);
}
}