mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-26 01:11:54 +00:00
Merge pull request #338 from ZomgPonies/master
Rev Bugs and Adding Latejoin Heads to target list
This commit is contained in:
@@ -110,6 +110,47 @@
|
||||
checkwin_counter = 0
|
||||
return 0
|
||||
|
||||
/proc/get_rev_mode()
|
||||
if(!ticker || !istype(ticker.mode, /datum/game_mode/revolution))
|
||||
return null
|
||||
|
||||
/**
|
||||
* LateSpawn hook.
|
||||
* Called in newplayer.dm when a humanoid character joins the round after it started.
|
||||
* Parameters: var/mob/living/carbon/human, var/rank
|
||||
*/
|
||||
/hook/latespawn/proc/add_latejoiner_heads(var/mob/living/carbon/human/H)
|
||||
var/datum/game_mode/revolution/mode = get_rev_mode()
|
||||
if (!mode) return 1
|
||||
|
||||
var/list/heads = list()
|
||||
var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative")
|
||||
|
||||
if(H.stat!=2 && H.mind && (H.mind.assigned_role in command_positions))
|
||||
heads += H
|
||||
|
||||
if(mode.extra_heads)
|
||||
if(H.stat!=2 && H.mind && (H.mind.assigned_role in alt_positions))
|
||||
heads += H
|
||||
|
||||
for(var/datum/mind/rev_mind in mode.head_revolutionaries)
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = head_mind
|
||||
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]."
|
||||
|
||||
for(var/datum/mind/rev_mind in mode.revolutionaries)
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = head_mind
|
||||
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]."
|
||||
|
||||
|
||||
/datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind)
|
||||
var/list/heads = get_living_heads()
|
||||
|
||||
@@ -455,6 +455,16 @@
|
||||
dat += "<td>[mob_loc.loc]</td></tr>"
|
||||
else
|
||||
dat += "<tr><td><i>Head not found!</i></td></tr>"
|
||||
if(ticker.mode.num_players_started() >= 30)
|
||||
for(var/datum/mind/N in ticker.mode.get_extra_living_heads())
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
|
||||
var/turf/mob_loc = get_turf_loc(M)
|
||||
dat += "<td>[mob_loc.loc]</td></tr>"
|
||||
else
|
||||
dat += "<tr><td><i>Head not found!</i></td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
if(ticker.mode.name == "nations")
|
||||
|
||||
Reference in New Issue
Block a user