Save/Load and Main Menu Submenus

Redid all of the property panel UI prefabs (oof)
Implemented saving and loading of the game state
Moved sector generation to sector constructor (along with loading from save file)
Entity settings now separate from player settings
Player settings (incl. saved run) now statically accessible from game manager
Added animations and submenus to the main menu
Unified main menu settings and properties panel styles for prefab reusability
This commit is contained in:
Reinier Vens 2021-03-14 03:56:49 +00:00
commit b6828a975a
63 changed files with 2007 additions and 1158 deletions

View file

@ -14,7 +14,6 @@ public abstract class Entity
{
public Zone Zone;
public MegaCorporation Faction;
public PlayerSettings PlayerSettings;
public EquippableItem Hull;
public float3 Position;
@ -79,6 +78,8 @@ public abstract class Entity
}
}
public EntitySettings Settings { get; }
public bool OverrideShutdown { get; set; }
public bool Active
@ -155,8 +156,9 @@ public abstract class Entity
VisibleHostiles.Clear();
}
public Entity(ItemManager itemManager, Zone zone, EquippableItem hull)
public Entity(ItemManager itemManager, Zone zone, EquippableItem hull, EntitySettings settings)
{
Settings = settings;
ItemManager = itemManager;
Zone = zone;
Hull = hull;
@ -997,7 +999,7 @@ public class EquippedItem
var temp = Temperature;
ThermalPerformance = Data.Performance(temp);
DurabilityPerformance = EquippableItem.Durability / Data.Durability;
var performanceThreshold = Entity.PlayerSettings?.ShutdownPerformance ?? _itemManager.GameplaySettings.DefaultShutdownPerformance;
var performanceThreshold = Entity.Settings.ShutdownPerformance;
Wear = (1 - pow(Data.Performance(temp),
(1 - pow(_itemManager.CompoundQuality(EquippableItem), _itemManager.GameplaySettings.QualityWearExponent)) *
_itemManager.GameplaySettings.ThermalWearExponent)