Skip to content

Commit

Permalink
fixes roundstart comms (tgstation#17423)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangelingRain authored and phil235 committed May 5, 2016
1 parent 3e8b2ed commit 7dc3c98
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions code/game/gamemodes/cult/cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
return 0

/proc/is_convertable_to_cult(datum/mind/mind)
if(!istype(mind)) return 0
if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Chaplain"))) return 0
if(!istype(mind))
return 0
if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Chaplain")))
return 0
if(isloyal(mind.current))
return 0
if (ticker.mode.name == "cult") //redundant?
Expand All @@ -41,6 +43,7 @@
var/acolytes_survived = 0

var/datum/mind/sacrifice_target = null//The target to be sacrificed
var/list/cultists_to_cult = list() //the cultists we'll convert


/datum/game_mode/cult/announce()
Expand All @@ -67,12 +70,12 @@
break
var/datum/mind/cultist = pick(antag_candidates)
antag_candidates -= cultist
cult += cultist
cultists_to_cult += cultist
cultist.special_role = "Cultist"
cultist.restricted_roles = restricted_jobs
log_game("[cultist.key] (ckey) has been selected as a cultist")

return (cult.len>=required_enemies)
return (cultists_to_cult.len>=required_enemies)


/datum/game_mode/cult/proc/memorize_cult_objectives(datum/mind/cult_mind)
Expand All @@ -92,21 +95,21 @@
cult_mind.memory += "<B>Objective #[obj_count]</B>: [explanation]<BR>"

/datum/game_mode/cult/post_setup()
modePlayer += cult
modePlayer += cultists_to_cult
if("sacrifice" in cult_objectives)
var/list/possible_targets = get_unconvertables()
if(!possible_targets.len)
message_admins("Cult Sacrifice: Could not find unconvertable target, checking for convertable target.")
for(var/mob/living/carbon/human/player in player_list)
if(player.mind && !(player.mind in cult))
if(player.mind && !(player.mind in cultists_to_cult))
possible_targets += player.mind
if(possible_targets.len > 0)
sacrifice_target = pick(possible_targets)
if(!sacrifice_target)
message_admins("Cult Sacrifice: ERROR - Null target chosen!")
else
message_admins("Cult Sacrifice: Could not find unconvertable or convertable target. WELP!")
for(var/datum/mind/cult_mind in cult)
for(var/datum/mind/cult_mind in cultists_to_cult)
equip_cultist(cult_mind.current)
update_cult_icons_added(cult_mind)
cult_mind.current << "<span class='userdanger'>You are a member of the cult!</span>"
Expand Down

0 comments on commit 7dc3c98

Please sign in to comment.