I think the second line here might be there by mistake:
local function onsane(self, sane) self.inst.replica.sanity:SetIsSane(not self.inducedlunacy and not self.inducedinsanity and sane) self.inst.replica.sanity:SetIsSane((not self.inducedinsanity and sane)) end
Shouldn't these also account for self.inducedlunacy and self.inducedinsanity, respectively?:
local function oninducedinsanity(self, inducedinsanity) self.inst.replica.sanity:SetIsSane(not inducedinsanity and self.sane) self.inst.replica.sanity:SetCurrent((inducedinsanity and 0) or self.current) end local function oninducedlunacy(self, inducedlunacy) self.inst.replica.sanity:SetIsSane(not inducedlunacy and self.sane) self.inst.replica.sanity:SetCurrent((inducedlunacy and self.max) or self.current) end
Main concerns with these is that there's a replica.sanity:IsSane() check in combat_replica.lua that might get affected incorrectly.
Also, I'd imagine you'd have to account for having both for things like these:
function Sanity:GetPercent() return (self.inducedinsanity and 0) or (self.inducedlunacy and 1) or self:GetRealPercent() end function Sanity:GetPercentWithPenalty() return (self.inducedinsanity and 0) or (self.inducedlunacy and 1) or self.current / (self.max - (self.max * self.penalty)) end
Currently, induced insanity takes priority here.
I'm aware this might not even be used right now, and might be unfinished, but I thought I might still be worth pointing out.
Notable cases are:
Set induced lunacy while having induced sanity (and sanity mode is insanity, not lunacy).
- Notice how the insanity overlay remains and sanity remains at 0 (so everything is desaturated), but shadow creatures only harass you, not attack you.
Set induced lunacy while at 0 sanity (and without induced insanity).
- Notice how the insanity overlay remains while at max sanity.
Basically.. you might have to revise each possible case with these combined: which sanity mode is active, having one or both induced sanity types are active at once, and real sanity values.
-
1
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
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