aliens

Author Topic: [Solved] Difference between some scripting hooks in group bonuses  (Read 1131 times)

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
We were looking at the scripting hooks such as energyRecoveryBonusStats and energySoldierRecoveryBonusStats. I didn't really get smart looking at them in the source code. BonusSoldierStatsRecoveryParser and BonusStatsRecoveryParser inherit from BonusStatsBaseParser but I don't really see a difference the two.

What is the difference between these hooks?
Thanks.
« Last Edit: February 12, 2023, 01:21:20 pm by Meridian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3246
    • View Profile
Re: Difference between some scripting hooks in group bonuses
« Reply #1 on: January 15, 2023, 11:13:57 am »
If two hooks inhere from same base class then its mean they have same functionality but are used in different place.

In this case we have difference to what given hooks is linked,
in case of `energyRecoveryBonusStats` is to Armor and in case `energySoldierRecoveryBonusStats` to solder bonus stats.

Both are called at same moment but primary hook is `energyRecoveryBonusStats` and `energySoldierRecoveryBonusStats` only used to prepare initial value of additional bonus stat based on each bonus solder have.

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: Difference between some scripting hooks in group bonuses
« Reply #2 on: January 20, 2023, 09:47:24 pm »
That clears it up. Thank you very much Yankes!