Avorion

Avorion

Ships Need Fuel
This topic has been locked
Caellion  [developer] 6 Feb, 2021 @ 6:49am
Regarding Solars
I have looked around code and docs and came to following conclusions:

  • The only performance-cheap way of finding solar generation on ship/station is to loop through all blocks and count them when blockplan changes (and on startup)
  • When I include solars, I end up with really heavy maths with bonus calculation and ships still either lose or gain generation everytime they run out of fuel and then regain power (float-based modifiers lose precision)

Which lead me to these two possible solutions for now:
  1. Don't include solars at all (as of mod 0.1.4 version this is current)
  2. Include solars by just exempting ships that use no generators at all from needing fuel altogether (this will be current around 0.1.5)
Last edited by Caellion; 7 Feb, 2021 @ 8:33am