This is pretty low prio but I thought I'd point it out since the changes were made.
local function IsCrazyGuy(guy) local sanity = guy ~= nil and guy.replica.sanity or nil return sanity ~= nil and sanity:GetPercentNetworked() <= (guy:HasTag("dappereffects") and TUNING.DAPPER_BEARDLING_SANITY or TUNING.BEARDLING_SANITY) end
This is inconsistent with the sanity:isCrazy() check that starts mind control, which does check for it. While there isn't a specific case for this right now (as the upgraded Enlightened Crown will force sanity to 200 due to induced enlightenment), this is more of a consistency check and future-proofing, as technically becoming enlightened wouldn't be enough.
Also.. given that IsCrazyGuy is a local function defined in multiple files at this point (with this one being the only one slightly different), wouldn't it be better to make it a global function similar to the meat in inventory check that the Rabbit King update changed? Could change the name too to avoid confusion with sanity:IsCrazy(), to something related to BEARDLING_SANITY since that's the main use.
Also, a function in waveyjoneshandbrain.lua is the only other case I could find of not correctly checking for the sanity mode:
local function getboatsanity(boat) local x,y,z = boat.Transform:GetWorldPosition() local players = FindPlayersInRange(x,y,z,boat.components.hull:GetRadius(),true) local sanity = 1 for i, player in ipairs(players)do if player.components.sanity and player.components.sanity:GetPercent() < sanity then sanity = player.components.sanity:GetPercent() end end return sanity end
This affects the behavior of the hand, but it's still pretty minor.
See above.
-
1
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 accountSign in
Already have an account? Sign in here.
Sign In Now