Aetheria/Assets/Scripts/ServerShared/DatabaseEntry.cs
Reinier Vens 73651bf16a Game Loop Galaxy Integration
Added sector map in Galaxy tab of in-game menu
Added player flag to Ship (replaces AGM.PlayerEntities)
Refactored sector map to depend on AGM
Moved sector generation to main menu
Main menu now supports resuming previous playthrough
Database and player settings now statically available via AGM
AGM saves current game state in PlayerSettings on exit
Sector generation is now asynchronous
Added progress callbacks to sector gen + progress dialog in menu
Confirmation Dialog / properties panel can now display dynamic text entry
Added zone title to Zone map
Eliminated ZoneData class (properties moved to ZonePack)
Sector, Zone and Entity serialization now fully functional
Entity settings now separate from player settings
Cleaned up old unused networking message classes
Name files now integrated with database cache
Added ability to save/load additive DB cache files in database panel
Cleaned up Wwise sound setup - removed redundant items & fixed spelling errors
Deleted Wwise cache + added to .gitignore
2021-03-15 11:40:46 +00:00

62 lines
No EOL
1.9 KiB
C#

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Linq;
using JsonKnownTypes;
using MessagePack;
using Newtonsoft.Json;
// TODO: USE THIS EVERYWHERE
using Unity.Mathematics;
using static Unity.Mathematics.math;
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(SimpleCommodity)),
Union(5, typeof(CompoundCommodity)),
Union(6, typeof(EquippableItem)),
Union(7, typeof(BlueprintData)),
Union(8, typeof(GalaxyMapLayerData)),
Union(9, typeof(NameFile)),
//Union(10, typeof(ZoneData)),
Union(11, typeof(PlayerData)),
Union(12, typeof(Corporation)),
Union(13, typeof(MegaCorporation)),
Union(14, typeof(OrbitalEntity)),
Union(15, typeof(OrbitData)),
Union(16, typeof(BodyData)),
Union(17, typeof(PersonalityAttribute)),
Union(18, typeof(AgentTask)),
Union(19, typeof(LoadoutData)),
Union(20, typeof(Ship)),
Union(21, typeof(Mining)),
Union(22, typeof(StationTowing)),
Union(23, typeof(Survey)),
Union(24, typeof(HaulingTask)),
Union(25, typeof(AsteroidBeltData)),
Union(26, typeof(GasGiantData)),
Union(27, typeof(SunData)),
Union(28, typeof(PlanetData)),
Union(29, typeof(CargoBayData)),
Union(30, typeof(DockingBayData)),
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();
[IgnoreMember]
public DatabaseCache Database;
}