Jump to content

[Modder Request] Controlled burn sources always use skilltreeupdater


Electroely
  • Pending

While trying to make a burn source of mine use the controlled burn mechanic from Willow's skill tree, I've come across the following code:
 

local controlled_burn_source = doer and doer:HasTag("controlled_burner") and doer or source and source:HasTag("controlled_burner") and source

if controlled_burn_source then
	self.controlled_burn = {
		duration_creature = controlled_burn_source.components.skilltreeupdater:IsActivated("willow_controlled_burn_2") and TUNING.CONTROLLED_BURN_DURATION_CREATURE_MULT or nil,                
		damage = controlled_burn_source.components.skilltreeupdater:IsActivated("willow_controlled_burn_3") and TUNING.CONTROLLED_BURN_DAMAGE_MULT or nil
	}
else
	self.controlled_burn = nil
end

The code does not check if the skilltreeupdater component exists, causing a crash for any non-character burn sources trying to use the tag.


Steps to Reproduce

Add "controlled_burner" tag to any non-player entity and pass it into burnable:Ignite as a source

  • Like 3



User Feedback


There are no comments to display.



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