Antag Panel / Check antagonists Refactor (#34236)

* Antag Panel & Friends Refactor

* Prettfying

* Removes abduction also blob from default configs.

* Ninja fixes

* Ninjafix

* First draft of the new check_antags

* I love coding without compiler

* Yes

* Fixes

* Check_antags part  2

* Fixes and cleanup

* Okay should be good now.

* Adds simple no move & no tc syndie for events

* Integrates toggle objective pr

* Why i even bother.

* Offer mob shows all antags

* Some minor visual stuff

* Proper name for the helper
This commit is contained in:
AnturK
2018-01-19 09:43:23 -05:00
committed by Jordan Brown
parent f12c3c0283
commit e38e6b8fa4
63 changed files with 1218 additions and 1431 deletions
+7 -28
View File
@@ -28,7 +28,6 @@ Contents:
/datum/round_event/ghost_role/ninja/setup()
helping_station = rand(0,1)
/datum/round_event/ghost_role/ninja/kill()
if(!success_spawn && control)
control.occurrences--
@@ -57,22 +56,21 @@ Contents:
var/key = selected_candidate.key
//Prepare ninja player mind
var/datum/mind/Mind = create_ninja_mind(key)
var/datum/mind/Mind = new /datum/mind(key)
Mind.assigned_role = "Space Ninja"
Mind.special_role = "Space Ninja"
Mind.active = 1
//generate objectives - You'll generally get 6 objectives (Ninja is meant to be hardmode!)
//spawn the ninja and assign the candidate
var/mob/living/carbon/human/Ninja = create_space_ninja(spawn_loc)
Mind.transfer_to(Ninja)
var/datum/antagonist/ninja/ninjadatum = add_ninja(Ninja)
ninjadatum.equip_space_ninja()
var/datum/antagonist/ninja/ninjadatum = new
ninjadatum.helping_station = pick(TRUE,FALSE)
Mind.add_antag_datum(ninjadatum)
if(Ninja.mind != Mind) //something has gone wrong!
throw EXCEPTION("Ninja created with incorrect mind")
SSticker.mode.update_ninja_icons_added(Ninja)
spawned_mobs += Ninja
message_admins("[key_name_admin(Ninja)] has been made into a ninja by an event.")
log_game("[key_name(Ninja)] was spawned as a ninja by an event.")
@@ -88,23 +86,4 @@ Contents:
A.real_name = "[pick(GLOB.ninja_titles)] [pick(GLOB.ninja_names)]"
A.copy_to(new_ninja)
new_ninja.dna.update_dna_identity()
return new_ninja
/proc/create_ninja_mind(key)
var/datum/mind/Mind = new /datum/mind(key)
Mind.assigned_role = "Space Ninja"
Mind.special_role = "Space Ninja"
SSticker.mode.traitors |= Mind //Adds them to current traitor list. TODO : Remove this in admin tools refeactor.
return Mind
/datum/game_mode/proc/update_ninja_icons_added(var/mob/living/carbon/human/ninja)
var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA]
ninjahud.join_hud(ninja)
set_antag_hud(ninja, "ninja")
/datum/game_mode/proc/update_ninja_icons_removed(datum/mind/ninja_mind)
var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA]
ninjahud.leave_hud(ninja_mind.current)
set_antag_hud(ninja_mind.current, null)
return new_ninja