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:
Reinier Vens 2020-12-10 23:20:38 +00:00
commit f643f6cc8a
330 changed files with 24242 additions and 2830 deletions

View file

@ -8,162 +8,6 @@ using static Unity.Mathematics.math;
using static Unity.Mathematics.noise;
using static NoiseFbm;
[Inspectable, Serializable, RethinkTable("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class GlobalData : DatabaseEntry
{
[InspectableField, JsonProperty("galaxyName"), Key(1)]
public string GalaxyName;
[InspectableDatabaseLink(typeof(ZoneData)), JsonProperty("arrivalZone"), Key(2)]
public Guid ArrivalZone;
[InspectableField, JsonProperty("galaxyArms"), Key(4)]
public int Arms = 4;
[InspectableField, JsonProperty("galaxyTwist"), Key(5)]
public float Twist = 10;
[InspectableField, JsonProperty("galaxyTwistPower"), Key(6)]
public float TwistPower = 2;
[InspectableField, JsonProperty("radiusPower"), Key(7)]
public float RadiusPower = 1.75f;
[InspectableField, JsonProperty("massFloor"), Key(8)]
public float MassFloor = 1;
[InspectableField, JsonProperty("sunMass"), Key(9)]
public float SunMass = 10000;
[InspectableField, JsonProperty("gasGiantMass"), Key(10)]
public float GasGiantMass = 2000;
[InspectableField, JsonProperty("planetMass"), Key(11)]
public float PlanetMass = 100f;
[InspectableField, JsonProperty("satelliteCreationMassFloor"), Key(12)]
public float SatelliteCreationMassFloor = 100;
[InspectableField, JsonProperty("satelliteCreationProbability"), Key(13)]
public float SatelliteCreationProbability = .25f;
[InspectableField, JsonProperty("binaryCreationProbability"), Key(14)]
public float BinaryCreationProbability = .25f;
[InspectableField, JsonProperty("rosetteProbability"), Key(15)]
public float RosetteProbability = .25f;
// [InspectableField] [JsonProperty("mapLayers")] [Key(16)]
// public Dictionary<string, Guid> MapLayers = new Dictionary<string, Guid>();
[InspectableField, JsonProperty("zoneRadiusMin"), Key(16)]
public float MinimumZoneRadius = 500;
[InspectableField, JsonProperty("zoneRadiusMax"), Key(17)]
public float MaximumZoneRadius = 2000;
[InspectableField, JsonProperty("zoneRadiusExp"), Key(18)]
public float ZoneRadiusExponent = -.75f;
[InspectableField, JsonProperty("zoneMassMin"), Key(19)]
public float MinimumZoneMass = 10000;
[InspectableField, JsonProperty("zoneMassMax"), Key(20)]
public float MaximumZoneMass = 100000;
[InspectableField, JsonProperty("zoneMassExp"), Key(21)]
public float ZoneMassExponent = -.75f;
[InspectableField, JsonProperty("orbitPeriodExponent"), Key(22)]
public float OrbitPeriodExponent = 1.5f;
[InspectableField, JsonProperty("orbitPeriodMultiplier"), Key(23)]
public float OrbitPeriodMultiplier = 1f;
[InspectableField, JsonProperty("beltProbability"), Key(26)]
public float BeltProbability = .05f;
[InspectableField, JsonProperty("beltMassCeiling"), Key(27)]
public float BeltMassCeiling = 500f;
[InspectableField, JsonProperty("beltMassRatio"), Key(28)]
public float BeltMassRatio = 100f;
[InspectableField, JsonProperty("beltMassExponent"), Key(29)]
public float BeltMassExponent = 100f;
[InspectableField, JsonProperty("asteroidSizeMin"), Key(30)]
public float AsteroidSizeMin = 2f;
[InspectableField, JsonProperty("asteroidSizeMax"), Key(31)]
public float AsteroidSizeMax = 10f;
[InspectableField, JsonProperty("asteroidSizeExponent"), Key(32)]
public float AsteroidSizeExponent = 2f;
[InspectableField, JsonProperty("asteroidRotationSpeed"), Key(33)]
public float AsteroidRotationSpeed = 2f;
[InspectableField, JsonProperty("dockingDistance"), Key(34)]
public float DockingDistance = 25;
[InspectableField, JsonProperty("warpDistance"), Key(35)]
public float WarpDistance = 25;
[InspectableField, JsonProperty("targetPersistenceDuration"), Key(37)]
public float TargetPersistenceDuration = 3;
[InspectableField, JsonProperty("heatRadiationPower"), Key(38)]
public float HeatRadiationPower = 1;
[InspectableField, JsonProperty("heatRadiationMultiplier"), Key(39)]
public float HeatRadiationMultiplier = 1;
[InspectableField, JsonProperty("resourceDensityMinimum"), Key(40)]
public float ResourceDensityMinimum = .1f;
[InspectableField, JsonProperty("resourceDensityMaximum"), Key(41)]
public float ResourceDensityMaximum = 1.5f;
[InspectableField, JsonProperty("startingGearQualityMin"), Key(42)]
public float StartingGearQualityMin = .1f;
[InspectableField, JsonProperty("startingGearQualityMax"), Key(43)]
public float StartingGearQualityMax = .5f;
[InspectableField, JsonProperty("asteroidHitpointsMin"), Key(44)]
public float AsteroidHitpointsMin = 10f;
[InspectableField, JsonProperty("asteroidHitpointsMax"), Key(45)]
public float AsteroidHitpointsMax = 200f;
[InspectableField, JsonProperty("asteroidHitpointsPower"), Key(46)]
public float AsteroidHitpointsPower = 2f;
[InspectableField, JsonProperty("asteroidRespawnMin"), Key(47)]
public float AsteroidRespawnMin = 10f;
[InspectableField, JsonProperty("asteroidRespawnMax"), Key(48)]
public float AsteroidRespawnMax = 100f;
[InspectableField, JsonProperty("miningDifficulty"), Key(49)]
public float MiningDifficulty = 500f;
[InspectableField, JsonProperty("messageDuration"), Key(50)]
public float MessageDuration = 4f;
[InspectableField, JsonProperty("significantDigits"), Key(51)]
public int SignificantDigits = 3;
[InspectableField, JsonProperty("productionPersonalityLerp"), Key(52)]
public float ProductionPersonalityLerp = .05f;
public float PlanetRadius(float mass)
{
return pow(mass, 1 / RadiusPower);
}
}
[Inspectable, Serializable, RethinkTable("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class GalaxyMapLayerData : DatabaseEntry, INamedEntry
{