DarkflameUniverse / DarkflameServer

The main repository for the Darkflame Universe Server Emulator project.
https://www.darkflameuniverse.org/
GNU Affero General Public License v3.0
625 stars 171 forks source link

ENH: Make use of `minNumRequired` when deleting items #960

Open EmosewaMC opened 1 year ago

EmosewaMC commented 1 year ago

Is your feature request related to a problem?

Currently the player can become stranded on some maps should they choose to delete their last rocket from the inventory. This should not be possible and should make use of the minNumRequired field to force players to keep at least X of that item in the inventory.

Describe the solution you'd like

The above

Repository breaking implications

None. Will make deleting items a touch slower due to more checks, however this is needed to ensure live accuracy

Describe alternatives you've considered

Hard coding it, but we have the field name right there.

Additional context

None.

aronwk-aaron commented 1 month ago

minNumRequired is not relevent should use the DeletionRestrictions table instead

EmosewaMC commented 1 month ago

minNumRequired is not relevent should use the DeletionRestrictions table instead

minNumRequired lined up perfectly in all cases and could be used in tandem with DeletionRestrictions, but is not irrelevant.