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:
hyperion51 2020-04-09 07:48:45 +01:00
commit fd92c80876
58 changed files with 1399 additions and 855 deletions

View file

@ -16,51 +16,42 @@ public interface INamedEntry
string EntryName { get; set; }
}
[InspectableField]
[MessagePackObject]
[Union(0, typeof(SimpleCommodityData))]
[Union(1, typeof(CompoundCommodityData))]
[Union(2, typeof(GearData))]
[Union(3, typeof(HullData))]
[Union(4, typeof(ShieldData))]
[Union(5, typeof(ThrusterData))]
[Union(6, typeof(SimpleCommodity))]
[Union(7, typeof(CompoundCommodity))]
[Union(8, typeof(Gear))]
[Union(9, typeof(GlobalData))]
[Union(10, typeof(ZoneData))]
[Union(11, typeof(Player))]
[Union(12, typeof(Corporation))]
[Union(13, typeof(Ship))]
[Union(14, typeof(Station))]
[Union(15, typeof(OrbitData))]
[Union(16, typeof(PlanetData))]
[JsonObject(MemberSerialization.OptIn)]
[JsonConverter(typeof(JsonKnownTypesConverter<DatabaseEntry>))]
[InspectableField,
MessagePackObject,
Union(0, typeof(SimpleCommodityData)),
Union(1, typeof(CompoundCommodityData)),
Union(2, typeof(GearData)),
Union(3, typeof(HullData)),
Union(6, typeof(SimpleCommodity)),
Union(7, typeof(CompoundCommodity)),
Union(8, typeof(Gear)),
Union(9, typeof(GlobalData)),
Union(10, typeof(ZoneData)),
Union(11, typeof(Player)),
Union(12, typeof(Corporation)),
Union(13, typeof(Ship)),
Union(14, typeof(Station)),
Union(15, typeof(OrbitData)),
Union(16, typeof(PlanetData)),
JsonObject(MemberSerialization.OptIn), JsonConverter(typeof(JsonKnownTypesConverter<DatabaseEntry>))]
//[Union(21, typeof(ContractData))]
//[Union(22, typeof(Station))]
public abstract class DatabaseEntry
{
[JsonProperty("id")] [Key(0)] public Guid ID = Guid.NewGuid();
[JsonProperty("id"), Key(0)] public Guid ID = Guid.NewGuid();
[IgnoreMember] public GameContext Context { get; set; }
}
[RethinkTable("Users")]
[MessagePackObject]
[JsonObject(MemberSerialization.OptIn)]
[RethinkTable("Users"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class Player : DatabaseEntry, INamedEntry
{
[JsonProperty("email")] [Key(1)]
public string Email;
[JsonProperty("password")] [Key(2)]
public string Password;
[JsonProperty("username")] [Key(3)]
public string Username;
[JsonProperty("corporation")] [Key(4)]
public Guid Corporation;
[JsonProperty("email"), Key(1)] public string Email;
[JsonProperty("password"), Key(2)] public string Password;
[JsonProperty("username"), Key(3)] public string Username;
[JsonProperty("corporation"), Key(4)] public Guid Corporation;
[IgnoreMember] public string EntryName
{
@ -69,13 +60,10 @@ public class Player : DatabaseEntry, INamedEntry
}
}
[RethinkTable("Galaxy")]
[MessagePackObject]
[JsonObject(MemberSerialization.OptIn)]
[RethinkTable("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class Corporation : DatabaseEntry, INamedEntry
{
[JsonProperty("name")] [Key(1)]
public string Name;
[JsonProperty("name"), Key(1)] public string Name;
[IgnoreMember] public string EntryName
{