Various Improvements & Fixes

Map icons now have a constant size independent of zoom level
Galaxy Map now displays zone properties when clicking on a zone
Zone generator now uses half of nebula density, means smaller and more varied zones
Stations will refuse docking to entities with insufficient clearance
This commit is contained in:
Reinier Vens 2021-05-12 00:15:11 +01:00
commit 122e929214
25 changed files with 801 additions and 621 deletions

View file

@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using MessagePack;
using TMPro;
using UniRx;
using UnityEngine;
using Unity.Mathematics;
using static Unity.Mathematics.math;
@ -41,6 +42,8 @@ public class SectorMap : MonoBehaviour
public Color PlayerLocationLabelColor;
public float PlayerLocationIconSize = 1.25f;
public Subject<SectorZone> ZoneClicked = new Subject<SectorZone>();
private SectorZone _currentPlayerLocation;
private HashSet<SectorZone> _revealedZones = new HashSet<SectorZone>();
private HashSet<(SectorZone, SectorZone)> _revealedLinks = new HashSet<(SectorZone, SectorZone)>();
@ -98,6 +101,7 @@ public class SectorMap : MonoBehaviour
if (!_revealedZones.Contains(zone))
{
var zoneInstance = ZonePrototype.Instantiate<SectorZoneUI>();
zoneInstance.Clickable.OnClick += (clickableCollider, data) => ZoneClicked.OnNext(zone);
if(zone == _currentPlayerLocation)
MarkPlayerLocation(zoneInstance);
_zoneInstances[zone] = zoneInstance;