Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] iscultist is safe, accepts mobs and minds #3154

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions code/game/antagonist/station/cultist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@

GLOBAL_DATUM_INIT(cult, /datum/antagonist/cultist, new)

/proc/iscultist(mob/player)
if(!GLOB.cult || !player.mind)
return 0
if(player.mind in GLOB.cult.current_antagonists)
return 1

/// Tests if subject is a cultist. Subject may be a /mob or /datum/mind.
/proc/iscultist(mob/subject)
var/datum/mind/mind = subject
if (ismob(mind))
mind = subject.mind
return istype(mind) && (mind in GLOB.cult?.current_antagonists)


/datum/antagonist/cultist
id = MODE_CULTIST
Expand Down