Gamemode refactor, lots of code shuffles, PR will have details.

This commit is contained in:
Zuhayr
2015-03-14 23:01:51 +10:30
parent cd0bf9622d
commit 98da191ac3
147 changed files with 5751 additions and 11965 deletions

View File

@@ -445,50 +445,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/player_key = G_found.key
//Now for special roles and equipment.
switch(new_character.mind.special_role)
if("traitor")
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
ticker.mode.equip_traitor(new_character)
if("Wizard")
new_character.loc = pick(wizardstart)
//ticker.mode.learn_basic_spells(new_character)
ticker.mode.equip_wizard(new_character)
if("Mercenary")
var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
if(synd_spawn)
new_character.loc = get_turf(synd_spawn)
call(/datum/game_mode/proc/equip_syndicate)(new_character)
if("Ninja")
new_character.equip_space_ninja()
if(ninjastart.len == 0)
new_character << "<B>\red A proper starting location for you could not be found, please report this bug!</B>"
new_character << "<B>\red Attempting to place at a carpspawn.</B>"
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "carpspawn")
ninjastart.Add(L)
if(ninjastart.len == 0 && latejoin.len > 0)
new_character << "<B>\red Still no spawneable locations could be found. Defaulting to latejoin.</B>"
new_character.loc = pick(latejoin)
else if (ninjastart.len == 0)
new_character << "<B>\red Still no spawneable locations could be found. Aborting.</B>"
if("Death Commando")//Leaves them at late-join spawn.
new_character.equip_death_commando()
new_character.internal = new_character.s_store
new_character.internals.icon_state = "internal1"
else//They may also be a cyborg or AI.
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(new_character.mind.special_role=="traitor")
call(/datum/game_mode/proc/add_law_zero)(new_character)
if("AI")
new_character = new_character.AIize()
if(new_character.mind.special_role=="traitor")
call(/datum/game_mode/proc/add_law_zero)(new_character)
//Add aliens.
else
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
var/datum/antagonist/antag_data = get_antag_data(new_character.mind.special_role)
if(antag_data)
antag_data.add_antagonist(new_character.mind)
antag_data.place_mob(new_character)
else
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.