Decorate Inventory sorting functions

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Decorate Inventory sorting functions

Re: Decorate Inventory sorting functions

by Slasher » Mon Dec 05, 2011 3:48 pm

wildweasel wrote:I would like to see a feature...
Oh God he's channeling SamuraiClinton! :lol:

Re: Decorate Inventory sorting functions

by jpalomo » Mon Dec 05, 2011 3:18 pm

I can see this not only being useful on a modder's perspective, but for a player's as well. I have found times in Heretic and Strife when I want a certain item and have to scroll through a bunch of junk to get to it. Inventory.SelectionOrder seems like an appropriate name for the function. Lower numbers would place the item higher in the list. If 2 actors have the same number, the original behavior takes place.

Re: Decorate Inventory sorting functions

by Gez » Mon Dec 05, 2011 2:15 pm

When you use the give all cheat, the engine just goes through the entire list of actor and goes "is this an inventory item y/n if yes add it". That master list of actors is filled in the order the actors are defined, so there's nothing mindboggling to the fact that items are added in the order they are defined. And they're sorted by the order in which they are added, so, again, what happens is a logical extension of how things work.

But you're not really supposed to use give all when playing.

Re: Decorate Inventory sorting functions

by Xtyfe » Mon Dec 05, 2011 12:49 pm

Not sure how this relates to what you are asking, but from my own findings in making an inventory system for doom items. it seems that if I use give all and then receive these inventory items in the new system. They will appear in the order of how they were defined in decorate :shock:

Re: Decorate Inventory sorting functions

by Enjay » Mon Dec 05, 2011 11:55 am

Yes, that would be nice. I'd use it to specify special items (like puzzle items and so on that are single use and in one location only) to be at one end of the inventory and useful, frequent-use items to be at the other.

Decorate Inventory sorting functions

by wildweasel » Sun Dec 04, 2011 10:09 pm

I would like to see a feature that allows one to specify in which order ZDoom will display inventory items on the bar when given to the player. Currently, it seems that they are sorted in the order which the player obtains them, but I would like to know if it's possible to make them sort in a predetermined order, similar to Weapon.SelectionOrder and associated properties.

Top