Add actual ASCII-Art for distros, add first three distros and being able to choose a starting-distro. Update UI to fix multiple small bugs.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace KernelPanic.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Resolves persisted distro ids to playable distro definitions.
|
||||
/// </summary>
|
||||
public sealed class DistroDatabase : ScriptableObject
|
||||
{
|
||||
[SerializeField] private List<DistroDefinition> allDistros = new();
|
||||
|
||||
public IReadOnlyList<DistroDefinition> AllDistros => allDistros;
|
||||
|
||||
public DistroDefinition FindById(string id)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < allDistros.Count; i++)
|
||||
{
|
||||
DistroDefinition distro = allDistros[i];
|
||||
if (distro != null && string.Equals(distro.Id, id, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return distro;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5af93d291e7d4d51b312bdf1e47dc6ef
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -14,6 +14,8 @@ namespace KernelPanic.Data
|
||||
[SerializeField] private Language primaryLanguage;
|
||||
[SerializeField] private Language secondaryLanguage;
|
||||
[SerializeField] private string passiveName;
|
||||
[SerializeField, TextArea] private string description;
|
||||
[SerializeField] private TextAsset asciiArt;
|
||||
[SerializeField] private Color accentColor = new(0.36f, 1f, 0.57f);
|
||||
[SerializeField] private int baseUptime;
|
||||
[SerializeField] private int baseRam;
|
||||
@@ -25,6 +27,8 @@ namespace KernelPanic.Data
|
||||
public Language PrimaryLanguage => primaryLanguage;
|
||||
public Language SecondaryLanguage => secondaryLanguage;
|
||||
public string PassiveName => passiveName;
|
||||
public string Description => description;
|
||||
public TextAsset AsciiArt => asciiArt;
|
||||
public Color AccentColor => accentColor;
|
||||
public int BaseUptime => baseUptime;
|
||||
public int BaseRam => baseRam;
|
||||
|
||||
Reference in New Issue
Block a user