Added gas grid optimization, various despawn optimizations, new hauling optimizations utilizing events and regions, bugfixes for old patches and for vanilla functions too, as well as smaller additions. 1.3 files removed.
This commit is contained in:
@@ -11,7 +11,25 @@ public abstract class FishClassPrepatch : FishPrepatchBase
|
||||
{
|
||||
public abstract Type Type { get; }
|
||||
|
||||
public virtual void FreePatch(TypeDefinition typeDefinition)
|
||||
public abstract void FreePatch(TypeDefinition typeDefinition);
|
||||
|
||||
protected internal override void ApplyPatch(ModuleDefinition module)
|
||||
{
|
||||
// ReSharper disable once NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
|
||||
var patchType = Type
|
||||
?? ThrowHelper.ThrowInvalidOperationException<Type>(
|
||||
$"Patch {GetType().FullName} has no target type.");
|
||||
|
||||
if (patchType.IsGenericType)
|
||||
patchType = patchType.GetGenericTypeDefinition();
|
||||
|
||||
DebugLog.Message($"Applying prepatch {GetType().FullName} on type {
|
||||
patchType.FullName}");
|
||||
|
||||
var targetType = module.GetType(patchType.Namespace, patchType.Name) ?? ThrowForFailureToFindType(patchType);
|
||||
|
||||
// PrepatchManager.AddSecurityAttributes(targetType.SecurityDeclarations, module);
|
||||
|
||||
FreePatch(targetType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user