Files
Yogstation/code/modules/events/nightmare.dm
AnturK 3d813853b5 Roundend report refactor (#33246)
* Roundend report refactor

* I won't be fixining every moved part but here you go

* Preparation for feedback

* Fixup

* First draft of feedback (wip)

* Simple version of feedback for custom objectives/explanation texts

* Debug verb removal

* Fixes & show again action button

* Admin objective handling

* Fix and first step of css standarization.

* Every time

* More css

* Fix

* Fixes, abductee datum, css tweak

* Feedback and css fix

* CLIENT DETAILS DATUM + CLIENT ACTIONS + spilled css fix

* Integrates clockult badcode

* Fix

* Fix lists in assoc feedback

* Unified antagonists and teams feedbacks, bumped up antagonists version

* Adds chat link to reopen the the report

* Fixes some clockcult stuff, passes antag name to feedback

* review stuff

* fix

* Adds some missing spacing

* Roundend corners, has css gone too far.

* Spacing between same antags

* Changeling and traitor objectives now have same spacing

* Wizar report typo fix

* Wrap brother team.

* Also move it to more relevant file

* Fixes cult summon objective

* Fixes roundend report for full-round observers

* Fixes wizard with apprentices roundend report

* Tutorial scarabs don't show in roundend anymore, adds some check_ticks

* Prettier station goals

* Merges roundend delay things

* Spread the lag around

* Fixes relogin qdeling eminence

* ckey -> key
2017-12-11 11:57:20 -05:00

45 lines
1.4 KiB
Plaintext

/datum/round_event_control/nightmare
name = "Spawn Nightmare"
typepath = /datum/round_event/ghost_role/nightmare
max_occurrences = 1
min_players = 20
/datum/round_event/ghost_role/nightmare
minimum_required = 1
role_name = "nightmare"
fakeable = FALSE
/datum/round_event/ghost_role/nightmare/spawn_role()
var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/selected = pick(candidates)
var/datum/mind/player_mind = new /datum/mind(selected.key)
player_mind.active = TRUE
var/list/spawn_locs = list()
for(var/X in GLOB.xeno_spawn)
var/turf/T = X
var/light_amount = T.get_lumcount()
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
spawn_locs += T
if(!spawn_locs.len)
message_admins("No valid spawn locations found, aborting...")
return MAP_ERROR
var/mob/living/carbon/human/S = new ((pick(spawn_locs)))
player_mind.transfer_to(S)
player_mind.assigned_role = "Nightmare"
player_mind.special_role = "Nightmare"
SSticker.mode.traitors += player_mind
player_mind.add_antag_datum(/datum/antagonist/auto_custom)
S.set_species(/datum/species/shadow/nightmare)
playsound(S, 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
message_admins("[key_name_admin(S)] has been made into a Nightmare by an event.")
log_game("[key_name(S)] was spawned as a Nightmare by an event.")
spawned_mobs += S
return SUCCESSFUL_SPAWN