Delete dead legacy catalog roots
This commit is contained in:
parent
d963ad0fa7
commit
b368f674f5
11 changed files with 20 additions and 188 deletions
|
|
@ -7,7 +7,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
|
||||
[LegacyCatalogGroup("Galaxy"), Inspectable]
|
||||
[Inspectable]
|
||||
public class Faction : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable]
|
||||
|
|
|
|||
|
|
@ -1,123 +0,0 @@
|
|||
/* 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;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
using static Unity.Mathematics.noise;
|
||||
using static NoiseFbm;
|
||||
|
||||
[Inspectable, Serializable, LegacyCatalogGroup("Galaxy")]
|
||||
public class GalaxyMapLayerData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable]
|
||||
public float CoreBoost = 1.05f;
|
||||
|
||||
[Inspectable]
|
||||
public float CoreBoostOffset = .1f;
|
||||
|
||||
[Inspectable]
|
||||
public float CoreBoostPower = 2.25f;
|
||||
|
||||
[Inspectable]
|
||||
public float SpokeScale = 1;
|
||||
|
||||
[Inspectable]
|
||||
public float SpokeOffset = 0;
|
||||
|
||||
[Inspectable]
|
||||
public float EdgeReduction = 3;
|
||||
|
||||
[Inspectable]
|
||||
public float NoiseOffset = 0;
|
||||
|
||||
[Inspectable]
|
||||
public float NoiseAmplitude = 1.5f;
|
||||
|
||||
[Inspectable]
|
||||
public float NoiseGain = .7f;
|
||||
|
||||
[Inspectable]
|
||||
public float NoiseLacunarity = 2;
|
||||
|
||||
[Inspectable]
|
||||
public int NoiseOctaves = 7;
|
||||
|
||||
[Inspectable]
|
||||
public float NoiseFrequency = 1;
|
||||
|
||||
[Inspectable]
|
||||
public float NoisePosition = 1337;
|
||||
|
||||
[Inspectable]
|
||||
public string Name;
|
||||
|
||||
public float Evaluate(float2 uv, GalaxyShapeSettings settings)
|
||||
{
|
||||
float2 offset = -float2(.5f, .5f)+uv;
|
||||
float circle = (.5f-length(offset))*2;
|
||||
float angle = pow(length(offset)*2,settings.TwistExponent) * settings.Twist;
|
||||
float2 t = float2(offset.x*cos(angle) - offset.y*sin(angle), offset.x*sin(angle) + offset.y*cos(angle));
|
||||
float atan = atan2(t.y,t.x);
|
||||
float spokes = (sin(atan*settings.Arms) + SpokeOffset) * SpokeScale;
|
||||
float noise = fBm(uv + float2(NoisePosition), NoiseOctaves, NoiseFrequency, NoiseOffset, NoiseAmplitude, NoiseLacunarity, NoiseGain);
|
||||
float shape = lerp(spokes - EdgeReduction * length(offset), 1, pow(circle, CoreBoostPower) * CoreBoost) + CoreBoostOffset;
|
||||
float gal = max(shape - noise * saturate(circle), 0);
|
||||
|
||||
return gal;
|
||||
}
|
||||
|
||||
public string EntryName
|
||||
{
|
||||
get => Name;
|
||||
set => Name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static class NoiseFbm
|
||||
{
|
||||
public static float3 fBm3(float2 p, int octaves, float frequency, float offset, float amplitude, float lacunarity, float gain)
|
||||
{
|
||||
return float3(
|
||||
fBm(p, octaves, frequency, offset, amplitude, lacunarity, gain),
|
||||
fBm(p+10, octaves, frequency, offset, amplitude, lacunarity, gain),
|
||||
fBm(p+20, octaves, frequency, offset, amplitude, lacunarity, gain));
|
||||
}
|
||||
|
||||
public static float fBm(float2 p, int octaves, float frequency, float offset, float amplitude, float lacunarity, float gain)
|
||||
{
|
||||
float freq = frequency, amp = .5f;
|
||||
float sum = 0;
|
||||
for(int i = 0; i < octaves; i++)
|
||||
{
|
||||
sum += snoise(p * freq) * amp;
|
||||
freq *= lacunarity;
|
||||
amp *= gain;
|
||||
}
|
||||
return (sum + offset)*amplitude;
|
||||
}
|
||||
|
||||
public static float3 fBm3(float p, int octaves, float frequency, float offset, float amplitude, float lacunarity, float gain)
|
||||
{
|
||||
return float3(
|
||||
fBm(p, octaves, frequency, offset, amplitude, lacunarity, gain),
|
||||
fBm(p+10, octaves, frequency, offset, amplitude, lacunarity, gain),
|
||||
fBm(p+20, octaves, frequency, offset, amplitude, lacunarity, gain));
|
||||
}
|
||||
|
||||
public static float fBm(float p, int octaves, float frequency, float offset, float amplitude, float lacunarity, float gain)
|
||||
{
|
||||
float freq = frequency, amp = .5f;
|
||||
float sum = 0;
|
||||
for(int i = 0; i < octaves; i++)
|
||||
{
|
||||
sum += Noise1D.noise(p * freq) * amp;
|
||||
freq *= lacunarity;
|
||||
amp *= gain;
|
||||
}
|
||||
return (sum + offset)*amplitude;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b7bd4d9c038c3c24b86780de3f29f10e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -295,17 +295,13 @@ public abstract class ItemData : RuntimeCatalogEntry, INamedEntry
|
|||
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class SimpleCommodityData : ItemData
|
||||
{
|
||||
// // Types of body where this resource can be found
|
||||
// [InspectableField, RuntimeCatalogKey(6)]
|
||||
// public BodyType ResourceBodyType;
|
||||
//
|
||||
// // Link to map(s) controlling density of resource, multiplied together when more than one
|
||||
// [InspectableRuntimeCatalogLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)]
|
||||
// public List<Guid> ResourceDensity = new List<Guid>();
|
||||
//
|
||||
// // Controls the lowest value in the resource distribution curve
|
||||
// [InspectableField, RuntimeCatalogKey(8)]
|
||||
// public ExponentialLerp Distribution;
|
||||
|
|
@ -327,7 +323,7 @@ public abstract class CraftedItemData : ItemData
|
|||
// public float IngredientQualityWeight = .5f;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class CompoundCommodityData : CraftedItemData
|
||||
{
|
||||
[InspectableRuntimeCatalogLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)]
|
||||
|
|
@ -337,7 +333,7 @@ public class CompoundCommodityData : CraftedItemData
|
|||
public CompoundCommodityCategory Category;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class ConsumableItemData : CraftedItemData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(10)]
|
||||
|
|
@ -443,7 +439,7 @@ public class AudioStat
|
|||
public PerformanceStat Stat = new PerformanceStat();
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class GearData : EquippableItemData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(23)]
|
||||
|
|
@ -452,7 +448,7 @@ public class GearData : EquippableItemData
|
|||
public override HardpointType HardpointType => Hardpoint;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class CargoBayData : EquippableItemData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(24)]
|
||||
|
|
@ -461,14 +457,14 @@ public class CargoBayData : EquippableItemData
|
|||
public override HardpointType HardpointType => HardpointType.Tool;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class DockingBayData : CargoBayData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(25)]
|
||||
public int2 MaxSize;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items")]
|
||||
|
||||
public class WeaponItemData : GearData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(24)]
|
||||
|
|
@ -487,7 +483,7 @@ public class WeaponItemData : GearData
|
|||
public WeaponModifiers WeaponModifiers;
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class HullData : EquippableItemData
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(23)]
|
||||
|
|
@ -612,7 +608,7 @@ public class PerformanceStat
|
|||
}
|
||||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
[Inspectable]
|
||||
public class PersonalityAttribute : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(1)]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ using float4 = Unity.Mathematics.float4;
|
|||
public class ItemManager
|
||||
{
|
||||
public Random Random = new Random((uint) (DateTime.Now.Ticks%uint.MaxValue));
|
||||
// public Dictionary<string, GalaxyMapLayerData> MapLayers = new Dictionary<string, GalaxyMapLayerData>();
|
||||
// public SimpleCommodityData[] Resources;
|
||||
// public Dictionary<Guid, List<IController>> CorporationControllers = new Dictionary<Guid, List<IController>>();
|
||||
// public Dictionary<Guid, ZoneDefinition> GalaxyZones;
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
/* 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;
|
||||
|
||||
[LegacyCatalogGroup("Users")]
|
||||
public class PlayerData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
public string Email;
|
||||
|
||||
public string Password;
|
||||
|
||||
public string Username;
|
||||
|
||||
public Guid Corporation;
|
||||
|
||||
public string EntryName
|
||||
{
|
||||
get => Username;
|
||||
set => Username = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6daac48880264dcc91c928f0dd9c2abb
|
||||
timeCreated: 1591829144
|
||||
|
|
@ -106,17 +106,6 @@ public class TooltipAttribute : Attribute
|
|||
public TooltipAttribute(string tooltip) => this.tooltip = tooltip;
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class LegacyCatalogGroupAttribute : Attribute
|
||||
{
|
||||
public string TableName;
|
||||
|
||||
public LegacyCatalogGroupAttribute(string tableName)
|
||||
{
|
||||
TableName = tableName;
|
||||
}
|
||||
}
|
||||
|
||||
public class NameAttribute : Attribute
|
||||
{
|
||||
public string Name;
|
||||
|
|
@ -143,4 +132,4 @@ public class InspectorHeaderAttribute : Attribute
|
|||
public readonly string header;
|
||||
|
||||
public InspectorHeaderAttribute(string header) => this.header = header;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue