Example #1
0
 public static void Load()
 {
     Log.Debug("LifeCycle.Load() called");
     CheckMedianCommons.Init();
     InstallHarmony();
     NetInfoUtil.LoadDCTextures();
     NetInfoUtil.FixMaxTurnAngles();
 }
 //static bool Prefix(ushort nodeID){}
 public static IEnumerable<CodeInstruction> Transpiler(MethodBase original, IEnumerable<CodeInstruction> instructions) {
     try {
         var codes = TranspilerUtils.ToCodeList(instructions);
         CheckMedianCommons.ApplyCheckMedian(codes, original, occurance: 1);
         return codes;
     } catch (Exception e) {
         e.Log();
         throw e;
     }
 }
Example #3
0
        //static bool Prefix(ushort nodeID){}
        public static IEnumerable<CodeInstruction> Transpiler(ILGenerator il, IEnumerable<CodeInstruction> instructions) {
            try {
                var codes = TranspilerUtils.ToCodeList(instructions);
                CheckMedianCommons.ApplyCheckMedian(codes, Target, occurance:1);

                Log("successfully patched NetNode.RenderInstance");
                return codes;
            }catch(Exception e) {
                Log(e + "\n" + Environment.StackTrace);
                throw e;
            }
        }