Swap Unity.Mathematics usings for CultMath
Every Unity.Mathematics using, alias and qualified name under Assets\Scripts and tools now names CultMath. The nine `using static ...noise;` lines are gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the float3 colour pair stays because the bridge has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
1bad87fc35
commit
6140a06a0a
130 changed files with 281 additions and 293 deletions
|
|
@ -9,12 +9,12 @@ using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
using int2 = Unity.Mathematics.int2;
|
using int2 = CultMath.int2;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
public class DatabaseInspector : EditorWindow
|
public class DatabaseInspector : EditorWindow
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class StatReferenceInspector : BaseInspector<StatReference>
|
public class StatReferenceInspector : BaseInspector<StatReference>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class AnimationCurveFloat4Inspector : BaseInspector<float4[]>
|
public class AnimationCurveFloat4Inspector : BaseInspector<float4[]>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
|
|
||||||
public class EnumInspector<T> : BaseInspector<List<T>, InspectableEnumValuesAttribute>
|
public class EnumInspector<T> : BaseInspector<List<T>, InspectableEnumValuesAttribute>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEditor.EditorGUILayout;
|
using static UnityEditor.EditorGUILayout;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public static class UnityExtensions
|
public static class UnityExtensions
|
||||||
{
|
{
|
||||||
|
|
@ -47,7 +47,4 @@ public static class UnityExtensions
|
||||||
|
|
||||||
public static Color ToColor(this float3 v) => new Color(v.x,v.y,v.z);
|
public static Color ToColor(this float3 v) => new Color(v.x,v.y,v.z);
|
||||||
public static float3 ToFloat3(this Color c) => float3(c.r,c.g,c.b);
|
public static float3 ToFloat3(this Color c) => float3(c.r,c.g,c.b);
|
||||||
|
|
||||||
public static Color ToColor(this float4 v) => new Color(v.x,v.y,v.z, v.w);
|
|
||||||
public static float4 ToFloat4(this Color c) => float4(c.r, c.g, c.b, c.a);
|
|
||||||
}
|
}
|
||||||
|
|
@ -4,10 +4,10 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
public class NameTools : EditorWindow
|
public class NameTools : EditorWindow
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,13 @@ using UnityEngine.InputSystem;
|
||||||
using UnityEngine.Rendering.PostProcessing;
|
using UnityEngine.Rendering.PostProcessing;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using float3 = Unity.Mathematics.float3;
|
using float3 = CultMath.float3;
|
||||||
using Path = System.IO.Path;
|
using Path = System.IO.Path;
|
||||||
using quaternion = Unity.Mathematics.quaternion;
|
using quaternion = CultMath.quaternion;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class ActionGameManager : MonoBehaviour
|
public class ActionGameManager : MonoBehaviour
|
||||||
|
|
@ -1167,7 +1167,7 @@ public class ActionGameManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
var look = Input.Player.Look.ReadValue<Vector2>();
|
var look = Input.Player.Look.ReadValue<Vector2>();
|
||||||
_entityYawPitch = float2(_entityYawPitch.x + look.x * Sensitivity.x, clamp(_entityYawPitch.y + look.y * Sensitivity.y, -.45f * PI, .45f * PI));
|
_entityYawPitch = float2(_entityYawPitch.x + look.x * Sensitivity.x, clamp(_entityYawPitch.y + look.y * Sensitivity.y, -.45f * PI, .45f * PI));
|
||||||
_viewDirection = mul(float3(0, 0, 1), Unity.Mathematics.float3x3.Euler(float3(_entityYawPitch.yx, 0), RotationOrder.YXZ));
|
_viewDirection = mul(float3(0, 0, 1), CultMath.float3x3.Euler(float3(_entityYawPitch.yx, 0), RotationOrder.YXZ));
|
||||||
CurrentEntity.LookDirection = _viewDirection;
|
CurrentEntity.LookDirection = _viewDirection;
|
||||||
HeatstrokePost.weight = saturate(unlerp(0, Settings.GameplaySettings.SevereHeatstrokeRiskThreshold, CurrentEntity.Heatstroke));
|
HeatstrokePost.weight = saturate(unlerp(0, Settings.GameplaySettings.SevereHeatstrokeRiskThreshold, CurrentEntity.Heatstroke));
|
||||||
var severeHeatstrokeLerp = saturate(unlerp(Settings.GameplaySettings.SevereHeatstrokeRiskThreshold, 1, CurrentEntity.Heatstroke));
|
var severeHeatstrokeLerp = saturate(unlerp(Settings.GameplaySettings.SevereHeatstrokeRiskThreshold, 1, CurrentEntity.Heatstroke));
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ArticulationPoint : MonoBehaviour
|
public class ArticulationPoint : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class EntityInstance : MonoBehaviour
|
public class EntityInstance : MonoBehaviour
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class FieldDriver : MonoBehaviour
|
public class FieldDriver : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class GridObject : MonoBehaviour
|
public class GridObject : MonoBehaviour
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
public class HullCollider : MonoBehaviour
|
public class HullCollider : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ItemPickup : MonoBehaviour
|
public class ItemPickup : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class ShieldManager : MonoBehaviour
|
public class ShieldManager : MonoBehaviour
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ShieldTest : MonoBehaviour
|
public class ShieldTest : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ShipInstance : EntityInstance
|
public class ShipInstance : EntityInstance
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ConstantLaser : MonoBehaviour
|
public class ConstantLaser : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class ConstantLightning : MonoBehaviour
|
public class ConstantLightning : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,11 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
using static Noise1D;
|
using static Noise1D;
|
||||||
using float3 = Unity.Mathematics.float3;
|
using float3 = CultMath.float3;
|
||||||
|
|
||||||
public class GuidedProjectile : MonoBehaviour
|
public class GuidedProjectile : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class GuidedProjectileManager : InstantWeaponEffectManager
|
public class GuidedProjectileManager : InstantWeaponEffectManager
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class HitscanEffect : MonoBehaviour
|
public class HitscanEffect : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class Laser : MonoBehaviour
|
public class Laser : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class Lightning : MonoBehaviour
|
public class Lightning : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class MineManager : InstantWeaponEffectManager
|
public class MineManager : InstantWeaponEffectManager
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class ProjectileManager : InstantWeaponEffectManager
|
public class ProjectileManager : InstantWeaponEffectManager
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public static class AetheriaMath
|
public static class AetheriaMath
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
public class Agent
|
public class Agent
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using float3 = Unity.Mathematics.float3;
|
using float3 = CultMath.float3;
|
||||||
using float2x2 = Unity.Mathematics.float2x2;
|
using float2x2 = CultMath.float2x2;
|
||||||
|
|
||||||
public class CombatState : BaseState
|
public class CombatState : BaseState
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
public abstract class MoveToState : BaseState
|
public abstract class MoveToState : BaseState
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
||||||
public class AetherDriveData : BehaviorData
|
public class AetherDriveData : BehaviorData
|
||||||
|
|
@ -114,7 +114,7 @@ public class AetherDrive : Behavior
|
||||||
Entity.Velocity += ThrustDirection;
|
Entity.Velocity += ThrustDirection;
|
||||||
|
|
||||||
Entity.Direction = mul(Entity.Direction,
|
Entity.Direction = mul(Entity.Direction,
|
||||||
Unity.Mathematics.float2x2.Rotate(force.z * _axis.z * ItemManager.GameplaySettings.AetherTorqueMultiplier / Entity.Mass));
|
CultMath.float2x2.Rotate(force.z * _axis.z * ItemManager.GameplaySettings.AetherTorqueMultiplier / Entity.Mass));
|
||||||
|
|
||||||
if(float.IsNaN(Entity.Velocity.x))
|
if(float.IsNaN(Entity.Velocity.x))
|
||||||
ItemManager.Log("FUCK FUCK FUCK FUCK");
|
ItemManager.Log("FUCK FUCK FUCK FUCK");
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class AutoWeaponData : InstantWeaponData
|
public class AutoWeaponData : InstantWeaponData
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,8 @@ using System.Linq;
|
||||||
using JsonKnownTypes;
|
using JsonKnownTypes;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
|
||||||
|
|
||||||
public abstract class Behavior
|
public abstract class Behavior
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class CapacitorData : BehaviorData
|
public class CapacitorData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class ChargedWeaponData : InstantWeaponData
|
public class ChargedWeaponData : InstantWeaponData
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class CockpitData : BehaviorData
|
public class CockpitData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System;
|
using System;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class ConstantWeaponData : WeaponData
|
public class ConstantWeaponData : WeaponData
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10), RuntimeInspectable]
|
||||||
public class CooldownData : BehaviorData
|
public class CooldownData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class HeatStorageData : BehaviorData
|
public class HeatStorageData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class InstantWeaponData : WeaponData
|
public class InstantWeaponData : WeaponData
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class LauncherData : LockWeaponData
|
public class LauncherData : LockWeaponData
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class LockWeaponData : InstantWeaponData
|
public class LockWeaponData : InstantWeaponData
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)]
|
||||||
public class MiningToolData : BehaviorData
|
public class MiningToolData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class RadiatorData : BehaviorData
|
public class RadiatorData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class ReactorData : BehaviorData
|
public class ReactorData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class ReflectorData : BehaviorData
|
public class ReflectorData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class ResourceScannerData : BehaviorData
|
public class ResourceScannerData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class SensorData : BehaviorData
|
public class SensorData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class ShieldData : BehaviorData
|
public class ShieldData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
|
||||||
public class ThrusterData : BehaviorData
|
public class ThrusterData : BehaviorData
|
||||||
|
|
@ -78,7 +78,7 @@ public class Thruster : Behavior, IAnalogBehavior
|
||||||
Thrust = Evaluate(_data.Thrust);
|
Thrust = Evaluate(_data.Thrust);
|
||||||
Entity.Velocity -= Direction.xz * _input * Thrust / Entity.Mass * dt;
|
Entity.Velocity -= Direction.xz * _input * Thrust / Entity.Mass * dt;
|
||||||
Entity.Direction = mul(Entity.Direction,
|
Entity.Direction = mul(Entity.Direction,
|
||||||
Unity.Mathematics.float2x2.Rotate(_input * Torque * Thrust * ItemManager.GameplaySettings.TorqueMultiplier / Entity.Mass * dt));
|
CultMath.float2x2.Rotate(_input * Torque * Thrust * ItemManager.GameplaySettings.TorqueMultiplier / Entity.Mass * dt));
|
||||||
AddHeat(_input * Evaluate(_data.Heat) * dt);
|
AddHeat(_input * Evaluate(_data.Heat) * dt);
|
||||||
var vis = _input * Evaluate(_data.Visibility);
|
var vis = _input * Evaluate(_data.Visibility);
|
||||||
if (!Entity.VisibilitySources.ContainsKey(this) || vis > Entity.VisibilitySources[this])
|
if (!Entity.VisibilitySources.ContainsKey(this) || vis > Entity.VisibilitySources[this])
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float3 = Unity.Mathematics.float3;
|
using float3 = CultMath.float3;
|
||||||
|
|
||||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class TurretControllerData : BehaviorData
|
public class TurretControllerData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class VelocityConversionData : BehaviorData
|
public class VelocityConversionData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
||||||
public class VelocityLimitData : BehaviorData
|
public class VelocityLimitData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable,
|
[Inspectable,
|
||||||
Union(0, typeof(InstantWeaponData)),
|
Union(0, typeof(InstantWeaponData)),
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(1000), RuntimeInspectable]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(1000), RuntimeInspectable]
|
||||||
public class WearData : BehaviorData
|
public class WearData : BehaviorData
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class BezierCurve
|
public class BezierCurve
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
// Thanks to Ian Taylor at https://www.chilliant.com/rgb2hsv.html
|
// Thanks to Ian Taylor at https://www.chilliant.com/rgb2hsv.html
|
||||||
public static class ColorMath
|
public static class ColorMath
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
[DatabaseCategory("Galaxy"), Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[DatabaseCategory("Galaxy"), Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class Faction : DatabaseEntry, INamedEntry
|
public class Faction : DatabaseEntry, INamedEntry
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ using MessagePack;
|
||||||
using MessagePack.Formatters;
|
using MessagePack.Formatters;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
// TODO: USE THIS EVERYWHERE
|
// TODO: USE THIS EVERYWHERE
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public interface INamedEntry
|
public interface INamedEntry
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class MathJsonConverter : JsonConverter
|
public class MathJsonConverter : JsonConverter
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class Float2Formatter : MessagePack.Formatters.IMessagePackFormatter<float2>
|
public class Float2Formatter : MessagePack.Formatters.IMessagePackFormatter<float2>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using MessagePack.Formatters;
|
using MessagePack.Formatters;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
|
|
||||||
public class MathResolver : IFormatterResolver
|
public class MathResolver : IFormatterResolver
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public static class RegisterResolver
|
||||||
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
|
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
|
||||||
MessagePackSerializer.DefaultOptions = options;
|
MessagePackSerializer.DefaultOptions = options;
|
||||||
|
|
||||||
// Add Unity.Mathematics serialization support to Newtonsoft JSON
|
// Add CultMath serialization support to Newtonsoft JSON
|
||||||
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
|
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
Converters = new List<JsonConverter>
|
Converters = new List<JsonConverter>
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using int2 = Unity.Mathematics.int2;
|
using int2 = CultMath.int2;
|
||||||
|
|
||||||
public abstract class Entity
|
public abstract class Entity
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
public static class EntitySerializer
|
public static class EntitySerializer
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
using float2 = CultMath.float2;
|
||||||
using float2 = Unity.Mathematics.float2;
|
|
||||||
|
|
||||||
[Serializable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[Serializable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class ZoneEnvironment
|
public class ZoneEnvironment
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Serializable, MessagePackObject, JsonObject]
|
[Serializable, MessagePackObject, JsonObject]
|
||||||
public class ExponentialCurve
|
public class ExponentialCurve
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ using System.Numerics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
using Unity.Tiny;
|
using Unity.Tiny;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
public static class Extensions
|
public static class Extensions
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ using Ink.Runtime;
|
||||||
using MIConvexHull;
|
using MIConvexHull;
|
||||||
using JM.LinqFaster;
|
using JM.LinqFaster;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
public class Galaxy
|
public class Galaxy
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
|
||||||
using static NoiseFbm;
|
using static NoiseFbm;
|
||||||
|
|
||||||
[Inspectable, Serializable, DatabaseCategory("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[Inspectable, Serializable, DatabaseCategory("Galaxy"), MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ using System.Linq;
|
||||||
using JsonKnownTypes;
|
using JsonKnownTypes;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using int2 = Unity.Mathematics.int2;
|
using int2 = CultMath.int2;
|
||||||
|
|
||||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||||
public class Shape
|
public class Shape
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ using JsonKnownTypes;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using MessagePack.Formatters;
|
using MessagePack.Formatters;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[Union(0, typeof(SimpleCommodity)),
|
[Union(0, typeof(SimpleCommodity)),
|
||||||
Union(1, typeof(CompoundCommodity)),
|
Union(1, typeof(CompoundCommodity)),
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
using JM.LinqFaster;
|
using JM.LinqFaster;
|
||||||
using UniRx;
|
using UniRx;
|
||||||
using float4 = Unity.Mathematics.float4;
|
using float4 = CultMath.float4;
|
||||||
|
|
||||||
public class ItemManager
|
public class ItemManager
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
public class LoadoutGenerator
|
public class LoadoutGenerator
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
//Generates random names based on the statistical weight of letter sequences
|
//Generates random names based on the statistical weight of letter sequences
|
||||||
//in a collection of sample names
|
//in a collection of sample names
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ KDQuery can query different KDTrees.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ SOFTWARE.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ SOFTWARE.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ SOFTWARE.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ SOFTWARE.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ SOFTWARE.
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
namespace DataStructures.ViliWonka.KDTree {
|
namespace DataStructures.ViliWonka.KDTree {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MIConvexHull;
|
using MIConvexHull;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A vertex is a simple class that stores the postion of a point, node or vertex.
|
/// A vertex is a simple class that stores the postion of a point, node or vertex.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MIConvexHull;
|
using MIConvexHull;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A vertex is a simple class that stores the postion of a point, node or vertex.
|
/// A vertex is a simple class that stores the postion of a point, node or vertex.
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
namespace MIConvexHull
|
namespace MIConvexHull
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using MIConvexHull;
|
using MIConvexHull;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class Vertex2 : IVertex
|
public class Vertex2 : IVertex
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
|
|
||||||
public class Vertex2<T> : Vertex2
|
public class Vertex2<T> : Vertex2
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using MIConvexHull;
|
using MIConvexHull;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public class Vertex3 : IVertex
|
public class Vertex3 : IVertex
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using Ink;
|
||||||
using Ink.Parsed;
|
using Ink.Parsed;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Path = System.IO.Path;
|
using Path = System.IO.Path;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
using Story = Ink.Runtime.Story;
|
using Story = Ink.Runtime.Story;
|
||||||
|
|
||||||
public class StoryProcessor : IZoneResolver, IFactionResolver
|
public class StoryProcessor : IZoneResolver, IFactionResolver
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
public abstract class ZoneSelector
|
public abstract class ZoneSelector
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
public static class Noise1D
|
public static class Noise1D
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
public class OrbitalEntity : Entity
|
public class OrbitalEntity : Entity
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
|
|
||||||
namespace Unity.Tiny
|
namespace Unity.Tiny
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using DataStructures.ViliWonka.Heap;
|
using DataStructures.ViliWonka.Heap;
|
||||||
using DataStructures.ViliWonka.KDTree;
|
using DataStructures.ViliWonka.KDTree;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using float2 = Unity.Mathematics.float2;
|
using float2 = CultMath.float2;
|
||||||
using Random = Unity.Mathematics.Random;
|
using Random = CultMath.Random;
|
||||||
|
|
||||||
public static class WeightedSampleElimination
|
public static class WeightedSampleElimination
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
|
|
||||||
[MessagePackObject]
|
[MessagePackObject]
|
||||||
public class SavedGame
|
public class SavedGame
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,8 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Unity.Mathematics;
|
using CultMath;
|
||||||
using static Unity.Mathematics.math;
|
using static CultMath.math;
|
||||||
using static Unity.Mathematics.noise;
|
|
||||||
|
|
||||||
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
[Serializable, MessagePackObject(keyAsPropertyName:true), JsonObject]
|
||||||
public class PlanetSettings
|
public class PlanetSettings
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue