aj47 / berigame

berigame.com
2 stars 1 forks source link

Sweep: make it so that when user clicked "Harvest" on the BerryTree, after the player walks to the tree, it should start playing the "RightHook" animation. make sure to make a new state setUserHarvesting in store.js . make sure to only play the animation when player distance is in range, similar to how the animation is played when userAttacking is true. files needed to edit: PlayerController.tsx , BerryTree.tsx and store.js #3

Open aj47 opened 1 year ago

aj47 commented 1 year ago
Checklist - [X] `frontend/src/store.js` ✅ Commit [`e119b99`](https://github.com/aj47/berigame/commit/e119b99a6d6f46742de5155276da36d4267d762a) - [X] `frontend/src/Components/3D/BerryTree.tsx` ✅ Commit [`33d12a9`](https://github.com/aj47/berigame/commit/33d12a9e7e66ba9051d478b2c3082eb1845a2363) - [X] `frontend/src/Components/3D/PlayerController.tsx` ✅ Commit [`2b29ada`](https://github.com/aj47/berigame/commit/2b29adaeeab7eec0b33d2667e32497d82eb6ee4a)
sweep-ai[bot] commented 1 year ago

Here's the PR! https://github.com/aj47/berigame/pull/5.

⚡ Sweep Free Trial: I'm creating this ticket using GPT-4. You have 3 GPT-4 tickets left for the month and 1 for the day. For more GPT-4 tickets, visit [our payment portal.](https://buy.stripe.com/6oE5npbGVbhC97afZ4)

Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/aj47/berigame/blob/ecf8d8d665641376731c5e141a736188b1483a31/frontend/src/Components/3D/PlayerController.tsx#L1-L249 https://github.com/aj47/berigame/blob/ecf8d8d665641376731c5e141a736188b1483a31/frontend/src/Components/3D/BerryTree.tsx#L1-L42 https://github.com/aj47/berigame/blob/ecf8d8d665641376731c5e141a736188b1483a31/frontend/src/store.js#L1-L86 https://github.com/aj47/berigame/blob/ecf8d8d665641376731c5e141a736188b1483a31/landing-page/downloaded-assets/doc/assets/vendor/jstree/src/jstree.dnd.js#L2-L107 https://github.com/aj47/berigame/blob/ecf8d8d665641376731c5e141a736188b1483a31/landing-page/downloaded-assets/doc/assets/vendor/jstree/src/jstree.search.js#L2-L162

Step 2: ⌨️ Coding

trunk init 1/3 ✓
⡿ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
⣷ Downloading Trunk 1.16.0...
⣯ Downloading Trunk 1.16.0...
⣟ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
✔ Downloading Trunk 1.16.0... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 11 linters were enabled (.trunk/trunk.yaml)
  checkov 2.4.9 (17 json, 4 yaml files)
  dotenv-linter 3.3.0 (1 dotenv file)
  git-diff-check (257 files)
  markdownlint 0.37.0 (3 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.0 (6 lockfile files)
  oxipng 8.0.0 (36 png files)
  prettier 3.0.3 (7 css, 2 html, 53 javascript, 8 json, 3 markdown, 22 typescript, 4 yaml files)
  svgo 3.0.2 (18 svg files) (created svgo.config.js)
  trivy 0.45.1 (6 lockfile, 4 yaml files)
  trufflehog 3.57.0 (716 files)
  yamllint 1.32.0 (4 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt frontend/src/store.js 2/3 ✓

 ✔ Formatted frontend/src/store.js
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix frontend/src/store.js 3/3 ✓

Checked 1 file
✔ No issues

trunk init 1/3 ✓
⡿ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
⣷ Downloading Trunk 1.16.0...
⣯ Downloading Trunk 1.16.0...
⣟ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
✔ Downloading Trunk 1.16.0... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 11 linters were enabled (.trunk/trunk.yaml)
  checkov 2.4.9 (17 json, 4 yaml files)
  dotenv-linter 3.3.0 (1 dotenv file)
  git-diff-check (257 files)
  markdownlint 0.37.0 (3 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.0 (6 lockfile files)
  oxipng 8.0.0 (36 png files)
  prettier 3.0.3 (7 css, 2 html, 53 javascript, 8 json, 3 markdown, 22 typescript, 4 yaml files)
  svgo 3.0.2 (18 svg files) (created svgo.config.js)
  trivy 0.45.1 (6 lockfile, 4 yaml files)
  trufflehog 3.57.0 (716 files)
  yamllint 1.32.0 (4 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt frontend/src/Components/3D/BerryTree.tsx 2/3 ✓

 ✔ Formatted frontend/src/Components/3D/BerryTree.tsx
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix frontend/src/Components/3D/BerryTree.tsx 3/3 ✓

Checked 1 file
✔ No issues

trunk init 1/3 ✓
⡿ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
⣷ Downloading Trunk 1.16.0...
⣯ Downloading Trunk 1.16.0...
⣟ Downloading Trunk 1.16.0...
⡿ Downloading Trunk 1.16.0...
⢿ Downloading Trunk 1.16.0...
⣻ Downloading Trunk 1.16.0...
⣽ Downloading Trunk 1.16.0...
⣾ Downloading Trunk 1.16.0...
✔ Downloading Trunk 1.16.0... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done

✔ 11 linters were enabled (.trunk/trunk.yaml)
  checkov 2.4.9 (17 json, 4 yaml files)
  dotenv-linter 3.3.0 (1 dotenv file)
  git-diff-check (257 files)
  markdownlint 0.37.0 (3 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.0 (6 lockfile files)
  oxipng 8.0.0 (36 png files)
  prettier 3.0.3 (7 css, 2 html, 53 javascript, 8 json, 3 markdown, 22 typescript, 4 yaml files)
  svgo 3.0.2 (18 svg files) (created svgo.config.js)
  trivy 0.45.1 (6 lockfile, 4 yaml files)
  trufflehog 3.57.0 (716 files)
  yamllint 1.32.0 (4 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
trunk fmt frontend/src/Components/3D/PlayerController.tsx 2/3 ✓

 ✔ Formatted frontend/src/Components/3D/PlayerController.tsx
Re-checking autofixed files...

Checked 1 file
✔ No issues
trunk check --fix frontend/src/Components/3D/PlayerController.tsx 3/3 ✓

Checked 1 file
✔ No issues


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/harvest-animation_1.

.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord