Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFavorite System v1.0 #29287
Conversation
cafeoh
added some commits
Mar 29, 2019
This comment has been minimized.
This comment has been minimized.
|
Has any other PR received that many upvotes in so little time? |
cafeoh
force-pushed the
cafeoh:favorite_v1
branch
from
e02d872
to
d17cd28
Apr 5, 2019
mlangsdorf
reviewed
Apr 7, 2019
|
my knowledge of the inventory system is just enough to get me in trouble, but nothing in this looks obviously bad. |
ifreund
reviewed
Apr 7, 2019
|
Code looks great to me, haven't compiled or tested though. Nice work! |
| @@ -20,7 +20,7 @@ | |||
| #include "vpart_reference.h" | |||
|
|
|||
| const invlet_wrapper | |||
| inv_chars( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#&()*+.:;=@[\\]^_{|}" ); | |||
| inv_chars( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#&()+.:;=@[\\]^_{|}" ); | |||
This comment has been minimized.
This comment has been minimized.
ifreund
Apr 7, 2019
Contributor
I'm curious as to how loading old saves with * used as an invlet is handled. (I have no idea what would happen, it may not need any special handling)
This comment has been minimized.
This comment has been minimized.
cafeoh
Apr 7, 2019
•
Author
Contributor
I tested it, and basically the items just keep the invlet. As usual, invlets take precedence over key bindings, so it means you won't be able to use the * bind until you unassign the item, but I don't think it's a big deal. I thought about cleaning the invlets manually (making sure they match), but I'm not convinced it'd really be worth it to have that piece of code laying around.
I wanted to improve handling of invlet attribution later so it's not as hardcoded (there's no verification at the moment), but that's for another PR.
kevingranade
merged commit 7a3ce39
into
CleverRaven:master
Apr 9, 2019
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/latest-experimental-features/5582/1106 |
cafeoh commentedApr 5, 2019
•
edited
Summary
SUMMARY: Features "Adds a fully functional item favoriting system"Back with more better features and 70% cleaner code!
(Thanks to @anothersimulacrum for his save by the way!
Purpose of change
Allows to favorite items from every menu including the advanced item menu (but not from the Compare and Multidrop menus). In addition to selecting a single item via the inventory menu (
Enter->f) there's now a new default keybinding to*that favorites the full stack under the cursor.Two menu behaviours were added to make this actually useful (beyond just the visual aspect) :
,) key from your inventory, where it only first empties out all non favorite item on the first press, and then drop all the rest of your favourite gear (with a warning).Describe the solution
Changed item stacking, item selector, and other UI stuff.
Future additions
,key in the multidrop menu (might be redundant with the advanced inventory, but it'd be pretty straightforward if people are interested