Fix corpse & chest cursor when quick pickup enabled

Closes: https://github.com/arianne/stendhal/issues/601
This commit is contained in:
Jordan Irwin 2024-03-16 18:35:53 -07:00
parent 4610c46263
commit ee7233d0eb
No known key found for this signature in database
GPG key ID: E3E358C2F44C290A

View file

@ -433,6 +433,11 @@ export class ItemContainerImplementation {
*/
private updateCursor(target: HTMLElement, item?: Item) {
if (item) {
if (this.slot === "content" && stendhal.config.getBoolean("inventory.quick-pickup")) {
target.style.cursor = "url(" + stendhal.paths.sprites
+ "/cursor/itempickupfromslot.png) 1 3, auto";
return;
}
target.style.cursor = item.getCursor(0, 0);
return;
}