Jump to content

Automatic fire and coaxial weapons


FuryoftheStars

Recommended Posts

In code, I've noticed a possible issue regarding the AutomaticFire specialty and coaxial weapons.

 

In turretgenerator.lua, all weapons go through the TurretGenerator.scale function, first, where coaxial and related damage boosts are determined and applied.

 

After, they go through TurretGenerator.addSpecialties where there's a chance of Specialty.AutomaticFire being applied.  If automatic fire is selected and applied, it sets turret.coaxial to false without also down-scaling the turret.  This results in a larger than normal automatic turret with the size and coaxial x3 damage boosts applied.  It also means the chances of getting a coaxial are reduced by the probability of getting automatic fire applied.

 

Depending on whether or not you would want these oversized turrets to be a possibility, I'd recommend checking for the coaxial status in the TurretGenerator.addSpecialties function and either skipping/removing Specialty.AutomaticFire as a choice, or at least down-scaling the turret damage by the coaxial x3 when applying the specialty.

 

EDIT: Whoops, probably should have posted this in beta bugs seems I'm running on beta, though I believe this code was present in stable as well.  Oh, and the line number (in the beta version of turretgenerator.lua) where applying of Specialty.AutomaticFire begins is 523, though the check for this could be made earlier (like somewhere around 472 when it's pairing down the specialties list based on the max number allowed, or around 463 when it's picking the specialties).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...