Merge pull request #1571 from Markolie/master

Fixes
This commit is contained in:
Fox-McCloud
2015-07-27 11:46:35 -04:00
7 changed files with 60 additions and 46 deletions
+2 -2
View File
@@ -650,7 +650,7 @@ datum/mind
special_role = null
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
cult.memorize_cult_objectives(src)
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>"
memory = ""
if(src in ticker.mode.traitors)
@@ -1239,7 +1239,7 @@ datum/mind
current << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
cult.memorize_cult_objectives(src)
else
var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it."
current << "<B>Objective #1</B>: [explanation]"
+20 -14
View File
@@ -10,10 +10,17 @@
/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
for(var/obj/item/weapon/implant/loyalty/L in mind.current)
if(L && (L.imp_in == mind.current))//Checks to see if the person contains an implant, then checks that the implant is actually inside of them
if(!mind)
return 0
if(!mind.current)
return 0
if(iscultist(mind.current))
return 1 //If they're already in the cult, assume they are convertable
if(ishuman(mind.current) && (mind.assigned_role in list("Captain", "Chaplain")))
return 0
if(ishuman(mind.current))
var/mob/living/carbon/human/H = mind.current
if(H.is_loyalty_implanted())
return 0
return 1
@@ -42,7 +49,7 @@
var/eldergod = 1 //for the summon god objective
var/const/acolytes_needed = 5 //for the survive objective
var/acolytes_needed = 4 //for the survive objective - base number of acolytes, increased by 1 for every 10 players
var/const/min_cultists_to_start = 3
var/const/max_cultists_to_start = 4
var/acolytes_survived = 0
@@ -54,7 +61,7 @@
/datum/game_mode/cult/pre_setup()
if(prob(50))
if(prob(50))
objectives += "survive"
objectives += "sacrifice"
else
@@ -79,14 +86,13 @@
/datum/game_mode/cult/post_setup()
modePlayer += cult
acolytes_needed = acolytes_needed + round((num_players_started() / 10))
if("sacrifice" in objectives)
var/list/possible_targets = get_unconvertables()
if(!possible_targets.len)
for(var/mob/living/carbon/human/player in player_list)
if(player.mind && !(player.mind in cult))
possible_targets += player.mind
if(possible_targets.len > 0)
sacrifice_target = pick(possible_targets)
@@ -95,7 +101,7 @@
grant_runeword(cult_mind.current)
update_cult_icons_added(cult_mind)
cult_mind.current << "\blue You are a member of the cult!"
memoize_cult_objectives(cult_mind)
memorize_cult_objectives(cult_mind)
cult_mind.special_role = "Cultist"
spawn (rand(waittime_l, waittime_h))
@@ -103,7 +109,7 @@
..()
/datum/game_mode/cult/proc/memoize_cult_objectives(var/datum/mind/cult_mind)
/datum/game_mode/cult/proc/memorize_cult_objectives(var/datum/mind/cult_mind)
for(var/obj_count = 1,obj_count <= objectives.len,obj_count++)
var/explanation
switch(objectives[obj_count])
@@ -111,7 +117,7 @@
explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station."
if("sacrifice")
if(sacrifice_target)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (Hell blood join) and three acolytes to do so."
explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (hell blood join) and three acolytes to do so."
else
explanation = "Free objective."
if("eldergod")
@@ -189,7 +195,7 @@
/datum/game_mode/cult/add_cultist(datum/mind/cult_mind) //INHERIT
if (!..(cult_mind))
return
memoize_cult_objectives(cult_mind)
memorize_cult_objectives(cult_mind)
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1)
@@ -327,7 +333,7 @@
/datum/game_mode/cult/proc/get_unconvertables()
var/list/ucs = list()
for(var/mob/living/carbon/human/player in mob_list)
for(var/mob/living/carbon/human/player in player_list)
if(!is_convertable_to_cult(player.mind))
ucs += player.mind
return ucs
@@ -340,7 +346,7 @@
if(objectives.Find("eldergod"))
cult_fail += eldergod //1 by default, 0 if the elder god has been summoned at least once
if(objectives.Find("sacrifice"))
if(sacrifice_target && !sacrificed.Find(sacrifice_target)) //if the target has been sacrificed, ignore this step. otherwise, add 1 to cult_fail
if(sacrifice_target && !(sacrifice_target in sacrificed)) //if the target has been sacrificed, ignore this step. otherwise, add 1 to cult_fail
cult_fail++
return cult_fail //if any objectives aren't met, failure
+15 -8
View File
@@ -437,7 +437,7 @@ datum/objective/escape/escape_with_identity
target_real_name = target.current.real_name
explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing their identification card."
else
explanation_text = "Free Objective."
explanation_text = "Free Objective"
check_completion()
if(!target_real_name)
@@ -715,14 +715,15 @@ datum/objective/destroy
explanation_text = "Summon Nar-Sie via the use of an appropriate rune. It will only work if nine cultists stand on and around it."
check_completion()
if(eldergod) //global var, defined in rune4.dm
if(!eldergod) //global var, defined in rune4.dm
return 1
return 0
survivecult
var/num_cult
explanation_text = "Our knowledge must live on. Make sure at least 5 acolytes escape on the shuttle to spread their work on an another station."
var/cult_needed = 4 + round((num_players_started() / 10))
explanation_text = "Our knowledge must live on. Make sure at least [cult_needed] acolytes escape on the shuttle to spread their work on an another station."
check_completion()
if(!emergency_shuttle.returned())
@@ -736,7 +737,7 @@ datum/objective/destroy
if(iscultist(H))
cultists_escaped++
if(cultists_escaped>=5)
if(cultists_escaped >= cult_needed)
return 1
return 0
@@ -744,20 +745,26 @@ datum/objective/destroy
sacrifice //stolen from traitor target objective
proc/find_target() //I don't know how to make it work with the rune otherwise, so I'll do it via a global var, sacrifice_target, defined in rune15.dm
var/list/possible_targets = call(/datum/game_mode/cult/proc/get_unconvertables)()
var/datum/game_mode/cult/C = ticker.mode
var/list/possible_targets = C.get_unconvertables()
if(!possible_targets.len)
for(var/mob/living/carbon/human/player in player_list)
if(player.mind && !(player.mind in cult))
possible_targets += player.mind
if(possible_targets.len > 0)
sacrifice_target = pick(possible_targets)
if(sacrifice_target && sacrifice_target.current)
explanation_text = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (Hell join blood) and three acolytes to do so."
explanation_text = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune (hell join blood) and three acolytes to do so."
else
explanation_text = "Free Objective"
return sacrifice_target
check_completion() //again, calling on a global list defined in rune15.dm
if(sacrifice_target.current in sacrificed)
if(sacrifice_target in sacrificed)
return 1
else
return 0
+16 -16
View File
@@ -4,22 +4,22 @@ var/list/preferences_datums = list()
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm. THE ORDER MATTERS
//some autodetection here.
"traitor" = IS_MODE_COMPILED("traitor"), // 1 / 1
"operative" = IS_MODE_COMPILED("nuclear"), // 2 / 2
"changeling" = IS_MODE_COMPILED("changeling"), // 4 / 3
"wizard" = IS_MODE_COMPILED("wizard"), // 8 / 4
"malf AI" = IS_MODE_COMPILED("malfunction"), // 16 / 5
"revolutionary" = IS_MODE_COMPILED("revolution"), // 32 / 6
"alien" = 1, // 62 / 7
"pAI" = 1, // 128 / 8
"cultist" = IS_MODE_COMPILED("cult"), // 256 / 9
"ninja" = 1, // 512 / 10
"raider" = IS_MODE_COMPILED("heist"), // 1024 / 11
"vampire" = IS_MODE_COMPILED("vampire"), // 2048 / 12
"mutineer" = IS_MODE_COMPILED("mutiny"), // 4096 / 13
"blob" = IS_MODE_COMPILED("blob"), // 8192 / 14
"traitor" = IS_MODE_COMPILED("traitor"), // 1 / 1
"operative" = IS_MODE_COMPILED("nuclear"), // 2 / 2
"changeling" = IS_MODE_COMPILED("changeling"), // 4 / 3
"wizard" = IS_MODE_COMPILED("wizard"), // 8 / 4
"malf AI" = IS_MODE_COMPILED("malfunction"), // 16 / 5
"revolutionary" = IS_MODE_COMPILED("revolution"), // 32 / 6
"alien" = 1, // 62 / 7
"pAI" = 1, // 128 / 8
"cultist" = IS_MODE_COMPILED("cult"), // 256 / 9
"ninja" = 1, // 512 / 10
"raider" = IS_MODE_COMPILED("heist"), // 1024 / 11
"vampire" = IS_MODE_COMPILED("vampire"), // 2048 / 12
"mutineer" = IS_MODE_COMPILED("mutiny"), // 4096 / 13
"blob" = IS_MODE_COMPILED("blob"), // 8192 / 14
"shadowling" = IS_MODE_COMPILED("shadowling"), //16384 / 15
"Revenant" = 1 //32768 / 16
"revenant" = 1 //32768 / 16
)
var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles
num2text(BE_PAI) = 0,
@@ -30,6 +30,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
num2text(BE_REV) = 14,
num2text(BE_VAMPIRE) = 14,
num2text(BE_BLOB) = 14,
num2text(BE_REVENANT) = 14,
num2text(BE_OPERATIVE) = 21,
num2text(BE_CULTIST) = 21,
num2text(BE_RAIDER) = 21,
@@ -37,7 +38,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
num2text(BE_NINJA) = 21,
num2text(BE_MUTINEER) = 21,
num2text(BE_MALF) = 30,
num2text(BE_REVENANT) = 7
)
/proc/player_old_enough_antag(client/C, role)
+4 -3
View File
@@ -237,7 +237,8 @@
prefs.sound ^= SOUND_STREAMING
prefs.save_preferences(src)
usr << "You will [(prefs.sound & SOUND_STREAMING) ? "now" : "no longer"] hear streamed media."
// Restart.
if(media)
media.stop_music()
if(!media) return
if(prefs.toggles & SOUND_STREAMING)
media.update_music()
else
media.stop_music()
+1 -1
View File
@@ -109,7 +109,7 @@ function SetMusic(url, time, volume) {
// Tell the player to play something via JS.
proc/send_update()
if(!(owner.prefs.toggles & SOUND_STREAMING))
if(!(owner.prefs.toggles & SOUND_STREAMING) && url != "")
return // Nope.
MP_DEBUG("\green Sending update to WMP ([url])...")
owner << output(list2params(list(url, (world.time - start_time) / 10, volume)), "[window]:SetMusic")