fix: no switching
This commit is contained in:
parent
46081203eb
commit
6def1588e0
|
@ -44,6 +44,9 @@ export default () => class Wielder extends decorate(Trait) {
|
||||||
|
|
||||||
acceptAction: ({action, value}) => {
|
acceptAction: ({action, value}) => {
|
||||||
const hotbarMatch = action.match(/^HotbarSlot(\d)/);
|
const hotbarMatch = action.match(/^HotbarSlot(\d)/);
|
||||||
|
if (hotbarMatch && !this.entity.isAcceptingInput) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
if (hotbarMatch && value) {
|
if (hotbarMatch && value) {
|
||||||
this.entity.activeSlotIndex = (parseInt(hotbarMatch[1], 10) + 10) % 10;
|
this.entity.activeSlotIndex = (parseInt(hotbarMatch[1], 10) + 10) % 10;
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user