PGM
PGM copied to clipboard
Filters for itemremove
Atm the itemkeep module with a clear tag in the spawn kit is used to have items not drop on death but be droppable, having a filter for drop events would achieve this effect properly and also allow for more customization on the map making side.
@RuedigerLP Just for my sake do you mind showing an example in XML of how this feature would look?
An example, where diamond swords are always deleted when dropping them (current behaviour) and golden apples and arrows are deleted only if you die (you can press Q to drop them).
<itemremove>
<item>diamond_sword</item>
</itemremove>
<itemremove filter="on-death">
<item>golden_apple</item>
<item>arrow</item>
</itemremove>
I'm not sure if such a filter exists that would match the cause of an item being dropped, maybe cause filter? Even without a death filter, it should still allow filtering that maybe any item you drop on enemy base is removed but not on your own, things like that.
From experience, I quite liked how Walrus handled item remove and such. It treated the whole thing as a filter rather than a list of items. See here for reference. This is drastically different from how current PGM maps handle it, however.
Basically, you could do something like this.
<items>
<remove>
<any>
<material>stone</material>
<material>dirt</material>
<all>
<material>sand</material>
<team>red-team</team>
</all>
</any>
</remove>
</items>
This would always remove stone
and dirt
, and only remove sand
when the red-team
is involved in the event.
Of course in the context of this issue, some sort of cause filter for deaths would probably have to be added as Pablete has mentioned.