Well, I don't code anymore, but I can somewhat think of the logic...
Technically, the rshares would remain the same for the reward pool assignment, that part would not change.
Since vested STEEM already makes ROI (not much mind you) it would be simply adjusting that number, setting conditions to it (ie stake not being delegated out) and creating an equivalent of a switch condition with cool downs and what not.
I used to code, its been a couple of decades now.. but it doesn't seem too hard, at least by comparison.