Jump to content

Recommended Posts

Seems like you will need to override the Fertilizer:Heal component function to do this, like so (in modmain):

AddClassPostConstruct("components/fertilizer", function(self)
        local _Heal = self.Heal
        function self:Heal(target)
                if self.planthealth ~= nil and target.components.health ~= nil and target.components.health.canheal and target:HasTag("healonfertilize") then
                        local maxhealth =  target.components.health.maxhealth
        		--I set the maxhealth to increase by 10, but you can determine this value however you want.
                        local bonushealth = 10
                        target.components.health.maxhealth = maxhealth + bonushealth
                        target.components.health:ForceUpdateHUD(true)
                end
                _Heal(self, target)
        end
end)

 

Edited by Ziro2k

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