Mainly more hauling optimizations, utilizing linked storage groups
This also adds an experimental, usually slower, threaded gas grid mode and implements a workaround for the whole mod and game failing to start when opening prepatcher's mod manager with unfortunate timing
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// https://stackoverflow.com/a/18363848
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace PerformanceFish.Utility;
|
||||
|
||||
public static class Is
|
||||
{
|
||||
public static bool Null<T>(T? value) where T : class => value == null;
|
||||
|
||||
public static bool NotNull<T>([NotNullWhen(true)] T? value) where T : class => value != null;
|
||||
|
||||
public static bool Null<T>(T? nullableValue) where T : struct => !nullableValue.HasValue;
|
||||
|
||||
public static bool NotNull<T>([NotNullWhen(true)] T? nullableValue) where T : struct => nullableValue.HasValue;
|
||||
|
||||
public static bool HasValue<T>([NotNullWhen(true)] T? nullableValue) where T : struct => nullableValue.HasValue;
|
||||
|
||||
public static bool HasNoValue<T>(T? nullableValue) where T : struct => !nullableValue.HasValue;
|
||||
}
|
||||
Reference in New Issue
Block a user