Ultimate Sector Generation X Pro Max Silver Edition
Added entrances, exits and factions to sector generation Associated each corporation with a unique name database and color scheme
This commit is contained in:
parent
0f33e541c0
commit
f10804ac11
60 changed files with 1392 additions and 135031 deletions
|
|
@ -135,7 +135,7 @@ public class DatabaseInspector : EditorWindow
|
|||
var range = inspectable as RangedFloatInspectableAttribute;
|
||||
field.SetValue(obj, Inspect(field.Name.SplitCamelCase(), (float) value, range.Min, range.Max));
|
||||
}
|
||||
else if (inspectable is TemperatureInspectableAttribute)
|
||||
else if (inspectable is InspectableTemperatureAttribute)
|
||||
field.SetValue(obj, InspectTemperature(field.Name.SplitCamelCase(), (float) value));
|
||||
else
|
||||
field.SetValue(obj, Inspect(field.Name.SplitCamelCase(), (float) value));
|
||||
|
|
@ -158,6 +158,13 @@ public class DatabaseInspector : EditorWindow
|
|||
{
|
||||
field.SetValue(obj, Inspect(field.Name.SplitCamelCase(), (int2) field.GetValue(obj)));
|
||||
}
|
||||
else if (type == typeof(float3))
|
||||
{
|
||||
if (inspectable is InspectableColorAttribute)
|
||||
{
|
||||
field.SetValue(obj, ColorField(field.Name.SplitCamelCase(), ((float3)field.GetValue(obj)).ToColor()).ToFloat3());
|
||||
}
|
||||
}
|
||||
else if (type.IsEnum)
|
||||
{
|
||||
var isflags = type.GetCustomAttributes<FlagsAttribute>().Any();
|
||||
|
|
@ -179,6 +186,8 @@ public class DatabaseInspector : EditorWindow
|
|||
field.SetValue(obj, InspectUnityObject<GameObject>(field.Name.SplitCamelCase(), (string) value));
|
||||
else if(inspectable is InspectableTextureAttribute)
|
||||
field.SetValue(obj, InspectUnityObject<Texture2D>(field.Name.SplitCamelCase(), (string) value));
|
||||
else if(inspectable is InspectableTextAssetAttribute)
|
||||
field.SetValue(obj, InspectUnityObject<TextAsset>(field.Name.SplitCamelCase(), (string) value));
|
||||
else
|
||||
field.SetValue(obj, Inspect(field.Name.SplitCamelCase(), (string) value, inspectable is InspectableTextAttribute));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using System.Buffers.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
|
@ -13,6 +16,7 @@ public class NameTools : EditorWindow
|
|||
private int minWordLength = 4;
|
||||
private TextAsset nameFile;
|
||||
private MarkovNameGenerator _nameGenerator;
|
||||
private bool _stripNumberTokens;
|
||||
|
||||
// Add menu named "My Window" to the Window menu
|
||||
[MenuItem("Window/Aetheria/Name Tools")]
|
||||
|
|
@ -30,6 +34,32 @@ public class NameTools : EditorWindow
|
|||
NameGeneratorMinLength = EditorGUILayout.IntField("Generated Minimum Word Length", NameGeneratorMinLength);
|
||||
NameGeneratorMaxLength = EditorGUILayout.IntField("Generated Maximum Word Length", NameGeneratorMaxLength);
|
||||
NameGeneratorOrder = EditorGUILayout.IntField("Generator Order", NameGeneratorOrder);
|
||||
_stripNumberTokens = GUILayout.Toggle(_stripNumberTokens, "Strip Number Tokens");
|
||||
|
||||
if (GUILayout.Button("Clean Name File"))
|
||||
{
|
||||
var lines = nameFile.text.Split('\n');
|
||||
using StreamWriter outputFile = new StreamWriter(Path.Combine(Application.dataPath, nameFile.name + ".csv"));
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (!_stripNumberTokens)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(line) && Regex.IsMatch(line, "^[\\x00-\\x7F]+$") && !char.IsDigit(line[0]))
|
||||
{
|
||||
outputFile.WriteLine(line.Trim());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var tokens = line.Split('_', '-', ' ');
|
||||
if(!(tokens.Any(t => t.Length == 2 && char.IsUpper(t[0]) && char.IsUpper(t[1]))))
|
||||
//if (Regex.IsMatch(line, "^[\\x00-\\x7F]+$") && !tokens.Any(t=>int.TryParse(t, out _)) && !tokens.Any(t=>t=="AM"||t=="FM"||t=="TV"))
|
||||
{
|
||||
outputFile.WriteLine(line.Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Process Name File") && nameFile != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue