Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding game's store logic in JS #44

Closed
wants to merge 12 commits into from

Conversation

lorenzomiro
Copy link
Member

I was thinking that this game would need some logic for a store that would be used to buy and sell items. This is a sample interaction that I made to get that started.

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 24 0
📑 Files Changed: Repo Stars: 🔱 Total Forks:
2 8 21

Copy link

🥳 Congratulations 🎉

Congrats on making your first Pull Request in the Zero To Mastery Organization!
You have been sent an invitation to join the ZTM github organization, please check your emails for further details!

ZTM Profile Badge

If you'd like the ZTM Badge to show up on your profile, you will need to follow this guide!

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 24 0
📑 Files Changed: Repo Stars: 🔱 Total Forks:
2 8 22

Copy link
Collaborator

@r4pt0s r4pt0s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lorenzomiro could you maybe add the interaction to map_city instead of map_start?
In map_city, we already have set up two potential buildings with enter map tags where one of them could be a store.
Hava a look at additional map infos where you can see the tag name of the buildings which you can use in your onCollide method.

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 24 0
📑 Files Changed: Repo Stars: 🔱 Total Forks:
2 9 23

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 77 5
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 9 23

@lorenzomiro
Copy link
Member Author

Pull request updated with "Updated with map_city interactions moved out from map_start"

@lorenzomiro
Copy link
Member Author

See recent push with requested changes

Copy link
Collaborator

@r4pt0s r4pt0s Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move your additions to map_city interactions

Copy link
Collaborator

@r4pt0s r4pt0s Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the changes of this file. Otherwise it is not possible to go into the arcade anymore

@@ -0,0 +1,31 @@
import { displayDialogue } from '../../utils';
import { sampleStoreInteraction, sampleArcadeInteraction } from './enterMapArcade.interactions';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move your code from enterMapArcade.interactions to this file because of my comment to revert the enterMapArcade.interactions.js file

Comment on lines 16 to 21
player.onCollide('enter_map_arcade', () => {
player.isInDialog = true;
displayDialogue(sampleStoreInteraction(), () => {
player.isInDialog = false;
});
//if user runs into the house, show them the house
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pleaseo remove this code because there is already a enter_map_arcade interaction. otherwise it is not possible anymore to go into the arcade

Comment on lines 24 to 26
/*displayDialogue(sampleTinyHouseInteraction(), () => { //sampleTinyHouseInteraction needs building
player.isInDialog = false;
});*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ther is already the building here. You made it already right. Just add the sampleTinyHouseInteraction function and we are good to go

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this file because we have it in interactions/map_city in your PR

Copy link
Collaborator

@r4pt0s r4pt0s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.
Also make sure to update your PR with the latest changes of the main branch

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 78 4
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 19 42

Copy link

⚠️ MERGE CONFLICT DETECTED!

@lorenzomiro A possible conflict has been detected, you will need to resolve this before your pull request can be merged. The most common reason conflicts occur, is when the contributor does not run git pull origin master before pushing their new changes.

Before we can merge the code, you will need to resolve the conflict, check out these videos by Aldo: How To Get Started With Open Source and How To Resolve Git Merge Conflicts. If you get stuck ask over on Discord.

1 similar comment
Copy link

⚠️ MERGE CONFLICT DETECTED!

@lorenzomiro A possible conflict has been detected, you will need to resolve this before your pull request can be merged. The most common reason conflicts occur, is when the contributor does not run git pull origin master before pushing their new changes.

Before we can merge the code, you will need to resolve the conflict, check out these videos by Aldo: How To Get Started With Open Source and How To Resolve Git Merge Conflicts. If you get stuck ask over on Discord.

Copy link

⚠️ MERGE CONFLICT DETECTED!

@lorenzomiro A possible conflict has been detected, you will need to resolve this before your pull request can be merged. The most common reason conflicts occur, is when the contributor does not run git pull origin master before pushing their new changes.

Before we can merge the code, you will need to resolve the conflict, check out these videos by Aldo: How To Get Started With Open Source and How To Resolve Git Merge Conflicts. If you get stuck ask over on Discord.

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 54 7
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 26 63

1 similar comment
Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 54 7
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 26 63

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 63 7
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 26 63

Copy link

🙏 Thanks for your pull request @lorenzomiro, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
44 54 21
📑 Files Changed: Repo Stars: 🔱 Total Forks:
5 26 63

@r4pt0s
Copy link
Collaborator

r4pt0s commented Oct 9, 2024

@lorenzomiro closed due to inactivity. Feel free to reopen the Pr or to create a new one. There were a lot of changes happening.

@r4pt0s r4pt0s closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants