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

@zamojtel/rpg 116 equipment #38

Merged
merged 10 commits into from
May 24, 2022
Merged

Conversation

zamojtel
Copy link
Collaborator

Description

Checklist

  • Included code to test these changes
  • Updated Jira

Copy link
Collaborator

@mhawryluk mhawryluk left a comment

Choose a reason for hiding this comment

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

Great!

src/main/java/io/rpg/controller/Controller.java Outdated Show resolved Hide resolved
src/main/java/io/rpg/controller/Controller.java Outdated Show resolved Hide resolved
src/main/java/io/rpg/controller/PopupController.java Outdated Show resolved Hide resolved
src/main/java/io/rpg/model/data/Inventory.java Outdated Show resolved Hide resolved
src/main/java/io/rpg/view/InventoryPopup.java Outdated Show resolved Hide resolved
src/main/java/io/rpg/controller/Controller.java Outdated Show resolved Hide resolved
@@ -48,6 +51,19 @@ public void openTextImagePopup(String text, Image image, int x, int y){
public void openPointsPopup(int pointsCount, int x, int y) {
openTextImagePopup("You earned " + pointsCount + " points!", coinImage, x, y);
}
public void openInventoryPopup(Inventory inventory,int x, int y){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public void openInventoryPopup(Inventory inventory,int x, int y){
public void openInventoryPopup(Inventory inventory,int x, int y){

src/main/java/io/rpg/view/InventoryGameObjectView.java Outdated Show resolved Hide resolved
Comment on lines 151 to 154
if (object instanceof CollectibleGameObject) {
popupController.openTextImagePopup("Picked up an item!", objectView.getImage(), getWindowCenterX(), getWindowCenterY());
objectView.setVisible(false);
currentModel.getPlayer().getInventory().add((CollectibleGameObject) object);
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace that with an Action implementation

@kkafar kkafar changed the base branch from master to development May 22, 2022 16:26
zamojtel and others added 10 commits May 24, 2022 12:25
Collected collectibles are now displayed if we click on a non-collectible item
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
Co-authored-by: Marcin Hawryluk <70582973+mhawryluk@users.noreply.github.com>
@kkafar kkafar force-pushed the @zamojtel/RPG-116-equipment branch from 7bedeb0 to f4f1a23 Compare May 24, 2022 10:49
@zamojtel zamojtel requested a review from kkafar as a code owner May 24, 2022 10:49
Copy link
Collaborator

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

It works, but it is still in development stage. Do not merge it to master yet.

@kkafar kkafar merged commit b7ed447 into development May 24, 2022
@kkafar kkafar deleted the @zamojtel/RPG-116-equipment branch May 24, 2022 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants