08-10-2019, 11:38 PM
https://github.com/goonstation/goonstati...6/pull/149
Short summary:
Certain projectiles in bullet.dm define a specific on_hit() proc. Some of these check the power var to decide whether or not an effect should happen based on how much power the bullet has lost after being fired. However, all of these projectiles as far as I can tell have been incorrectly checking the power var. This leads to these conditional statements always occurring. In order to fix this, I have simply added the third argument that is defined in the on_hit() proc in the projectile_parent.dm into the children defined in bullet.dm. This allows /obj/projectile/ to be passed into the on_hit function, which then allows for power to be properly checked.
Short summary:
Certain projectiles in bullet.dm define a specific on_hit() proc. Some of these check the power var to decide whether or not an effect should happen based on how much power the bullet has lost after being fired. However, all of these projectiles as far as I can tell have been incorrectly checking the power var. This leads to these conditional statements always occurring. In order to fix this, I have simply added the third argument that is defined in the on_hit() proc in the projectile_parent.dm into the children defined in bullet.dm. This allows /obj/projectile/ to be passed into the on_hit function, which then allows for power to be properly checked.