Docking System

Entities now have dedicated docking bays with their own cargo area for loading/unloading
Inventory panel allows display of any ship or cargo bay at the currently docked station or within the current ship if undocked
This commit is contained in:
Reinier Vens 2020-12-19 02:37:13 +00:00
commit 2d9bec0e33
24 changed files with 553 additions and 465 deletions

View file

@ -59,14 +59,14 @@ public class StatModifier : IBehavior, IInitializableBehavior, IDisposableBehavi
if (statField != null)
{
if (typeof(EquippableItemData).IsAssignableFrom(targetType))
_stats = Entity.EquippedItems
_stats = Entity.Equipment
.Select(hp => hp.EquippableItem)
.Where(gear => _data.RequireBehavior == null || Context.GetData(gear).Behaviors.Any(behavior => behavior.GetType() == _data.RequireBehavior))
.Where(gear => Context.GetData(gear).GetType() == targetType)
.Select(gear => statField.GetValue(Context.GetData(gear)) as PerformanceStat)
.ToArray();
else
_stats = Entity.EquippedItems
_stats = Entity.Equipment
.Select(hp => hp.EquippableItem)
.Where(gear => _data.RequireBehavior == null || Context.GetData(gear).Behaviors.Any(behavior => behavior.GetType() == _data.RequireBehavior))
.SelectMany(gear => Context.GetData(gear).Behaviors)