maxcurrent420 / BeastBreeder

0 stars 0 forks source link

Sweep: Create NPC.js #14

Closed maxcurrent420 closed 10 months ago

maxcurrent420 commented 10 months ago

Details

  1. Create a new file in components folder, called NPC.js. Code some standard NPCs, such as a village elder, and others for the gamer to interact with. Their dialogue will come from the dialogue file.
  2. Create a dialogue file with some standard dialogues for them to engage in with the user, such as starting quests and buying items.
Checklist - [X] Create `components/NPC.js` ✓ https://github.com/maxcurrent420/BeastBreeder/commit/4da3464598b6e98ea29b0d25035119f53805fd8b [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/components/NPC.js) - [X] Running GitHub Actions for `components/NPC.js` ✓ [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/components/NPC.js) - [X] Create `utils/dialogues.js` ✓ https://github.com/maxcurrent420/BeastBreeder/commit/6bf6c8f88262e2473e209c43e6bc8658580c33fe [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/utils/dialogues.js) - [X] Running GitHub Actions for `utils/dialogues.js` ✓ [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/utils/dialogues.js) - [X] Modify `app.js` ✓ https://github.com/maxcurrent420/BeastBreeder/commit/7368a7d9456d3cebe56b56f1cf292ed8bd244949 [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/app.js#L1-L1) - [X] Running GitHub Actions for `app.js` ✓ [Edit](https://github.com/maxcurrent420/BeastBreeder/edit/sweep/create_npcjs/app.js#L1-L1)
sweep-ai[bot] commented 10 months ago

🚀 Here's the PR! #15

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: 7ccd83358c)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

[!TIP] I can email you next time I complete a pull request if you set up your email here!


Actions (click)

GitHub Actions✓

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for d6d2d8f
Checking app.js for syntax errors... ✅ app.js has no syntax errors! 1/1 ✓
Checking app.js for syntax errors...
✅ app.js has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


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 think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/maxcurrent420/BeastBreeder/blob/d6d2d8f2dc17f56b83fa789fd84b701ca15f59db/ProjectDetails_Filestructure_Goals.txt#L23-L40 https://github.com/maxcurrent420/BeastBreeder/blob/d6d2d8f2dc17f56b83fa789fd84b701ca15f59db/README.md#L1-L45 https://github.com/maxcurrent420/BeastBreeder/blob/d6d2d8f2dc17f56b83fa789fd84b701ca15f59db/components/quest.js#L1-L18

Step 2: ⌨️ Coding

Ran GitHub Actions for 4da3464598b6e98ea29b0d25035119f53805fd8b:

Ran GitHub Actions for 6bf6c8f88262e2473e209c43e6bc8658580c33fe:

--- 
+++ 
@@ -10,8 +10,17 @@
 import { loadInventoryScreen } from './screens/inventory.js';
 import * as procedural from './utils/procedural.js';
 import * as wallet from './utils/wallet.js';
-import * as gamedata from './utils/gamedata.js';
+import * as gamedata from './utils/gamedata.js';
+import { NPC } from './components/NPC.js';
+import { dialogues } from './utils/dialogues.js';

+// NPCs
+const villageElder = new NPC('Village Elder', 'Elder', dialogues['Village Elder']);
+const shopkeeper = new NPC('Shopkeeper', 'Merchant', dialogues['Shopkeeper']);
+const blacksmith = new NPC('Blacksmith', 'Smith', dialogues['Blacksmith']);
+
+let npcs = [villageElder, shopkeeper, blacksmith];
+
 // Generate monster
 const monster = new Monster("Dragon", 300, 50, 30, ["Fire"]);

Ran GitHub Actions for 7368a7d9456d3cebe56b56f1cf292ed8bd244949:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/create_npcjs.


🎉 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