2020-12-22 03:13:43 +00:00
|
|
|
|
/* 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;
|
2020-11-27 22:47:33 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
[CreateAssetMenu(fileName = "Sector Display Properties", menuName = "Aetheria/Sector Display Properties")]
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public class GameSettings : ScriptableObject
|
2020-11-27 22:47:33 +00:00
|
|
|
|
{
|
2021-04-30 11:19:25 +01:00
|
|
|
|
public string DefaultOverworldSoundbank = "Overworld_Generic";
|
|
|
|
|
|
public string DefaultCombatSoundbank = "Combat_Generic";
|
|
|
|
|
|
public string DefaultBossSoundbank = "Boss_Metal";
|
|
|
|
|
|
public string AmbienceSoundBank = "Ambience";
|
2021-04-13 01:50:42 +01:00
|
|
|
|
public string StartingHullName = "Longinus";
|
2021-04-15 04:25:22 +01:00
|
|
|
|
public float PickupLifetime = 30;
|
|
|
|
|
|
public float LootDropProbability = .25f;
|
|
|
|
|
|
public float LootDropVelocity = 25;
|
2021-03-06 02:42:19 +00:00
|
|
|
|
public float HeatstrokePhasingFloor = 0;
|
|
|
|
|
|
public float HeatstrokePhasingFrequency = 5;
|
2021-03-05 14:31:18 +00:00
|
|
|
|
public float WormholeDistanceRatio;
|
2020-11-27 22:47:33 +00:00
|
|
|
|
public float DefaultViewDistance;
|
2020-12-02 16:42:09 +00:00
|
|
|
|
public float MinimapZoneGravityRange;
|
|
|
|
|
|
public float[] MinimapZoomLevels;
|
|
|
|
|
|
public int DefaultMinimapZoom;
|
2020-12-18 13:48:03 +00:00
|
|
|
|
public ExponentialCurve IconSize;
|
2020-12-01 20:38:28 +00:00
|
|
|
|
public int AsteroidMeshCount = 5;
|
2020-12-03 17:32:34 +00:00
|
|
|
|
public float MinimapAsteroidSize = 3;
|
2021-05-12 00:15:11 +01:00
|
|
|
|
public float MinimapIconSize = 1f / 32;
|
2020-12-05 23:43:02 +00:00
|
|
|
|
public float PlanetRotationSpeed = 1;
|
2021-04-22 02:53:06 +01:00
|
|
|
|
public NameGeneratorSettings NameGeneratorSettings;
|
|
|
|
|
|
public TutorialGenerationSettings TutorialGenerationSettings;
|
|
|
|
|
|
public SectorBackgroundSettings TutorialBackgroundSettings;
|
|
|
|
|
|
public SectorBackgroundSettings SectorBackgroundSettings;
|
2021-03-20 04:20:17 +00:00
|
|
|
|
public SectorGenerationSettings SectorGenerationSettings;
|
2020-12-05 23:43:02 +00:00
|
|
|
|
public BodySettingsCollection[] BodySettingsCollections;
|
2020-12-01 00:16:11 +00:00
|
|
|
|
public PlanetSettings PlanetSettings;
|
|
|
|
|
|
public ZoneGenerationSettings ZoneSettings;
|
2020-12-10 23:20:38 +00:00
|
|
|
|
public GameplaySettings GameplaySettings;
|
2021-01-08 12:44:10 +00:00
|
|
|
|
public Color HullHitColor;
|
|
|
|
|
|
public Color ArmorHitColor;
|
|
|
|
|
|
public Color HardpointHitColor;
|
|
|
|
|
|
public Color GearHitColor;
|
2021-01-10 03:59:47 +00:00
|
|
|
|
public Gradient ArmorGradient;
|
|
|
|
|
|
public Gradient DurabilityGradient;
|
2021-06-18 12:32:03 +01:00
|
|
|
|
public ZoneEnvironment DefaultEnvironment;
|
2020-12-31 19:53:16 +00:00
|
|
|
|
[HideInInspector] public Sprite[] ItemIcons;
|
2021-03-20 04:20:17 +00:00
|
|
|
|
[HideInInspector] public Sprite[] WeaponTypeIcons;
|
|
|
|
|
|
[HideInInspector] public Sprite[] WeaponCaliberIcons;
|
|
|
|
|
|
[HideInInspector] public Sprite[] WeaponRangeIcons;
|
|
|
|
|
|
[HideInInspector] public Sprite[] WeaponFireTypeIcons;
|
|
|
|
|
|
[HideInInspector] public Sprite[] WeaponModifierIcons;
|
|
|
|
|
|
|
2021-04-21 01:49:07 +01:00
|
|
|
|
public Sprite GetIcon(HardpointType type) => ItemIcons[(int) type];
|
2021-03-20 04:20:17 +00:00
|
|
|
|
public Sprite GetIcon(WeaponType type) => WeaponTypeIcons[(int) type];
|
|
|
|
|
|
public Sprite GetIcon(WeaponRange range) => WeaponRangeIcons[(int) range];
|
|
|
|
|
|
public Sprite GetIcon(WeaponCaliber caliber) => WeaponCaliberIcons[(int) caliber];
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<Sprite> GetIcons(WeaponFireType type)
|
|
|
|
|
|
{
|
|
|
|
|
|
var count = Enum.GetValues(typeof(WeaponFireType)).Length;
|
|
|
|
|
|
var t = (int) type;
|
|
|
|
|
|
for (int i = 0; i < count - 1; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (1 << i == (1 << i & t))
|
|
|
|
|
|
yield return WeaponFireTypeIcons[i + 1];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<Sprite> GetIcons(WeaponModifiers type)
|
|
|
|
|
|
{
|
|
|
|
|
|
var count = Enum.GetValues(typeof(WeaponModifiers)).Length;
|
|
|
|
|
|
var t = (int) type;
|
|
|
|
|
|
for (int i = 0; i < count - 1; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (1 << i == (1 << i & t))
|
|
|
|
|
|
yield return WeaponModifierIcons[i + 1];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-11-27 22:47:33 +00:00
|
|
|
|
}
|
2020-11-29 22:50:12 +00:00
|
|
|
|
|
2020-12-05 23:43:02 +00:00
|
|
|
|
[Serializable]
|
|
|
|
|
|
public class BodySettingsCollection
|
|
|
|
|
|
{
|
|
|
|
|
|
public float MinimumMass;
|
|
|
|
|
|
public CelestialBodySettings[] BodySettings;
|
2021-03-08 02:57:38 +00:00
|
|
|
|
}
|