Blueprints & Resources
Added the ability to associate simple commodities with resource maps Added resource placement to zone generator Added crafting blueprints and stat addressing system Refactored Thrusters and Shields into Behaviors Fixed server losing database connection Updated icons
This commit is contained in:
parent
bd824cc2e6
commit
fd92c80876
58 changed files with 1399 additions and 855 deletions
|
|
@ -27,7 +27,9 @@ public class Ship : DatabaseEntry
|
|||
[IgnoreMember] public float Temperature;
|
||||
[IgnoreMember] public float Charge;
|
||||
// [IgnoreMember] public Targetable Target;
|
||||
[IgnoreMember] public float2 Position;
|
||||
[IgnoreMember] public float2 Direction;
|
||||
[IgnoreMember] public float2 Velocity;
|
||||
[IgnoreMember] public Dictionary<object, float> VisibilitySources = new Dictionary<object, float>();
|
||||
|
||||
private HullData _hullData;
|
||||
|
|
@ -51,6 +53,20 @@ public class Ship : DatabaseEntry
|
|||
return null;
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetBehaviors<T>() where T : class, IItemBehavior
|
||||
{
|
||||
foreach (var behavior in ItemBehaviors)
|
||||
if (behavior is T b)
|
||||
yield return b;
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetBehaviorData<T>() where T : class, IItemBehaviorData
|
||||
{
|
||||
foreach (var behavior in ItemBehaviors)
|
||||
if (behavior.Data is T b)
|
||||
yield return b;
|
||||
}
|
||||
|
||||
public void AddHeat(float heat)
|
||||
{
|
||||
Temperature += heat / SpecificHeat;
|
||||
|
|
@ -192,4 +208,5 @@ public class Ship : DatabaseEntry
|
|||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue