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
|
|
@ -18,10 +18,10 @@ public abstract class AgentBehavior
|
|||
protected float TurningInput(float2 deltaV) => clamp(-Entity.Direction.AngleDiff(deltaV) * ControllerData.TurningSensitivity, -1, 1);
|
||||
|
||||
protected ControllerData ControllerData;
|
||||
protected GameContext Context;
|
||||
protected ItemManager Context;
|
||||
protected Entity Entity;
|
||||
|
||||
public AgentBehavior(GameContext context, Entity entity, ControllerData controllerData)
|
||||
public AgentBehavior(ItemManager context, Entity entity, ControllerData controllerData)
|
||||
{
|
||||
Context = context;
|
||||
Entity = entity;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class Aim : AgentBehavior
|
|||
private Turning _turning;
|
||||
private VelocityLimit _velocityLimit;
|
||||
|
||||
public Aim(GameContext context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
public Aim(ItemManager context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
{
|
||||
_velocityLimit = Entity.GetBehaviors<VelocityLimit>().FirstOrDefault();
|
||||
_thrust = Entity.GetBehavior<Thruster>();
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ public class HaulingTask : AgentTask
|
|||
public override TaskType Type => TaskType.Haul;
|
||||
|
||||
[JsonProperty("origin"), Key(4)]
|
||||
public Guid Origin;
|
||||
public Entity Origin;
|
||||
|
||||
[JsonProperty("target"), Key(5)]
|
||||
public Guid Target;
|
||||
public Entity Target;
|
||||
|
||||
[JsonProperty("itemType"), Key(6)]
|
||||
public Guid ItemType;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class Locomotion : AgentBehavior
|
|||
private Turning _turning;
|
||||
private VelocityLimit _velocityLimit;
|
||||
|
||||
public Locomotion(GameContext context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
public Locomotion(ItemManager context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
{
|
||||
_velocityLimit = Entity.GetBehaviors<VelocityLimit>().FirstOrDefault();
|
||||
_thrust = Entity.GetBehavior<Thruster>();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public class StationTowing : AgentTask
|
|||
[IgnoreMember] public override TaskType Type => TaskType.Tow;
|
||||
|
||||
[JsonProperty("station"), Key(4)]
|
||||
public Guid Station;
|
||||
public OrbitalEntity Station;
|
||||
|
||||
[JsonProperty("orbitParent"), Key(5)]
|
||||
public Guid OrbitParent;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ public class VelocityMatch : AgentBehavior
|
|||
private Turning _turning;
|
||||
private const float TargetThreshold = .1f;
|
||||
|
||||
private GameContext _context;
|
||||
private ItemManager _context;
|
||||
|
||||
public VelocityMatch(GameContext context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
public VelocityMatch(ItemManager context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData)
|
||||
{
|
||||
_context = context;
|
||||
_thrust = Entity.GetBehavior<Thruster>();
|
||||
|
|
|
|||
5
Assets/Scripts/ServerShared/Agents/WanderTask.cs
Normal file
5
Assets/Scripts/ServerShared/Agents/WanderTask.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
public class WanderTask : AgentTask
|
||||
{
|
||||
public override TaskType Type => TaskType.None;
|
||||
}
|
||||
3
Assets/Scripts/ServerShared/Agents/WanderTask.cs.meta
Normal file
3
Assets/Scripts/ServerShared/Agents/WanderTask.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2320c5e3a86f42eeacb133b6529bfe89
|
||||
timeCreated: 1607467429
|
||||
Loading…
Reference in a new issue