When looting corpses, for example, one might expect the one that was felled most recently to be the first one searched (since it is least likely to be empty). Since room items are Sets, and Sets are iterated over in insertion order, it may be useful to have a method for iterating in reverse order. (easiest way is just to convert the Set to an Array then reverse the Array, inside of the get command script).
Expected outcome
If I kill a mob, loot its corpse, then kill a second in the same room and loot its corpse, the loot or get all command will search the most recently created corpse container. (gruesome, I know)
Actual outcome
The get all command searches the first-inserted corpse container, which is the empty one, so I have to do get all 2.corpse.
Steps to reproduce
Log onto the default server, move to a room with multiple training dummies, and kill one of them. Loot it, kill another, and attempt to loot the second without using dot notation.
Description
When looting corpses, for example, one might expect the one that was felled most recently to be the first one searched (since it is least likely to be empty). Since room items are Sets, and Sets are iterated over in insertion order, it may be useful to have a method for iterating in reverse order. (easiest way is just to convert the Set to an Array then reverse the Array, inside of the
get
command script).Expected outcome
If I kill a mob, loot its corpse, then kill a second in the same room and loot its corpse, the
loot
orget all
command will search the most recently created corpse container. (gruesome, I know)Actual outcome
The
get all
command searches the first-inserted corpse container, which is the empty one, so I have to doget all 2.corpse
.Steps to reproduce
Log onto the default server, move to a room with multiple training dummies, and kill one of them. Loot it, kill another, and attempt to loot the second without using dot notation.
Version of Ranvier
v1.1.1