Jump to content

Recommended Posts

As far as I can tell, you're going to need to modify Toadstool to make it work. Put something like this in your modmain.lua:

for k,v in ipairs({"toadstool", "toadstool_dark"}) do
    AddPrefabPostInit(v, function(inst)
        local sanityaura = inst.components.sanityaura
        local old_fn = sanityaura.aurafn

        sanityaura.aurafn = function(inst, observer)
            if observer.prefab == "your_character_prefab" then --Replace with your prefab name
                return -sanityaura.aura
                --This turns aura postitive. Toadstool's aura is -TUNING.SANITYAURA_HUGE while channeling mushrooms, else 0.
                --You might want to just return some value if you want it always active, or you could multiply/add to the aura value.
            elseif old_fn then --Other mods may have added their own aurafn
                return old_fn(inst, observer)
            end
        end
    end)
end
Edited by Bumber64
  • Thanks 1

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