Merge pull request #672 from Citadel-Station-13/upstream-merge-26717
[MIRROR] Moves antag datums to the mind
This commit is contained in:
@@ -46,7 +46,7 @@ Credit where due:
|
||||
///////////
|
||||
|
||||
/proc/is_servant_of_ratvar(mob/living/M)
|
||||
return istype(M) && M.has_antag_datum(/datum/antagonist/clockcultist, TRUE)
|
||||
return istype(M) && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_CLOCKCULT)
|
||||
|
||||
/proc/is_eligible_servant(mob/living/M)
|
||||
if(!istype(M))
|
||||
@@ -65,17 +65,21 @@ Credit where due:
|
||||
return FALSE
|
||||
|
||||
/proc/add_servant_of_ratvar(mob/living/L, silent = FALSE)
|
||||
var/update_type = /datum/antagonist/clockcultist
|
||||
if(!L || !L.mind)
|
||||
return
|
||||
var/update_type = ANTAG_DATUM_CLOCKCULT
|
||||
if(silent)
|
||||
update_type = /datum/antagonist/clockcultist/silent
|
||||
. = L.gain_antag_datum(update_type)
|
||||
update_type = ANTAG_DATUM_CLOCKCULT_SILENT
|
||||
. = L.mind.add_antag_datum(update_type)
|
||||
|
||||
/proc/remove_servant_of_ratvar(mob/living/L, silent = FALSE)
|
||||
var/datum/antagonist/clockcultist/clock_datum = L.has_antag_datum(/datum/antagonist/clockcultist, TRUE)
|
||||
if(!L || !L.mind)
|
||||
return
|
||||
var/datum/antagonist/clockcult/clock_datum = L.mind.has_antag_datum(/datum/antagonist/clockcult)
|
||||
if(!clock_datum)
|
||||
return FALSE
|
||||
clock_datum.silent_update = silent
|
||||
clock_datum.on_remove()
|
||||
clock_datum.silent = silent
|
||||
clock_datum.on_removal()
|
||||
return TRUE
|
||||
|
||||
///////////////
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/list/cult_objectives = list()
|
||||
|
||||
/proc/iscultist(mob/living/M)
|
||||
return istype(M) && M.has_antag_datum(/datum/antagonist/cultist, TRUE)
|
||||
return istype(M) && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_CULT)
|
||||
|
||||
/proc/is_sacrifice_target(datum/mind/mind)
|
||||
if(SSticker.mode.name == "cult")
|
||||
@@ -158,18 +158,18 @@
|
||||
/datum/game_mode/proc/add_cultist(datum/mind/cult_mind, stun) //BASE
|
||||
if (!istype(cult_mind))
|
||||
return 0
|
||||
if(cult_mind.current.gain_antag_datum(/datum/antagonist/cultist))
|
||||
if(cult_mind.add_antag_datum(ANTAG_DATUM_CULT))
|
||||
if(stun)
|
||||
cult_mind.current.Paralyse(5)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1, stun)
|
||||
if(cult_mind.current)
|
||||
var/datum/antagonist/cultist/cult_datum = cult_mind.current.has_antag_datum(/datum/antagonist/cultist, TRUE)
|
||||
var/datum/antagonist/cult/cult_datum = cult_mind.has_antag_datum(ANTAG_DATUM_CULT)
|
||||
if(!cult_datum)
|
||||
return FALSE
|
||||
cult_datum.silent_update = show_message
|
||||
cult_datum.on_remove()
|
||||
cult_datum.silent = show_message
|
||||
cult_datum.on_removal()
|
||||
if(stun)
|
||||
cult_mind.current.Paralyse(5)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user