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
+1 -1
View File
@@ -468,7 +468,7 @@
dat += "<tr><td><i>Head not found!</i></td></tr>"
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/blob))
if(GAMEMODE_IS_BLOB)
var/datum/game_mode/blob/mode = ticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
dat += "<tr><td><i>Progress: [blobs.len]/[mode.blobwincount]</i></td></tr>"
+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
+1 -1
View File
@@ -92,7 +92,7 @@ var/global/sent_honksquad = 0
//Creates mind stuff.
new_honksquad.mind_initialize()
new_honksquad.mind.assigned_role = "MODE"
new_honksquad.mind.special_role = "HONKsquad"
new_honksquad.mind.special_role = SPECIAL_ROLE_HONKSQUAD
ticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list.
new_honksquad.equip_honksquad(honk_leader_selected)
return new_honksquad
+1 -1
View File
@@ -426,7 +426,7 @@ client/proc/one_click_antag()
//Creates mind stuff.
new_syndicate_commando.mind_initialize()
new_syndicate_commando.mind.assigned_role = "MODE"
new_syndicate_commando.mind.special_role = "Syndicate Commando"
new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
//Adds them to current traitor list. Which is really the extra antagonist list.
ticker.mode.traitors += new_syndicate_commando.mind
+1 -1
View File
@@ -15,7 +15,7 @@
A.copy_to(H)
ticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
H.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/objective/hijack/hijack_objective = new
hijack_objective.owner = H.mind
+1 -1
View File
@@ -115,7 +115,7 @@ var/global/sent_strike_team = 0
//Creates mind stuff.
new_commando.mind_initialize()
new_commando.mind.assigned_role = "MODE"
new_commando.mind.special_role = "Death Commando"
new_commando.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
new_commando.equip_death_commando(leader_selected)
return new_commando
@@ -118,7 +118,7 @@ var/global/sent_syndicate_strike_team = 0
//Creates mind stuff.
new_syndicate_commando.mind_initialize()
new_syndicate_commando.mind.assigned_role = "MODE"
new_syndicate_commando.mind.special_role = "Syndicate Commando"
new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD
ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list.
new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
qdel(spawn_location)
-15
View File
@@ -59,21 +59,6 @@ var/global/vox_tick = 1
W.registered_user = src
equip_to_slot_or_del(W, slot_wear_id)
/*
var/obj/item/weapon/implant/cortical/I = new(src)
I.imp_in = src
I.implanted = 1
if(ticker.mode && ( istype(ticker.mode,/datum/game_mode/vox/heist) ) )
var/datum/game_mode/vox/heist/M = ticker.mode
M.cortical_stacks += I
M.raiders[mind] = I
else if(ticker.mode && ( istype(ticker.mode,/datum/game_mode/vox/trade) ) )
var/datum/game_mode/vox/trade/M = ticker.mode
M.cortical_stacks += I
M.traders[mind] = I
*/
vox_tick++
if(vox_tick > 4) vox_tick = 1