special_role/objective refactor

Refactored most instances of special_role setting/checking to use new
SPECIAL_ROLE_X defines in code/__DEFINES/gamemode.dm

Removed relative pathing from objective.dm and split large if statements
into multiple, plus a bunch of styling fixes

Refactored every instance of `istype(ticker.mode` into a GAMEMODE_IS_X
define in code/__DEFINES/gamemode.dm. Done primarily for when someone gets
around to making gamemode code less AWFUL
This commit is contained in:
Tigercat2000
2016-08-01 21:29:19 -07:00
parent 0bb08d49c8
commit 9f3cdb43f7
58 changed files with 745 additions and 2154 deletions
+2 -2
View File
@@ -2374,7 +2374,7 @@
if(is_special_character(H)) continue
//traitorize(H, objective, 0)
ticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
H.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
@@ -2384,7 +2384,7 @@
ticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in player_list)
ticker.mode.traitors += A.mind
A.mind.special_role = "traitor"
A.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/objective/new_objective = new
new_objective.owner = A
new_objective.explanation_text = objective