merged shotgun tech

railgun and foam have a bit more ammo
capacitor bank makes foam gun fire a stream of foam
tech shift registers is now always on
  (set ON/OFF to ON at the start of a new level)
tech from applied science doesn't count for various tech that convert tech into other things (pure science, many worlds)
grappling hook now shows hooks on the grapple

merged similar gun tech
  needle gun+needle shot
  rivet gun+shotgun slug
  shockwave+blast mines
  nematodes+worm-shot
  necrophoresis+necrophage
    the worm aspect now spawns 3 copies instead of just a lifespan reset
This commit is contained in:
landgreen
2022-03-06 19:00:27 -08:00
parent 50fbd618a6
commit 4efc3d2d82
8 changed files with 391 additions and 332 deletions

View File

@@ -399,7 +399,7 @@ const simulation = {
}
}
}
if (tech.isCrouchAmmo) tech.isCrouchAmmo = 1 //this prevents hacking the tech by switching guns
if (tech.crouchAmmoCount) tech.crouchAmmoCount = 1 //this prevents hacking the tech by switching guns
b.activeGun = b.inventory[b.inventoryGun];
if (b.guns[b.activeGun].charge) b.guns[b.activeGun].charge = 0; //if switching into foam set charge to 0
@@ -653,6 +653,7 @@ const simulation = {
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
if (b.guns[i].name === "harpoon") b.guns[i].chooseFireMethod()
if (b.guns[i].name === "foam") b.guns[i].chooseFireMethod()
}
tech.dynamoBotCount = 0;
tech.nailBotCount = 0;
@@ -778,7 +779,7 @@ const simulation = {
}
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun is mine
if (b.guns[i].name === "mine") {
if (tech.isCrouchAmmo) count = Math.ceil(count / 2)
if (tech.crouchAmmoCount) count = Math.ceil(count / 2)
b.guns[i].ammo += count
if (tech.ammoCap) b.guns[i].ammo = Math.min(tech.ammoCap, b.guns[i].ammo)
simulation.updateGunHUD();