Jump to content

Interplanetary launcher shows 100/200 radbolts, but won't fire when it needs 100 radbolts to launch.


ashridah
  • Branch: Live Branch Version: Windows Pending

The interplanetary launcher when firing exactly 10 hexes consumes 100 radbolts per launch. The launcher can store a maximum of 200 radbolts. However, when testing whether it has enough radbolts to fire the payload, it uses a 'greater-than' test on the number of stored particles, instead of 'greater-than-or-equals'.

 

This means that a launcher will refuse to fire at a destination that requires 100 radbolts if it has exactly 100 radbolts stored.

The HasEnergy function in Railgun.cs is likely the issue (taken from the source I use when modding):

public bool HasEnergy()
{
  return (double) this.smi.master.particleStorage.Particles > (double) this.EnergyCost();
}

I'm unsure if just adding the >= test is sufficient, since it's a float, I don't know if the numbers have minor amounts of rounding-up in the UI, but it should work if it counts down from 200 and fires a single 100-radbolt payload. (I'm going to quickly test if I can mod it to modify the test)

 


Steps to Reproduce

Set up a launcher that needs to fire 10 hexes to reach the destination. Load it with two payloads worth of mass, and tell it to fire both. It will only fire one, and sit there at 100/200 radbolts, unable to fire.

 

 

  • Like 1



User Feedback


Yep. Modding the Railgun to use >= to test the radbolt storage allows it to fire at 100/200 radbolts stored for a 100-radbolt launch.

Share this comment


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...