arsenal, generalist mod

This commit is contained in:
landgreen
2020-08-14 07:04:30 -07:00
parent 6bfc53d3be
commit 9ecbe9c479
6 changed files with 72 additions and 19 deletions

View File

@@ -264,14 +264,14 @@ const game = {
}
},
nextGun() {
if (b.inventory.length > 0) {
if (b.inventory.length > 0 && !mod.isGunCycle) {
b.inventoryGun++;
if (b.inventoryGun > b.inventory.length - 1) b.inventoryGun = 0;
game.switchGun();
}
},
previousGun() {
if (b.inventory.length > 0) {
if (b.inventory.length > 0 && !mod.isGunCycle) {
b.inventoryGun--;
if (b.inventoryGun < 0) b.inventoryGun = b.inventory.length - 1;
game.switchGun();
@@ -315,14 +315,11 @@ const game = {
// }
if (keys[69]) {
// e swap to next active gun
if (keys[69]) { // e swap to next active gun
game.nextGun();
} else if (keys[81]) {
//q swap to previous active gun
} else if (keys[81]) { //q swap to previous active gun
game.previousGun();
}
if (keys[80] && !game.isChoosing) { //p for pause
if (game.paused) {
build.unPauseGrid()