Closed whichtwix closed 1 year ago
alternatively you could also make a custom button class and override the button's OnClick function so there's no need to patch AbilityButton.DoClick, plus if you add an effect parameter you can maybe make it work like the shapeshift button from the vanilla shapeshifter
the thing with that is it leads to the same thing, we will have to instanatiate that class and itll be mostly like before, and I dont think the do click will run on its own without a patch unless we go the rainbow route and do the registerinil2cpp stuff, will have to look into how that way is
clicking haunt a 2nd time made the buttons appear but the minigame would technically close, found a quite sketchy way to fix it by inverting the close states, though you still have to click it multiple times
the thing with that is it leads to the same thing, we will have to instanatiate that class and itll be mostly like before, and I dont think the do click will run on its own without a patch unless we go the rainbow route and do the registerinil2cpp stuff, will have to look into how that way is
nah i made a quick class and checked it out, there's no need for patches
hmm ok, though in that case overriding useability from rolebehavior may be better, since the doclick runs that within its method, and there are other methods in rolebehavior that may be helpful
currently wip as there is a bug with no buttons appearing after hauntminigame.begin
right now imp/nk abilities are killbuttons, but the abilitybutton is unused apart from haunt so it may be good to change to using that, the patch to change their button becomes alike to how crew,nk, and arso/pb roles get theirs. this way all the sprite changing could be in 1 file
if (__instance == role.ReviveButton)
, these are now redundant as theres only 1 abilitybutton