2026-06-13 04:30:24 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2020-12-22 03:13:43 +00:00
|
|
|
* 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/. */
|
|
|
|
|
|
2020-03-22 19:05:26 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2020-11-29 22:50:12 +00:00
|
|
|
using UniRx;
|
2020-03-24 00:02:23 +00:00
|
|
|
using Unity.Mathematics;
|
2020-03-29 04:19:24 +01:00
|
|
|
using static Unity.Mathematics.math;
|
2021-03-08 22:58:37 +00:00
|
|
|
using float2 = Unity.Mathematics.float2;
|
2020-11-29 22:50:12 +00:00
|
|
|
using float3 = Unity.Mathematics.float3;
|
2020-03-22 19:05:26 +00:00
|
|
|
|
2026-06-14 19:37:24 +01:00
|
|
|
public class ZoneConstructionBlueprint
|
2020-11-27 22:47:33 +00:00
|
|
|
{
|
2026-06-14 21:30:31 +01:00
|
|
|
public List<BodyConstructionData> Bodies = new List<BodyConstructionData>();
|
|
|
|
|
public List<OrbitConstructionData> Orbits = new List<OrbitConstructionData>();
|
2026-06-14 20:40:13 +01:00
|
|
|
public List<EntityConstructionBlueprint> Entities = new List<EntityConstructionBlueprint>();
|
2021-03-15 11:40:46 +00:00
|
|
|
public float Radius = 2000;
|
|
|
|
|
public float Mass = 10000;
|
2021-03-27 10:03:24 +00:00
|
|
|
public double Time;
|
2020-11-27 22:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public abstract class BodyConstructionData : INamedEntry
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2026-06-16 16:57:18 +01:00
|
|
|
public string BodyKey = "";
|
|
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public string Name = "";
|
2020-04-09 07:48:45 +01:00
|
|
|
|
2026-06-16 16:57:18 +01:00
|
|
|
public string OrbitKey = "";
|
|
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float Mass = 0;
|
2020-04-09 07:48:45 +01:00
|
|
|
|
2026-06-15 03:35:40 +01:00
|
|
|
public Dictionary<string, float> Resources = new Dictionary<string, float>();
|
2020-05-02 01:30:33 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float BodyRadiusMultiplier = 1;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float GravityRadiusMultiplier = 1;
|
2020-11-27 22:47:33 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float GravityDepthMultiplier = 1;
|
2020-11-29 22:50:12 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float GravityDepthExponent = 16;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2026-06-13 11:03:30 +01:00
|
|
|
public string EntryName
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2025-07-18 00:21:33 +01:00
|
|
|
get => Name;
|
|
|
|
|
set => Name = value;
|
2020-03-22 19:05:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public class PlanetConstructionData : BodyConstructionData
|
2020-11-27 22:47:33 +00:00
|
|
|
{
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-11-29 22:50:12 +00:00
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public class AsteroidBeltConstructionData : BodyConstructionData
|
2020-11-29 22:50:12 +00:00
|
|
|
{
|
2020-11-27 22:47:33 +00:00
|
|
|
public Asteroid[] Asteroids;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public class GasGiantConstructionData : BodyConstructionData
|
2020-11-27 22:47:33 +00:00
|
|
|
{
|
2025-07-18 00:21:33 +01:00
|
|
|
public float FirstOffsetDomainRotationSpeed = 1;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float FirstOffsetRotationSpeed = 1;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float SecondOffsetDomainRotationSpeed = 1;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float SecondOffsetRotationSpeed = 1;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float AlbedoRotationSpeed = 1;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float WaveRadiusMultiplier = 1;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float WaveDepthMultiplier = 1;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float WaveDepthExponent = 8;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float WaveSpeedMultiplier = 8;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-11-27 22:47:33 +00:00
|
|
|
public List<string> MaterialOverrides = new List<string>();
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float4[] Colors = new float4[0];
|
2020-11-27 22:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public class SunConstructionData : GasGiantConstructionData
|
2020-11-27 22:47:33 +00:00
|
|
|
{
|
2025-07-18 00:21:33 +01:00
|
|
|
public float3 LightColor = float3.zero;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float3 FogTintColor = float3.zero;
|
2021-04-12 04:20:52 +01:00
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float LightRadiusMultiplier = 1;
|
2020-11-27 22:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
2020-05-28 04:50:40 +01:00
|
|
|
public class Asteroid
|
|
|
|
|
{
|
|
|
|
|
public float Distance;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-05-28 04:50:40 +01:00
|
|
|
public float Phase;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-05-28 04:50:40 +01:00
|
|
|
public float Size;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2020-05-28 04:50:40 +01:00
|
|
|
public float RotationSpeed;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-14 21:30:31 +01:00
|
|
|
public class OrbitConstructionData
|
2020-03-22 19:05:26 +00:00
|
|
|
{
|
2026-06-16 16:57:18 +01:00
|
|
|
public string OrbitKey = "";
|
|
|
|
|
|
|
|
|
|
public string ParentOrbitKey = "";
|
|
|
|
|
|
2025-07-18 00:21:33 +01:00
|
|
|
public float Distance;
|
2020-04-09 07:48:45 +01:00
|
|
|
|
2020-03-22 19:05:26 +00:00
|
|
|
public float Phase;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2021-03-08 22:58:37 +00:00
|
|
|
public float2 FixedPosition = float2.zero;
|
2026-06-13 04:56:50 +01:00
|
|
|
|
2026-06-13 08:15:17 +01:00
|
|
|
}
|