Merge pull request #5752 from Markolie/antaghud

AntagHUD fixes
This commit is contained in:
Fox McCloud
2016-10-10 20:24:42 -04:00
committed by GitHub
8 changed files with 101 additions and 29 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
changeling_mind.current.remove_changeling_powers()
changeling_mind.memory = ""
changeling_mind.special_role = null
if(issilicon(changeling_mind))
if(issilicon(changeling_mind.current))
to_chat(changeling_mind.current, "<span class='userdanger'>You have been robotized!</span>")
to_chat(changeling_mind.current, "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>")
else
@@ -119,6 +119,7 @@
equip_common(H,team_number)
equip_agent(H,team_number)
greet_agent(agent,team_number)
update_abductor_icons_added(agent)
scientist = scientists[team_number]
H = scientist.current
@@ -132,6 +133,8 @@
equip_common(H,team_number)
equip_scientist(H,team_number)
greet_scientist(scientist,team_number)
update_abductor_icons_added(scientist)
return ..()
//Used for create antag buttons
@@ -165,7 +168,7 @@
equip_common(H,team_number)
equip_agent(H,team_number)
greet_agent(agent,team_number)
update_abductor_icons_added(agent)
scientist = scientists[team_number]
H = scientist.current
@@ -179,6 +182,7 @@
equip_common(H,team_number)
equip_scientist(H,team_number)
greet_scientist(scientist,team_number)
update_abductor_icons_added(scientist)
/datum/abductor //stores abductor's team and whether they're a scientist or agent; since species datums are global, we have to use this, instead.
@@ -337,6 +341,17 @@
else
return 0
return 0
/datum/game_mode/proc/remove_abductor(datum/mind/abductor_mind)
if(abductor_mind in abductors)
ticker.mode.abductors -= abductor_mind
abductor_mind.special_role = null
abductor_mind.current.attack_log += "\[[time_stamp()]\] <span class='danger'>No longer abductor</span>"
if(issilicon(abductor_mind.current))
to_chat(abductor_mind.current, "<span class='userdanger'>You have been turned into a robot! You are no longer an abductor.</span>")
else
to_chat(abductor_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer an abductor.</span>")
ticker.mode.update_abductor_icons_added(abductor_mind)
/datum/game_mode/proc/update_abductor_icons_added(datum/mind/alien_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_ABDUCTOR]
+13 -1
View File
@@ -57,7 +57,19 @@ proc/issyndicate(mob/living/M as mob)
/datum/game_mode/nuclear/pre_setup()
return 1
/datum/game_mode/proc/remove_operative(datum/mind/operative_mind)
if(operative_mind in syndicates)
ticker.mode.syndicates -= operative_mind
operative_mind.special_role = null
for(var/datum/objective/nuclear/O in operative_mind.objectives)
operative_mind.objectives -= O
operative_mind.current.attack_log += "\[[time_stamp()]\] <span class='danger'>No longer nuclear operative</span>"
if(issilicon(operative_mind.current))
to_chat(operative_mind.current, "<span class='userdanger'>You have been turned into a robot! You are no longer a Syndicate operative.</span>")
else
to_chat(operative_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer a Syndicate operative.</span>")
ticker.mode.update_synd_icons_removed(operative_mind)
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
+32 -17
View File
@@ -63,6 +63,7 @@
/datum/game_mode/traitor/post_setup()
for(var/datum/mind/traitor in traitors)
forge_traitor_objectives(traitor)
update_traitor_icons_added(traitor)
spawn(rand(10,100))
finalize_traitor(traitor)
greet_traitor(traitor)
@@ -345,9 +346,19 @@
to_chat(traitor_mob, "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them.")
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
/datum/game_mode/proc/remove_traitor(datum/mind/traitor_mind)
if(traitor_mind in traitors)
ticker.mode.traitors -= traitor_mind
traitor_mind.special_role = null
traitor_mind.current.attack_log += "\[[time_stamp()]\] <span class='danger'>De-traitored</span>"
if(issilicon(traitor_mind.current))
to_chat(traitor_mind.current, "<span class='userdanger'>You have been turned into a robot! You are no longer a traitor.</span>")
else
to_chat(traitor_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer a traitor.</span>")
ticker.mode.update_traitor_icons_removed(traitor_mind)
/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
//var/ref = "\ref[traitor_mind]"
tatorhud.join_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, "hudsyndicate")
@@ -358,23 +369,27 @@
/datum/game_mode/proc/remove_traitor_mind(datum/mind/traitor_mind, datum/mind/head)
//var/list/removal
var/ref = "\ref[head]"
if(ref in implanter)
implanter[ref] -= traitor_mind
implanted -= traitor_mind
traitors -= traitor_mind
if(traitor_mind.som)
var/datum/mindslaves/slaved = traitor_mind.som
slaved.serv -= traitor_mind
traitor_mind.special_role = null
traitor_mind.som = null
slaved.leave_serv_hud(traitor_mind)
for(var/datum/objective/protect/mindslave/MS in traitor_mind.objectives)
traitor_mind.objectives -= MS
if(traitor_mind in implanted)
//var/list/removal
var/ref = "\ref[head]"
if(ref in implanter)
implanter[ref] -= traitor_mind
implanted -= traitor_mind
traitors -= traitor_mind
if(traitor_mind.som)
var/datum/mindslaves/slaved = traitor_mind.som
slaved.serv -= traitor_mind
traitor_mind.special_role = null
traitor_mind.som = null
slaved.leave_serv_hud(traitor_mind)
for(var/datum/objective/protect/mindslave/MS in traitor_mind.objectives)
traitor_mind.objectives -= MS
update_traitor_icons_removed(traitor_mind)
to_chat(traitor_mind.current, "<span class='userdanger'>You are no longer a mindslave; you have complete and free control of your own faculties, once more!</span>")
update_traitor_icons_removed(traitor_mind)
if(issilicon(traitor_mind.current))
to_chat(traitor_mind.current, "<span class='userdanger'>You have been turned into a robot! You are no longer a mindslave.</span>")
else
to_chat(traitor_mind.current, "<span class='userdanger'>You are no longer a mindslave: you have complete and free control of your own faculties, once more!</span>")
/datum/game_mode/proc/assign_exchange_role(var/datum/mind/owner)
//set faction
+16
View File
@@ -325,6 +325,22 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
else if(istype(p, /datum/vampire_passive))
var/datum/vampire_passive/power = p
to_chat(owner, "<span class='notice'>[power.gain_desc]</span>")
/datum/game_mode/proc/remove_vampire(datum/mind/vampire_mind)
if(vampire_mind in vampires)
ticker.mode.vampires -= vampire_mind
vampire_mind.special_role = null
vampire_mind.current.attack_log += "\[[time_stamp()]\] <span class='danger'>De-vampired</span>"
if(vampire_mind.vampire)
vampire_mind.vampire.remove_vampire_powers()
qdel(vampire_mind.vampire)
vampire_mind.vampire = null
if(issilicon(vampire_mind.current))
to_chat(vampire_mind.current, "<span class='userdanger'>You have been turned into a robot! You can feel your powers fading away...</span>")
else
to_chat(vampire_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer a vampire.</span>")
ticker.mode.update_vampire_icons_removed(vampire_mind)
//prepare for copypaste
/datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind)
+14 -1
View File
@@ -54,7 +54,20 @@
update_wiz_icons_added(wizard)
..()
/datum/game_mode/proc/remove_wizard(datum/mind/wizard_mind)
if(wizard_mind in wizards)
ticker.mode.wizards -= wizard_mind
wizard_mind.special_role = null
wizard_mind.current.attack_log += "\[[time_stamp()]\] <span class='danger'>De-wizarded</span>"
wizard_mind.current.spellremove(wizard_mind.current)
wizard_mind.current.faction = list("Station")
if(issilicon(wizard_mind.current))
to_chat(wizard_mind.current, "<span class='userdanger'>You have been turned into a robot! You can feel your magical powers fading away...</span>")
else
to_chat(wizard_mind.current, "<span class='userdanger'>You have been brainwashed! You are no longer a wizard.</span>")
ticker.mode.update_wiz_icons_removed(wizard_mind)
/datum/game_mode/proc/update_wiz_icons_added(datum/mind/wiz_mind)
var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ]
wizhud.join_hud(wiz_mind.current)
+9 -2
View File
@@ -1,8 +1,15 @@
/mob/living/silicon/Login()
sleeping = 0
if(mind && ticker && ticker.mode)
ticker.mode.remove_cultist(mind, 1)
ticker.mode.remove_traitor(mind)
ticker.mode.remove_traitor_mind(mind)
ticker.mode.remove_revolutionary(mind, 1)
ticker.mode.remove_thrall(mind,0)
ticker.mode.remove_cultist(mind, 1)
ticker.mode.remove_wizard(mind)
ticker.mode.remove_changeling(mind)
ticker.mode.remove_vampire(mind)
ticker.mode.remove_thrall(mind, 0)
ticker.mode.remove_operative(mind)
ticker.mode.remove_shadowling(mind)
ticker.mode.remove_abductor(mind)
..()
@@ -4,9 +4,3 @@
client.hotkeytype = "Cyborg"
regenerate_icons()
show_laws(0)
if(mind) ticker.mode.remove_cultist(mind)
if(mind) ticker.mode.remove_revolutionary(mind)
if(mind) ticker.mode.remove_thrall(mind,0)
if(mind) ticker.mode.remove_shadowling(mind)
if(mind) ticker.mode.remove_changeling(mind)
return