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
|
|
@ -8,95 +8,95 @@ using static Unity.Mathematics.math;
|
|||
using static Unity.Mathematics.noise;
|
||||
using static NoiseFbm;
|
||||
|
||||
[Serializable]
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
[Serializable, RethinkTable("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class GlobalData : DatabaseEntry
|
||||
{
|
||||
[InspectableField] [JsonProperty("targetPersistenceDuration")] [Key(1)]
|
||||
[InspectableField, JsonProperty("targetPersistenceDuration"), Key(1)]
|
||||
public float TargetPersistenceDuration = 3;
|
||||
|
||||
[InspectableField] [JsonProperty("heatRadiationPower")] [Key(2)]
|
||||
|
||||
[InspectableField, JsonProperty("heatRadiationPower"), Key(2)]
|
||||
public float HeatRadiationPower = 1;
|
||||
|
||||
[InspectableField] [JsonProperty("heatRadiationMultiplier")] [Key(3)]
|
||||
|
||||
[InspectableField, JsonProperty("heatRadiationMultiplier"), Key(3)]
|
||||
public float HeatRadiationMultiplier = 1;
|
||||
|
||||
[InspectableField] [JsonProperty("galaxyArms")] [Key(13)]
|
||||
|
||||
[InspectableField, JsonProperty("galaxyArms"), Key(4)]
|
||||
public int Arms = 4;
|
||||
|
||||
[InspectableField] [JsonProperty("galaxyTwist")] [Key(14)]
|
||||
|
||||
[InspectableField, JsonProperty("galaxyTwist"), Key(5)]
|
||||
public float Twist = 10;
|
||||
|
||||
[InspectableField] [JsonProperty("galaxyTwistPower")] [Key(15)]
|
||||
|
||||
[InspectableField, JsonProperty("galaxyTwistPower"), Key(6)]
|
||||
public float TwistPower = 2;
|
||||
|
||||
[InspectableField] [JsonProperty("radiusPower")] [Key(4)]
|
||||
[InspectableField, JsonProperty("radiusPower"), Key(7)]
|
||||
public float RadiusPower = 1.75f;
|
||||
|
||||
[InspectableField] [JsonProperty("massFloor")] [Key(5)]
|
||||
[InspectableField, JsonProperty("massFloor"), Key(8)]
|
||||
public float MassFloor = 1;
|
||||
|
||||
[InspectableField] [JsonProperty("sunMass")] [Key(6)]
|
||||
[InspectableField, JsonProperty("sunMass"), Key(9)]
|
||||
public float SunMass = 10000;
|
||||
|
||||
[InspectableField] [JsonProperty("gasGiantMass")] [Key(7)]
|
||||
[InspectableField, JsonProperty("gasGiantMass"), Key(10)]
|
||||
public float GasGiantMass = 2000;
|
||||
|
||||
[InspectableField] [JsonProperty("dockingDistance")] [Key(8)]
|
||||
|
||||
[InspectableField, JsonProperty("dockingDistance"), Key(11)]
|
||||
public float DockingDistance = 10;
|
||||
|
||||
[InspectableField] [JsonProperty("satelliteCreationMassFloor")] [Key(9)]
|
||||
|
||||
[InspectableField, JsonProperty("satelliteCreationMassFloor"), Key(12)]
|
||||
public float SatelliteCreationMassFloor = 100;
|
||||
|
||||
[InspectableField] [JsonProperty("satelliteCreationProbability")] [Key(10)]
|
||||
|
||||
[InspectableField, JsonProperty("satelliteCreationProbability"), Key(13)]
|
||||
public float SatelliteCreationProbability = .25f;
|
||||
|
||||
[InspectableField] [JsonProperty("binaryCreationProbability")] [Key(11)]
|
||||
|
||||
[InspectableField, JsonProperty("binaryCreationProbability"), Key(14)]
|
||||
public float BinaryCreationProbability = .25f;
|
||||
|
||||
[InspectableField] [JsonProperty("rosetteProbability")] [Key(12)]
|
||||
|
||||
[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(17)]
|
||||
// [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(18)]
|
||||
|
||||
[InspectableField, JsonProperty("zoneRadiusMax"), Key(17)]
|
||||
public float MaximumZoneRadius = 2000;
|
||||
|
||||
[InspectableField] [JsonProperty("zoneMassMin")] [Key(19)]
|
||||
|
||||
[InspectableField, JsonProperty("zoneMassMin"), Key(18)]
|
||||
public float MinimumZoneMass = 10000;
|
||||
|
||||
[InspectableField] [JsonProperty("zoneMassMax")] [Key(20)]
|
||||
|
||||
[InspectableField, JsonProperty("zoneMassMax"), Key(19)]
|
||||
public float MaximumZoneMass = 100000;
|
||||
|
||||
[InspectableField] [JsonProperty("orbitPeriodExponent")] [Key(21)]
|
||||
|
||||
[InspectableField, JsonProperty("orbitPeriodExponent"), Key(20)]
|
||||
public float OrbitPeriodExponent = 1.5f;
|
||||
|
||||
[InspectableField] [JsonProperty("orbitPeriodMultiplier")] [Key(22)]
|
||||
|
||||
[InspectableField, JsonProperty("orbitPeriodMultiplier"), Key(21)]
|
||||
public float OrbitPeriodMultiplier = 1f;
|
||||
|
||||
[InspectableField] [JsonProperty("gravityRadiusExponent")] [Key(23)]
|
||||
|
||||
[InspectableField, JsonProperty("gravityRadiusExponent"), Key(22)]
|
||||
public float GravityRadiusExponent = 1.5f;
|
||||
|
||||
[InspectableField] [JsonProperty("gravityRadiusMultiplier")] [Key(24)]
|
||||
|
||||
[InspectableField, JsonProperty("gravityRadiusMultiplier"), Key(23)]
|
||||
public float GravityRadiusMultiplier = 1f;
|
||||
|
||||
[InspectableField] [JsonProperty("beltProbability")] [Key(25)]
|
||||
|
||||
[InspectableField, JsonProperty("beltProbability"), Key(24)]
|
||||
public float BeltProbability = .05f;
|
||||
|
||||
[InspectableField] [JsonProperty("beltMassCeiling")] [Key(26)]
|
||||
|
||||
[InspectableField, JsonProperty("beltMassCeiling"), Key(25)]
|
||||
public float BeltMassCeiling = 500f;
|
||||
|
||||
[InspectableField] [JsonProperty("beltMassRatio")] [Key(27)]
|
||||
|
||||
[InspectableField, JsonProperty("beltMassRatio"), Key(26)]
|
||||
public float BeltMassRatio = 100f;
|
||||
|
||||
[InspectableField] [JsonProperty("beltMassExponent")] [Key(28)]
|
||||
|
||||
[InspectableField, JsonProperty("beltMassExponent"), Key(27)]
|
||||
public float BeltMassExponent = 100f;
|
||||
|
||||
[InspectableField, JsonProperty("planetMass"), Key(28)]
|
||||
public float PlanetMass = 100f;
|
||||
|
||||
public float PlanetRadius(float mass)
|
||||
{
|
||||
|
|
@ -104,52 +104,50 @@ public class GlobalData : DatabaseEntry
|
|||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[RethinkTable("Galaxy")]
|
||||
[MessagePackObject]
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class GalaxyMapLayerData : DatabaseEntry
|
||||
[Inspectable, Serializable, RethinkTable("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class GalaxyMapLayerData : DatabaseEntry, INamedEntry
|
||||
{
|
||||
[InspectableField] [JsonProperty("coreBoost")] [Key(1)]
|
||||
[InspectableField, JsonProperty("coreBoost"), Key(1)]
|
||||
public float CoreBoost = 1.05f;
|
||||
|
||||
[InspectableField] [JsonProperty("coreBoostOffset")] [Key(2)]
|
||||
|
||||
[InspectableField, JsonProperty("coreBoostOffset"), Key(2)]
|
||||
public float CoreBoostOffset = .1f;
|
||||
|
||||
[InspectableField] [JsonProperty("coreBoostPower")] [Key(3)]
|
||||
|
||||
[InspectableField, JsonProperty("coreBoostPower"), Key(3)]
|
||||
public float CoreBoostPower = 2.25f;
|
||||
|
||||
[InspectableField] [JsonProperty("spokeScale")] [Key(4)]
|
||||
|
||||
[InspectableField, JsonProperty("spokeScale"), Key(4)]
|
||||
public float SpokeScale = 1;
|
||||
|
||||
[InspectableField] [JsonProperty("spokeOffset")] [Key(5)]
|
||||
|
||||
[InspectableField, JsonProperty("spokeOffset"), Key(5)]
|
||||
public float SpokeOffset = 0;
|
||||
|
||||
[InspectableField] [JsonProperty("edgeReduction")] [Key(6)]
|
||||
|
||||
[InspectableField, JsonProperty("edgeReduction"), Key(6)]
|
||||
public float EdgeReduction = 3;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseOffset")] [Key(7)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseOffset"), Key(7)]
|
||||
public float NoiseOffset = 0;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseAmplitude")] [Key(8)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseAmplitude"), Key(8)]
|
||||
public float NoiseAmplitude = 1.5f;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseGain")] [Key(9)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseGain"), Key(9)]
|
||||
public float NoiseGain = .7f;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseLacunarity")] [Key(10)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseLacunarity"), Key(10)]
|
||||
public float NoiseLacunarity = 2;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseOctaves")] [Key(11)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseOctaves"), Key(11)]
|
||||
public int NoiseOctaves = 7;
|
||||
|
||||
[InspectableField] [JsonProperty("noiseFrequency")] [Key(12)]
|
||||
|
||||
[InspectableField, JsonProperty("noiseFrequency"), Key(12)]
|
||||
public float NoiseFrequency = 1;
|
||||
|
||||
[InspectableField] [JsonProperty("noisePosition")] [Key(13)]
|
||||
|
||||
[InspectableField, JsonProperty("noisePosition"), Key(13)]
|
||||
public float NoisePosition = 1337;
|
||||
|
||||
[IgnoreMember] public string Name;
|
||||
[InspectableField, JsonProperty("name"), Key(14)]
|
||||
public string Name;
|
||||
|
||||
public float Evaluate(float2 uv, GlobalData data)
|
||||
{
|
||||
|
|
@ -165,6 +163,12 @@ public class GalaxyMapLayerData : DatabaseEntry
|
|||
|
||||
return gal;
|
||||
}
|
||||
|
||||
[IgnoreMember] public string EntryName
|
||||
{
|
||||
get => Name;
|
||||
set => Name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static class NoiseFbm
|
||||
|
|
|
|||
Loading…
Reference in a new issue