mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Adds an antag hud system for wizards.
The huds won't be activated when there's just one wizard, but when another magic user is brought in the huds will appear for both of them to allow for easy identification in the face of rampant mindswaps and/or identity shinanagans and/or getting turned into a cow by a staff of change. The huds are on by default in ragin' mages.
This commit is contained in:
@@ -24,3 +24,4 @@
|
||||
#define ANTAG_HUD_OPS 7
|
||||
#define ANTAG_HUD_GANG_A 8
|
||||
#define ANTAG_HUD_GANG_B 9
|
||||
#define ANTAG_HUD_WIZ 10
|
||||
@@ -11,6 +11,7 @@ var/datum/atom_hud/huds = list( \
|
||||
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_GANG_A = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_GANG_B = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
|
||||
)
|
||||
|
||||
/datum/atom_hud
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
src.used = 1
|
||||
var/client/C = pick(candidates)
|
||||
spawn_antag(C, get_turf(H.loc), href_list["school"])
|
||||
if(H.mind)
|
||||
ticker.mode.update_wiz_icons_added(H.mind)
|
||||
else
|
||||
H << "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later."
|
||||
|
||||
@@ -103,6 +105,7 @@
|
||||
M.mind.objectives += new_objective
|
||||
ticker.mode.traitors += M.mind
|
||||
M.mind.special_role = "apprentice"
|
||||
ticker.mode.update_wiz_icons_added(M.mind)
|
||||
M << sound('sound/effects/magic.ogg')
|
||||
|
||||
/obj/item/weapon/antag_spawner/contract/equip_antag(mob/target as mob)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "ragin' mages"
|
||||
config_tag = "raginmages"
|
||||
required_players = 20
|
||||
use_huds = 1
|
||||
var/max_mages = 0
|
||||
var/making_mage = 0
|
||||
var/mages_made = 1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
pre_setup_before_jobs = 1
|
||||
|
||||
var/use_huds = 0
|
||||
var/finished = 0
|
||||
|
||||
/datum/game_mode/wizard/announce()
|
||||
@@ -40,6 +40,8 @@
|
||||
equip_wizard(wizard.current)
|
||||
name_wizard(wizard.current)
|
||||
greet_wizard(wizard)
|
||||
if(use_huds)
|
||||
update_wiz_icons_added(wizard)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -275,3 +277,15 @@ Made a proc so this is not repeated 14 (or more) times.*/
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/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)
|
||||
set_antag_hud(wiz_mind.current, ((wiz_mind in wizards) ? "wizard" : "apprentice"))
|
||||
|
||||
|
||||
/datum/game_mode/proc/update_wiz_icons_removed(datum/mind/wiz_mind)
|
||||
var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ]
|
||||
wizhud.leave_hud(wiz_mind.current)
|
||||
set_antag_hud(wiz_mind.current, null)
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
protect_objective.target = W.mind
|
||||
protect_objective.explanation_text = "Protect [W.real_name], the wizard."
|
||||
I.mind.objectives += protect_objective
|
||||
ticker.mode.update_wiz_icons_added(I.mind)
|
||||
|
||||
I.attack_log += "\[[time_stamp()]\] <font color='red'>Is an imposter!</font>"
|
||||
I << "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.6 KiB |
Reference in New Issue
Block a user