public static void Prefix(object __instance, ref bool __state) { if (IgnoreHelper.IsIgnored()) { return; } TransportTool tool = ReflectionHelper.GetAttr <TransportTool>(__instance, "$this"); int counter = ReflectionHelper.GetAttr <int>(__instance, "$PC"); int mode = ReflectionHelper.GetAttr <int>(tool, "m_mode"); int expectedMode = ReflectionHelper.GetEnumValue(typeof(TransportTool).GetNestedType("Mode", ReflectionHelper.AllAccessFlags), "NewLine"); ToolBase.ToolErrors m_errors = ReflectionHelper.GetAttr <ToolBase.ToolErrors>(tool, "m_errors"); ushort m_lastEditLine = ReflectionHelper.GetAttr <ushort>(tool, "m_lastEditLine"); int m_hoverStopIndex = ReflectionHelper.GetAttr <int>(tool, "m_hoverStopIndex"); int m_building = ReflectionHelper.GetAttr <int>(tool, "m_building"); if (counter != 0 || m_errors != ToolBase.ToolErrors.None || mode != expectedMode || m_lastEditLine == 0 || m_hoverStopIndex == -1 || (m_building != 0 && m_hoverStopIndex == 0)) { __state = false; return; } __state = true; ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore("RemoveStop"); }
public static void Prefix(out CallState __state, object __instance) { __state = new CallState(); if (IgnoreHelper.IsIgnored()) { __state.run = false; return; } BuildingTool tool = ReflectionHelper.GetAttr <BuildingTool>(__instance, "$this"); int counter = ReflectionHelper.GetAttr <int>(__instance, "$PC"); ToolBase.ToolErrors ___m_placementErrors = ReflectionHelper.GetAttr <ToolBase.ToolErrors>(tool, "m_placementErrors"); if (counter != 0 || ___m_placementErrors != ToolBase.ToolErrors.None) { __state.run = false; return; } __state.run = true; __state.relocate = tool.m_relocate; // Save relocate state as it will be cleared at the end of the method IgnoreHelper.StartIgnore(); ArrayHandler.StartCollecting(); }
public static void Prefix(object __instance, ref bool __state) { if (IgnoreHelper.IsIgnored()) { return; } TransportTool tool = ReflectionHelper.GetAttr <TransportTool>(__instance, "$this"); int counter = ReflectionHelper.GetAttr <int>(__instance, "$PC"); int mode = ReflectionHelper.GetAttr <int>(tool, "m_mode"); int expectedMode = ReflectionHelper.GetEnumValue( typeof(TransportTool).GetNestedType("Mode", ReflectionHelper.AllAccessFlags), "MoveStops"); if (counter != 0 || mode != expectedMode) { __state = false; return; } __state = true; ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore("CancelMoveStop"); }
public static void Prefix() { if (IgnoreHelper.IsIgnored()) { return; } ArrayHandler.StartCollecting(); }
public static void Prefix() { if (IgnoreHelper.IsIgnored()) { return; } ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore("StartEditingBuildingLine"); }
public static void Prefix(out bool __state) { if (IgnoreHelper.IsIgnored()) { __state = false; return; } __state = true; ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore(); }
public static void Prefix(ushort building, ref Building.Flags changeMask, out bool __state) { if (IgnoreHelper.IsIgnored()) { __state = false; return; } __state = true; ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore(); }
public static void Prefix(ushort ___m_tempLine, ushort ___m_lastEditLine, int ___m_lastMoveIndex, int ___m_lastAddIndex, Vector3 ___m_lastAddPos, out DataStore __state) { __state = new DataStore(); if (IgnoreHelper.IsIgnored() || !TransportHandler.TrackSimulationStep) { return; } __state.tempLine = ___m_tempLine; __state.editLine = ___m_lastEditLine; __state.move = ___m_lastMoveIndex; __state.add = ___m_lastAddIndex; __state.addP = ___m_lastAddPos; ArrayHandler.StartCollecting(); IgnoreHelper.StartIgnore("EnsureTempLine"); }
public static void Prefix(out CallState __state, bool test, bool visualize, NetTool.ControlPoint startPoint, NetTool.ControlPoint middlePoint, NetTool.ControlPoint endPoint) { __state = new CallState(); if (IgnoreHelper.IsIgnored()) { __state.valid = false; return; } if (test || visualize) { __state.valid = false; return; } __state.valid = true; __state.SetControlPoints(startPoint, middlePoint, endPoint); IgnoreHelper.StartIgnore(); ArrayHandler.StartCollecting(); }