Skip to content

Commit

Permalink
Clear commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
nghiango1 committed Jun 25, 2021
1 parent f194ab2 commit 38268cc
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions RightClickMoveMode/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ private void GameEvents_UpdateTick(object sender, EventArgs e) {
if (config.RightClickMoveModeDefault)
if (flag) {
vector_PlayerToMouse.X=position_MouseOnScreen.X+Game1.viewport.X-Game1.player.GetBoundingBox().Center.X;
//this.Monitor.Log(String.Format("{0} {1} {2}", position_MouseOnScreen.X, Game1.viewport.X , Game1.player.GetBoundingBox().Center.X), LogLevel.Info);
vector_PlayerToMouse.Y=position_MouseOnScreen.Y+Game1.viewport.Y-Game1.player.GetBoundingBox().Center.Y;
if (Context.IsPlayerFree) {
MouseState mouseState = Mouse.GetState();
Expand Down Expand Up @@ -199,7 +198,6 @@ private void InputEvents_ButtonPressed(object sender, ButtonPressedEventArgs e)
} else if (config.WeaponsSpecticalInteractionType==2) {
if (button=="MouseRight") {
Helper.Input.Suppress(e.Button);
//isMouseOutsiteHitBox = vector_PlayerToMouse.Length().CompareTo(hitboxRadius/4) > 0;
isMouseOutsiteHitBox=true;
}
if ((button=="MouseMiddle"||button=="MouseX1")&&!Game1.player.isRidingHorse()) {
Expand Down Expand Up @@ -286,7 +284,6 @@ private int GetActionType(ref Vector2 grabTile) {

foreach (KeyValuePair<Vector2, TerrainFeature> v in Game1.player.currentLocation.terrainFeatures.Pairs) {
if (v.Value.getBoundingBox(v.Key).Intersects(new Rectangle((int)grabTile.X*64, (int)grabTile.Y*64, 64, 64))) {
//pointedTerrainFeatures = v;
if ((v.Value is Grass)||(v.Value is HoeDirt dirt&&!dirt.readyForHarvest())) { } else
return 4;
}
Expand Down Expand Up @@ -338,11 +335,8 @@ private void Input_CursorMoved(object sender, CursorMovedEventArgs e) {

if (config.RightClickMoveModeDefault)
if (flag) {
//if (Context.IsPlayerFree)
//{
position_MouseOnScreen.X=Game1.getMousePosition(Game1.uiMode).X;
position_MouseOnScreen.Y=Game1.getMousePosition(Game1.uiMode).Y;
//}
}
}

Expand Down Expand Up @@ -413,7 +407,7 @@ public static void TryToCheckGrapTile() {
}

public static void MoveVectorToCommand() {
bool flag = ModEntry.isMovingAutomaticaly;
bool flag = isMovingAutomaticaly;

if (flag) {
if (isHoldingMove) {
Expand Down Expand Up @@ -449,7 +443,7 @@ public static void MoveVectorToCommand() {
vector_AutoMove.Normalize();

if (flag2&&flag3) {
ModEntry.isMovingAutomaticaly=false;
isMovingAutomaticaly=false;
isTryToDoActionAtClickedTitle=0;
}
}
Expand Down Expand Up @@ -479,10 +473,7 @@ public static bool PrefixMethod_Farmer_HaltPatch() {
// Prefix Method return will control the base method execution
// true mean base method will exec, false mean the opposite
if (config.RightClickMoveModeDefault) {
if (!isMovingAutomaticaly||isBeingAutoCommand)
return true;
else
return false;
return !isMovingAutomaticaly||isBeingAutoCommand;
}
return true;
}
Expand Down

0 comments on commit 38268cc

Please sign in to comment.