From 54e6d0dd87f0ae24f5b0f01864c23cdf69daac0b Mon Sep 17 00:00:00 2001 From: JavidPack Date: Tue, 11 Jul 2017 18:38:05 -0600 Subject: [PATCH] Fix swing->click duplication glitch --- .travis.yml | 41 ---------------------------------------- Menus/RecipeQuerySlot.cs | 25 +++++++++++++++--------- build.txt | 2 +- 3 files changed, 17 insertions(+), 51 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7355d03..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: generic - -notifications: - email: false - -branches: - only: - - master - -# Environment variables -env: - global: - - MODNAME: CheatSheet - - Deploy: no - -script: - - pwd - - ls - - git tag - - cd $TRAVIS_BUILD_DIR - - ls - - export version=`curl http://javid.ddns.net/tModLoader/tools/latestmodversionsimple.php?modname=$MODNAME` - - echo "Mod Browser version is $version" - - export gitVersion=`git describe --abbrev=0 --tags` - - echo "git version is $gitVersion" - - if [[ "$version" = "$gitVersion" ]]; then echo "Version does match, no need to push release"; Deploy=no; else echo "Version does not match, need to push release"; git config --global user.email "builds@travis-ci.com"; git config --global user.name "Travis CI"; git tag $version -a -m "TravisCI Autogenerated Release"; Deploy=yes; fi - - echo $Deploy - -before_deploy: - - wget -O $MODNAME.tmod http://javid.ddns.net/tModLoader/download.php?Down=mods/$MODNAME.tmod - - ls - -# should only deploy if the script doesn't fail, meaning we have a new .tmod file to publish -deploy: - provider: releases - api_key: $GH_REPO_TOKEN - file: "$MODNAME.tmod" - skip_cleanup: true - on: - tags: false - condition: "$Deploy = yes" \ No newline at end of file diff --git a/Menus/RecipeQuerySlot.cs b/Menus/RecipeQuerySlot.cs index 9a44d83..318a985 100644 --- a/Menus/RecipeQuerySlot.cs +++ b/Menus/RecipeQuerySlot.cs @@ -41,22 +41,29 @@ private void Slot_OnHover(object sender, EventArgs e) private void Slot2_onLeftClick(object sender, EventArgs e) { + Player player = Main.LocalPlayer; if (real) { - Item item = Main.mouseItem.Clone(); - Main.mouseItem = this.item.Clone(); - if (Main.mouseItem.type > 0) + if (player.itemAnimation == 0 && player.itemTime == 0) { - Main.playerInventory = true; + Item item = Main.mouseItem.Clone(); + Main.mouseItem = this.item.Clone(); + if (Main.mouseItem.type > 0) + { + Main.playerInventory = true; + } + this.item = item.Clone(); } - this.item = item.Clone(); } else { - //Item item = Main.mouseItem.Clone(); - this.item = Main.mouseItem.Clone(); - Main.mouseItem.SetDefaults(0); - real = true; + if (player.itemAnimation == 0 && player.itemTime == 0) + { + //Item item = Main.mouseItem.Clone(); + this.item = Main.mouseItem.Clone(); + Main.mouseItem.SetDefaults(0); + real = true; + } } //call update. diff --git a/build.txt b/build.txt index 9c68c6d..66cb946 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = jopojelly, jofairden -version = 0.2.7.1 +version = 0.2.7.2 displayName = Cheat Sheet homepage = http://forums.terraria.org/index.php?threads/cheat-sheet.41407/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*