MSUTeam / MSU

Modding Standards and Utilities for Battle Brothers
21 stars 4 forks source link

fix: handling for accessing skill DamageType before hookTree #389

Closed LordMidas closed 1 month ago

LordMidas commented 1 month ago

Add a new class for DamageType that extends WeightedContainer and overwrites all functions to first initialize the DamageType of the skill before returning the base function. This ensures that hooks on the skill's create function before hookTree that try to add/remove a DamageType or try to access any other value related to the skill's DamageType do not break the auto-assigning of DamageTypes for skills that don't come with DamageType defined (e.g. vanilla skills).