Exemplo n.º 1
0
        internal static void Load()
        {
            Instance = new FluidSerializer();

            HookEndpointManager.Add <hook_TryGetSerializer>(typeof(TagSerializer).GetMethod("TryGetSerializer", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic), (hook_TryGetSerializer)((orig_TryGetSerializer orig, Type type, out TagSerializer serializer) =>
            {
                if (type == typeof(BaseFluid) || type.IsSubclassOf(typeof(BaseFluid)))
                {
                    serializer = Instance;
                    return(true);
                }

                return(orig(type, out serializer));
            }));
        }
Exemplo n.º 2
0
 public override void Load()
 {
     FluidSerializer.Load();
 }