New Inventory System + Overhaul

Removed universal GameContext references
Refactored GameContext: It's now only responsible for item management. As such it's now called ItemManager
GlobalData is gone, relevant settings are distributed amongst specialized settings classes
Entities are no longer database entries, references to them are now direct - Zone is reponsible for storing them in ZonePacks
Controller subtypes are now generic classes, class argument is task type
Inventory is now a 2D grid instead of a list
Entity temperature is now a 2D grid instead of a number
Item sizes are now arbitrary shapes instead of a number
Hardpoints are now arbitrary shapes instead
Equipped items have their own temperatures
Map view now displays sunlight colors
Integrated Allegorithmic Substance Plugin
Imported Djinni ship and assigned Substance materials
Removed Node Editor framework (might come back later but needs work to integrate with behavior system)
This commit is contained in:
Reinier Vens 2020-12-10 23:20:38 +00:00
commit f643f6cc8a
330 changed files with 24242 additions and 2830 deletions

View file

@ -9,7 +9,7 @@ public class CooldownData : BehaviorData
[InspectableField, JsonProperty("cooldown"), Key(1), RuntimeInspectable]
public PerformanceStat Cooldown = new PerformanceStat();
public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item)
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
{
return new Cooldown(context, this, entity, item);
}
@ -18,16 +18,15 @@ public class CooldownData : BehaviorData
public class Cooldown : IBehavior, IAlwaysUpdatedBehavior
{
private CooldownData _data;
public BehaviorData Data => _data;
private Entity Entity { get; }
private Gear Item { get; }
private GameContext Context { get; }
public BehaviorData Data => _data;
private EquippedItem Item { get; }
private ItemManager Context { get; }
private float _cooldown; // Normalized
public Cooldown(GameContext context, CooldownData data, Entity entity, Gear item)
public Cooldown(ItemManager context, CooldownData data, Entity entity, EquippedItem item)
{
_data = data;
Entity = entity;
@ -49,6 +48,6 @@ public class Cooldown : IBehavior, IAlwaysUpdatedBehavior
public void AlwaysUpdate(float delta)
{
_cooldown -= delta / Context.Evaluate(_data.Cooldown, Item, Entity);
_cooldown -= delta / Context.Evaluate(_data.Cooldown, Item.EquippableItem, Entity);
}
}