/shop delete destroys the store's stock instead of returning it
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start with DeleteCommand, where the issue says the inventory check and unfinished TODO already exist, then inspect the delete command tests and the wiki's Commands page. Trace how finite stock and negative quantities are handled, and run the relevant tests. Done when a plain delete returns finite stock or leaves the store unchanged if inventory is insufficient, force flags still discard stock, and the wiki matches.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
DeleteCommand checks that the player has room for the store's items, then deletes the store without giving them the items. All remaining stock is lost, even on a plain /shop delete <store> with no flags.
The inventory check implies the items should be returned, and so does STORE_DELETE_INSUFFICIENT_INV_PLAYER, which tells players to clear space or use -f to ignore inventory. A TODO in DeleteCommand also notes that removing all items is unfinished. The balance is refunded correctly unless -F is used.
The existing -f and -F tests only cover the forced paths, where an empty inventory is expected.
Steps to reproduce
- Create a store and add items to it.
- Run
/shop delete <store>with enough free inventory space. - The store is deleted, but the items aren't in the player's inventory.
Scope
- Give the store's stock to the player when deleting without a force flag.
- Keep
-fand-Fdiscarding stock, and make sure the behavior is clear in the command's messages. - Handle items with infinite stock (negative quantity) so they don't create items or fail the inventory check.
Done when
- A plain delete moves all finite stock to the player's inventory.
- A plain delete with too little space is refused and the store is unchanged.
- Tests cover the plain delete with stock, and
-fand-Fstill discard it. - The wiki's Commands page, which currently warns that stock isn't returned, matches the fix.
- Fixed before the 0.4.0 full release.
- Lingua principale
- Java
- Stelle
- 1
- Fork
- 0
- Merge medio
- 2h 35m
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BrendonButler/Shops
-
dependencies enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
BrendonButler/Shops#79 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BrendonButler/Shops#70 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
BrendonButler/Shops#69 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
BrendonButler/Shops#68 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
BrendonButler/Shops#67 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di BrendonButler/Shops
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
hibernate/hibernate-reactive#4485 ·
I maintainer di solito rispondono entro 1 giorno
-
type: dependency-upgrade
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno