Re-added latespawn.

Used in autotraitor and RP-revolution.
This commit is contained in:
cib
2013-05-18 11:06:19 +02:00
parent 0da9a4538e
commit 48b78ea758
4 changed files with 24 additions and 6 deletions

View File

@@ -142,7 +142,7 @@
traitorcheckloop()
/*
/datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character)
..()
if(emergency_shuttle.departed)
@@ -192,6 +192,5 @@
//message_admins("New traitor roll failed. No new traitor.")
//else
//message_admins("Late Joiner does not have Be Syndicate")
*/

View File

@@ -279,6 +279,7 @@ Implants;
if(player.client.prefs.be_special & role)
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
log_debug("[player.key] had [roletext] enabled, so drafting them.")
if(restricted_jobs)
for(var/datum/mind/player in candidates)
@@ -306,6 +307,7 @@ Implants;
applicant = pick(drafted)
if(applicant)
candidates += applicant
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
drafted.Remove(applicant)
else // Not enough scrubs, ABORT ABORT ABORT
@@ -331,7 +333,7 @@ Implants;
if(applicant)
candidates += applicant
drafted.Remove(applicant)
message_admins("[applicant.key] drafted into antagonist role against their preferences.")
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
else // Not enough scrubs, ABORT ABORT ABORT
break
@@ -340,9 +342,10 @@ Implants;
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
/*
/datum/game_mode/proc/latespawn(var/mob)
/*
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
if(player.preferences.be_special & role)
return 1

View File

@@ -57,7 +57,7 @@
var/datum/objective/mutiny/rp/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate or capture [head_mind.name], the [head_mind.assigned_role]."
rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
update_rev_icons_added(rev_mind)
@@ -210,4 +210,18 @@
message_admins("Unable to add new heads of revolution.")
tried_to_add_revheads = world.time + 6000 // wait 10 minutes
return ..()
return ..()
/datum/game_mode/revolution/rp_revolution/latespawn(mob/M)
if(M.mind.assigned_role in command_positions)
log_debug("Adding head kill/capture/convert objective for [M.name]")
heads += M
for(var/datum/mind/rev_mind in head_revolutionaries)
var/datum/objective/mutiny/rp/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = M.mind
rev_obj.explanation_text = "Assassinate, convert or capture [M.name], the [M.mind.assigned_role]."
rev_mind.objectives += rev_obj
rev_mind.current << "\red A new Head of Staff, [M.name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."

View File

@@ -277,6 +277,8 @@
character.loc = pick(latejoin)
character.lastarea = get_area(loc)
ticker.mode.latespawn(character)
//ticker.mode.latespawn(character)
if(character.mind.assigned_role != "Cyborg")