This pull request makes two changes to the Graverobber:
Implements Tim's idea mentioned in https://github.com/TTT-2/ttt2-role_pha/pull/16, wherein if all ankhs are destroyed all Graverobbers are given back their original roles (I believe this implementation was their intention).
Adds the "TTT2GraverobberPreventSelection" hook, which can be used by special traitor roles to "opt-out" of being selected to become Graverobbers. I added this primarily for the Defective, as losing their Detective status right as an ankh is placed down is extremely sus and has no meaningful counterplay.
My local implementation of the above hook in the Defective code is as follows:
hook.Add("TTT2GraverobberPreventSelection", "DefectiveGraverobberPreventSelection", function(ply)
if ply:GetSubRole() == ROLE_DEFECTIVE then
return true
end
end)
This pull request makes two changes to the Graverobber:
My local implementation of the above hook in the Defective code is as follows: