Files
Bubberstation/code/modules/events/wizard/imposter.dm
Patrick Chieppe 2c8248575a Logging system refactor and improvement (#39521)
* Refactor several log lines to use datum_info_line and atom_loc_line

* Add default return strings from datum_info_line and atom_loc_line

* Add parentheses around atom_loc_line data

* Change more logs to use atom_loc_line

* Add check in atom_loc_line for turfs to avoid calling get_turf on them

* Re-add removed 'at'

* Replace datum_info_line with key_name and atom_loc_line with loc_name

* Refactor logging functions

* Avoid double-logging self-interactions

* Fallback to simple stringification if all else fails in key_name()

* Rewrite muscle spasm logging to use log_message

* Standardize logging of martial arts

* Tweak individual logging panel look

* Fix individual logging panel source

* When I typed || I really meant &&

* Fix Telecomms logging always showing client logs in the panel

* Reverts addition of buggy ownership log to panel

* Remove colon

* Fix missing log_directed_talk tag

* Add warning for missing type in log_direted_talk

* Change warnings to stack_traces

* Add square brackets around fallthrough key_name() case to help parsing

* Allow atom arguments/src in log_*() functions

* Change log_combat call with null argument to log_message

* Change mecha types' log_message() arguments to match atom and mob version

* Add key_name() case for atoms

* Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it

* Fix log_globally logic

* Add logging for hitting objects with items

* Move log_combat() to atoms.dm

* Use utility functions for object stringification in log_combat()

* Use utility functions for object stringification in log_combat()

* Add missing logs for interacting with display cases

* Rewrite log_combat() comment

* Add missing space in log_combat()

* Add logging for hitting grilles barehanded

* Add missing ..()
2018-08-12 21:41:09 +02:00

41 lines
1.4 KiB
Plaintext

/datum/round_event_control/wizard/imposter //Mirror Mania
name = "Imposter Wizard"
weight = 1
typepath = /datum/round_event/wizard/imposter
max_occurrences = 1
earliest_start = 0 MINUTES
/datum/round_event/wizard/imposter/start()
for(var/datum/mind/M in SSticker.mode.wizards)
if(!ishuman(M.current))
continue
var/mob/living/carbon/human/W = M.current
var/list/candidates = pollGhostCandidates("Would you like to be an imposter wizard?", ROLE_WIZARD)
if(!candidates)
return //Sad Trombone
var/mob/dead/observer/C = pick(candidates)
new /obj/effect/particle_effect/smoke(W.loc)
var/mob/living/carbon/human/I = new /mob/living/carbon/human(W.loc)
W.dna.transfer_identity(I, transfer_SE=1)
I.real_name = I.dna.real_name
I.name = I.dna.real_name
I.updateappearance(mutcolor_update=1)
I.domutcheck()
I.key = C.key
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
if(!master.wiz_team)
master.create_wiz_team()
var/datum/antagonist/wizard/apprentice/imposter/imposter = new()
imposter.master = M
imposter.wiz_team = master.wiz_team
master.wiz_team.add_member(imposter)
I.mind.add_antag_datum(imposter)
//Remove if possible
SSticker.mode.apprentices += I.mind
I.mind.special_role = "imposter"
//
I.log_message("is an imposter!", LOG_ATTACK, color="red") //?
SEND_SOUND(I, sound('sound/effects/magic.ogg'))