Reflection hell

This commit is contained in:
4DPlanner
2017-06-01 22:34:19 +01:00
parent 78cb889cad
commit 53b341d1b4
6 changed files with 337 additions and 181 deletions
+3 -1
View File
@@ -338,11 +338,13 @@
if(!(istype(H, /mob/living/carbon/human)||istype(H, /mob/living/silicon/))) continue
if(H.stat == 2 || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
var/datum/antagonist/traitor/traitordatum = H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
traitordatum.add_objective(new_objective)
traitordatum.equip(FALSE)
traitordatum.greet()
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]</span>")
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
-4
View File
@@ -399,12 +399,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(new_character.mind.assigned_role)
if("Cyborg")//More rigging to make em' work and check if they're traitor.
new_character = new_character.Robotize()
if(traitordatum)
traitordatum.add_law_zero(new_character)
if("AI")
new_character = new_character.AIize()
if(traitordatum)
traitordatum.add_law_zero(new_character)
else
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.