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:
parent
53a91351b7
commit
f643f6cc8a
330 changed files with 24242 additions and 2830 deletions
|
|
@ -20,7 +20,7 @@ public class MiningToolData : BehaviorData
|
|||
[InspectableField, JsonProperty("range"), Key(4)]
|
||||
public PerformanceStat Range = new PerformanceStat();
|
||||
|
||||
public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item)
|
||||
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
|
||||
{
|
||||
return new MiningTool(context, this, entity, item);
|
||||
}
|
||||
|
|
@ -34,13 +34,13 @@ public class MiningTool : IBehavior
|
|||
private MiningToolData _data;
|
||||
|
||||
private Entity Entity { get; }
|
||||
private Gear Item { get; }
|
||||
private GameContext Context { get; }
|
||||
private EquippedItem Item { get; }
|
||||
private ItemManager Context { get; }
|
||||
|
||||
public BehaviorData Data => _data;
|
||||
public float Range { get; private set; }
|
||||
|
||||
public MiningTool(GameContext context, MiningToolData data, Entity entity, Gear item)
|
||||
public MiningTool(ItemManager context, MiningToolData data, Entity entity, EquippedItem item)
|
||||
{
|
||||
_data = data;
|
||||
Entity = entity;
|
||||
|
|
@ -50,7 +50,7 @@ public class MiningTool : IBehavior
|
|||
|
||||
public bool Update(float delta)
|
||||
{
|
||||
Range = Context.Evaluate(_data.Range, Item, Entity);
|
||||
Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity);
|
||||
var asteroidTransform = Entity.Zone.GetAsteroidTransform(AsteroidBelt, Asteroid);
|
||||
if (AsteroidBelt != Guid.Empty &&
|
||||
Entity.Zone.AsteroidExists(AsteroidBelt, Asteroid) &&
|
||||
|
|
@ -60,9 +60,9 @@ public class MiningTool : IBehavior
|
|||
Entity,
|
||||
AsteroidBelt,
|
||||
Asteroid,
|
||||
Context.Evaluate(_data.DamagePerSecond, Item, Entity) * delta,
|
||||
Context.Evaluate(_data.Efficiency, Item, Entity),
|
||||
Context.Evaluate(_data.Penetration, Item, Entity));
|
||||
Context.Evaluate(_data.DamagePerSecond, Item.EquippableItem, Entity) * delta,
|
||||
Context.Evaluate(_data.Efficiency, Item.EquippableItem, Entity),
|
||||
Context.Evaluate(_data.Penetration, Item.EquippableItem, Entity));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue