/shop delete destroys the store's stock instead of returning it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 2 h 35 min
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de BrendonButler/Shops
-
dependencies enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
BrendonButler/Shops#79 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
BrendonButler/Shops#70 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
BrendonButler/Shops#69 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
BrendonButler/Shops#68 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
BrendonButler/Shops#67 ·
Los mantenedores suelen responder en 1 día
Todos los issues de BrendonButler/Shops
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
hibernate/hibernate-reactive#4485 ·
Los mantenedores suelen responder en 1 día
-
type: dependency-upgrade
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día