sticky mines

mines are sticky
some mods trigger effects on pickup
This commit is contained in:
landgreen
2020-01-11 08:48:40 -08:00
parent 9c2433d50d
commit 7068a48903
9 changed files with 428 additions and 247 deletions

View File

@@ -213,7 +213,9 @@ const game = {
},
switchGun() {
if (b.modNoAmmo) b.modNoAmmo = 1 //this prevents hacking the mod by switching guns
// if (b.guns[b.activeGun].switchOff) b.guns[b.activeGun].switchOff(); //run code when switching away from a gun
b.activeGun = b.inventory[b.inventoryGun];
// if (b.guns[b.activeGun].switchOn) b.guns[b.activeGun].switchOn(); //run code when switching to a new gun
game.updateGunHUD();
game.boldActiveGunHUD();
// mech.drop();
@@ -435,6 +437,7 @@ const game = {
b.guns[i].have = false;
if (b.guns[i].ammo != Infinity) b.guns[i].ammo = 0;
}
// if (b.activeGun && b.guns[b.activeGun].switchOff) b.guns[b.activeGun].switchOff(); //run code when switching away from a gun
b.activeGun = null;
b.setModDefaults(); //remove mods
game.updateModHUD();