Adds antag hud for traitors/changlings/abductors/abductees/ninjas

Right now, it's admin only.

Has not been tested.
This commit is contained in:
Mike Long
2016-03-05 00:52:59 -05:00
parent 5658a4d14b
commit 12f4d11f7e
9 changed files with 66 additions and 2 deletions

View File

@@ -32,3 +32,7 @@
#define ANTAG_HUD_SHADOW 10
#define ANTAG_HUD_HOG_BLUE 11
#define ANTAG_HUD_HOG_RED 12
#define ANTAG_HUD_TRAITOR 13
#define ANTAG_HUD_NINJA 14
#define ANTAG_HUD_CHANGELING 15
#define ANTAG_HUD_ABDUCTOR 16

View File

@@ -113,6 +113,7 @@
changeling = null
special_role = null
remove_antag_equip()
ticker.mode.update_changeling_icons_removed(src)
/datum/mind/proc/remove_traitor()
if(src in ticker.mode.traitors)
@@ -126,6 +127,7 @@
qdel(A.malf_picker)
special_role = null
remove_antag_equip()
ticker.mode.update_traitor_icons_removed(src)
/datum/mind/proc/remove_nukeop()
if(src in ticker.mode.syndicates)
@@ -198,6 +200,13 @@
remove_cultist()
remove_rev()
remove_gang()
ticker.mode.update_changeling_icons_removed(src)
ticker.mode.update_traitor_icons_removed(src)
ticker.mode.update_wiz_icons_removed(src)
ticker.mode.update_cult_icons_removed(src)
ticker.mode.update_rev_icons_removed(src)
gang_datum.remove_gang_hud(src)
/datum/mind/proc/show_memory(mob/recipient, window=1)
if(!recipient)
@@ -997,6 +1006,7 @@
remove_wizard()
current << "<span class='userdanger'>You have been brainwashed! You are no longer a wizard!</span>"
log_admin("[key_name(usr)] has de-wizard'ed [current].")
ticker.mode.update_wiz_icons_removed(src)
if("wizard")
if(!(src in ticker.mode.wizards))
ticker.mode.wizards += src
@@ -1005,6 +1015,7 @@
current << "<span class='boldannounce'>You are the Space Wizard!</span>"
message_admins("[key_name_admin(usr)] has wizard'ed [current].")
log_admin("[key_name(usr)] has wizard'ed [current].")
ticker.mode.update_wiz_icons_added(src)
if("lair")
current.loc = pick(wizardstart)
if("dressup")
@@ -1101,6 +1112,7 @@
current << "<span class='userdanger'>You have been brainwashed! You are no longer a traitor!</span>"
message_admins("[key_name_admin(usr)] has de-traitor'ed [current].")
log_admin("[key_name(usr)] has de-traitor'ed [current].")
ticker.mode.update_traitor_icons_removed(src)
if("traitor")
if(!(src in ticker.mode.traitors))
@@ -1112,6 +1124,7 @@
if(isAI(current))
var/mob/living/silicon/ai/A = current
ticker.mode.add_law_zero(A)
ticker.mode.update_traitor_icons_added(src)
if("autoobjectives")
ticker.mode.forge_traitor_objectives(src)
@@ -1158,12 +1171,14 @@
switch(href_list["abductor"])
if("clear")
usr << "Not implemented yet. Sorry!"
//ticker.mode.update_abductor_icons_removed(src)
if("abductor")
if(!ishuman(current))
usr << "<span class='warning'>This only works on humans!</span>"
return
make_Abductor()
log_admin("[key_name(usr)] turned [current] into abductor.")
ticker.mode.update_abductor_icons_added(src)
if("equip")
var/gear = alert("Agent or Scientist Gear","Gear","Agent","Scientist")
if(gear)
@@ -1330,6 +1345,7 @@
special_role = "Changeling"
ticker.mode.forge_changeling_objectives(src)
ticker.mode.greet_changeling(src)
ticker.mode.update_changeling_icons_added(src)
/datum/mind/proc/make_Wizard()
if(!(src in ticker.mode.wizards))

View File

@@ -97,6 +97,7 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas
changeling.special_role = "Changeling"
forge_changeling_objectives(changeling)
greet_changeling(changeling)
ticker.mode.update_changeling_icons_added(changeling)
..()
return
@@ -500,3 +501,13 @@ var/list/slot2type = list("head" = /obj/item/clothing/head/changeling, "wear_mas
newprofile.underwear = underwear
newprofile.undershirt = undershirt
newprofile.socks = socks
/datum/game_mode/proc/update_changeling_icons_added(datum/mind/changling_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_CHANGELING]
hud.join_hud(changling_mind.current)
set_antag_hud(changling_mind.current, "changling")
/datum/game_mode/proc/update_changeling_icons_removed(datum/mind/changling_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_CHANGELING]
hud.leave_hud(changling_mind.current)
set_antag_hud(changling_mind.current, null)

View File

@@ -342,6 +342,16 @@
return 0
return 0
/datum/game_mode/proc/update_abductor_icons_added(datum/mind/alien_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_ABDUCTOR]
hud.join_hud(alien_mind.current)
set_antag_hud(alien_mind.current, ((alien_mind in abductors) ? "abductor" : "abductee"))
/datum/game_mode/proc/update_abductor_icons_removed(datum/mind/alien_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_ABDUCTOR]
hud.leave_hud(alien_mind.current)
set_antag_hud(alien_mind.current, null)
/datum/objective/abductee
dangerrating = 5
completed = 1

View File

@@ -164,6 +164,7 @@
for(var/datum/objective/objective in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
ticker.mode.update_abductor_icons_added(H.mind)
for(var/obj/item/organ/internal/gland/G in H.internal_organs)
G.Start()

View File

@@ -306,7 +306,7 @@ Made by Xhuis
shadow_hud.join_hud(shadow_mind.current)
set_antag_hud(shadow_mind.current, ((shadow_mind in shadows) ? "shadowling" : "thrall"))
/datum/game_mode/proc/update_shadow_icons_removed(datum/mind/shadow_mind) //This should never actually occur, but it's here anyway.
/datum/game_mode/proc/update_shadow_icons_removed(datum/mind/shadow_mind)
var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW]
shadow_hud.leave_hud(shadow_mind.current)
set_antag_hud(shadow_mind.current, null)

View File

@@ -206,6 +206,7 @@
add_law_zero(traitor.current)
else
equip_traitor(traitor.current)
ticker.mode.update_traitor_icons_added(traitor)
return
@@ -373,3 +374,14 @@
where = "In your [equipped_slot]"
mob << "<BR><BR><span class='info'>[where] is a folder containing <b>secret documents</b> that another Syndicate group wants. We have set up a meeting with one of their agents on station to make an exchange. Exercise extreme caution as they cannot be trusted and may be hostile.</span><BR>"
mob.update_icons()
/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
traitorhud.join_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, "traitor")
/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind)
var/datum/atom_hud/antag/traitorhud = huds[ANTAG_HUD_TRAITOR]
traitorhud.leave_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, null)

View File

@@ -158,7 +158,7 @@ Contents:
return
Ninja << sound('sound/effects/ninja_greeting.ogg') //so ninja you probably wouldn't even know if you were made one
ticker.mode.update_ninja_icons_added(Mind)
success_spawn = 1
@@ -213,3 +213,13 @@ Contents:
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src)
E.implant(src)
return 1
/datum/game_mode/proc/update_ninja_icons_added(var/mob/living/carbon/human/ninja)
var/datum/atom_hud/antag/ninjahud = huds[ANTAG_HUD_TRAITOR]
ninjahud.join_hud(ninja)
set_antag_hud(ninja, "traitor")
/datum/game_mode/proc/update_ninja_icons_removed(datum/mind/ninja_mind)
var/datum/atom_hud/antag/ninjahud = huds[ANTAG_HUD_NINJA]
ninjahud.leave_hud(ninja_mind.current)
set_antag_hud(ninja_mind.current, null)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB