[MIRROR] Apprentice fixes (#3533)

* Apprentice fixes (#31880)

* Fixes apprentices summoning for non-wizards

* Fixes admin antaghud not showing for solo wizards

* Apprentice fixes
This commit is contained in:
CitadelStationBot
2017-10-21 03:44:21 -05:00
committed by Poojawa
parent 139f7451da
commit 0ad6e36727
2 changed files with 14 additions and 10 deletions
+2 -3
View File
@@ -157,8 +157,7 @@
/datum/antagonist/wizard/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
if(wiz_team) //Don't bother with the icon if you're solo wizard
update_wiz_icons_added(M)
update_wiz_icons_added(M, wiz_team ? TRUE : FALSE) //Don't bother showing the icon if you're solo wizard
M.faction |= "wizard"
/datum/antagonist/wizard/remove_innate_effects(mob/living/mob_override)
@@ -250,7 +249,7 @@
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null))
/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz)
/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz,join = TRUE)
var/datum/atom_hud/antag/wizhud = GLOB.huds[ANTAG_HUD_WIZ]
wizhud.join_hud(wiz)
set_antag_hud(wiz, hud_version)
+12 -7
View File
@@ -67,20 +67,25 @@
else
to_chat(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.")
/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/wizard)
/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/user)
new /obj/effect/particle_effect/smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
var/datum/mind/app_mind = M.mind
var/datum/antagonist/wizard/master_antag = wizard.has_antag_datum(/datum/antagonist/wizard)
if(!master_antag.wiz_team)
master_antag.create_wiz_team()
var/datum/antagonist/wizard/apprentice/app = new(app_mind)
app.wiz_team = master_antag.wiz_team
app.master = wizard
app.master = user
app.school = school
master_antag.wiz_team.add_member(app_mind)
var/datum/antagonist/wizard/master_wizard = user.has_antag_datum(/datum/antagonist/wizard)
if(master_wizard)
if(!master_wizard.wiz_team)
master_wizard.create_wiz_team()
app.wiz_team = master_wizard.wiz_team
master_wizard.wiz_team.add_member(app_mind)
app_mind.add_antag_datum(app)
//TODO Kill these if possible
app_mind.assigned_role = "Apprentice"