-
Notifications
You must be signed in to change notification settings - Fork 90
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
Shop Balance Feature Implemented #84
Conversation
…ITEM_CANT_BE_SOLD to better fit context shop - Added new variable shop_balance; initialized to 500 for testing, buy and sell functions adjusted to update vendor amount menu_creator_manager - create_shop_menu updated to show vendor gold in UI load xml, load tmx, level_scene - added shop_balance parameter to constructors Additional Notes: Shop balance does not show on sell interface. Shop balance value is not updated when saved, may be due to the fact that they were set to 500 in the constructor. The load xml, load tmx, and level_scene files need to be reviewed for confirmation. The basic functionality is there, but tweaks still need to be made.
…TR_THIS_ITEM_CANT_BE_SOLD to better fit context" This reverts commit d6d7c79.
…dified STR_THIS_ITEM_CANT_BE_SOLD to better fit context"" This reverts commit 694a3cf.
…ITEM_CANT_BE_SOLD to better fit context shop - Added new variable shop_balance; initialized to 500 for testing, buy and sell functions adjusted to update vendor amount menu_creator_manager - create_shop_menu updated to show vendor gold in UI load xml, load tmx, level_scene - added shop_balance parameter to constructors Additional Notes: Shop balance does not show on sell interface. Shop balance value is not updated when saved, may be due to the fact that they were set to 500 in the constructor. The load xml, load tmx, and level_scene files need to be reviewed for confirmation. The basic functionality is there, but tweaks still need to be made.
Great PR overall, only a few details should be addressed 👍 Suggestion for later improvement: speech from shopkeeper in case of item that cannot be sold should differ depending on the reason of the failure ; it's incoherent for the shopkeeper to yell at the player that item cannot be sold because of insufficient funds while the real reason might be that the item is a key item that the player should not abandon. |
text.py - f_shop_gold deleted 1 line to replicate 2 lines of space between functions, str_this_item_can't_be_sold space before '!' removed shop.py - self.shop_balance = 500 -> self.shop_balance = shop_balance, parameter shop_balance changed to self.shop_balance load_from_xml_manager.py - shop_balance=None -> shop_balance=500 in load_building_from_save function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, thanks for your first contribution!
Huh huh, looks like a test is failing. Test is |
Yes, I will look into it when I get the chance. |
text - New function to display shopkeeper balance, modified STR_THIS_ITEM_CANT_BE_SOLD to better fit context
shop - Added new variable shop_balance; initialized to 500 for testing, buy and sell functions adjusted to update vendor amount
menu_creator_manager - create_shop_menu updated to show vendor gold in UI
load xml, load tmx, level_scene - added shop_balance parameter to constructors
Additional Notes: Shop balance does not show on sell interface. Shop balance value is not updated when saved, may be due to the fact that they were set to 500 in the constructor. The load xml, load tmx, and level_scene files need to be reviewed for confirmation. The basic functionality is there, but tweaks still need to be made.
Excuse the previous PR, there was an uninitialized variable within level_scene that prevented main new game button the function, it is now fixed.