Files
Bubberstation/code/modules/events/operative.dm
Mothblocks 5a4c87a9fc tgui Preferences Menu + total rewrite of the preferences backend (#61313)
About The Pull Request

Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.

Splits game preferences into its own window.

Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.

This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.

Fixes #60823
Fixes #28907
Fixes #44887
Fixes #59912
Fixes #58458
Fixes #59181
Major TODOs

Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc

    A lot of specialized testing so that people's real data don't get corrupted

Changelog

cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
2021-09-15 10:11:11 +12:00

39 lines
1.4 KiB
Plaintext

/datum/round_event_control/operative
name = "Lone Operative"
typepath = /datum/round_event/ghost_role/operative
weight = 0 //its weight is relative to how much stationary and neglected the nuke disk is. See nuclearbomb.dm. Shouldn't be dynamic hijackable.
max_occurrences = 1
/datum/round_event/ghost_role/operative
minimum_required = 1
role_name = "lone operative"
fakeable = FALSE
/datum/round_event/ghost_role/operative/spawn_role()
var/list/candidates = get_candidates(ROLE_OPERATIVE, ROLE_LONE_OPERATIVE)
if(!candidates.len)
return NOT_ENOUGH_PLAYERS
var/mob/dead/selected = pick_n_take(candidates)
var/list/spawn_locs = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
spawn_locs += L.loc
if(!spawn_locs.len)
return MAP_ERROR
var/mob/living/carbon/human/operative = new(pick(spawn_locs))
operative.randomize_human_appearance(~RANDOMIZE_SPECIES)
operative.dna.update_dna_identity()
var/datum/mind/Mind = new /datum/mind(selected.key)
Mind.set_assigned_role(SSjob.GetJobType(/datum/job/lone_operative))
Mind.special_role = ROLE_LONE_OPERATIVE
Mind.active = TRUE
Mind.transfer_to(operative)
Mind.add_antag_datum(/datum/antagonist/nukeop/lone)
message_admins("[ADMIN_LOOKUPFLW(operative)] has been made into lone operative by an event.")
log_game("[key_name(operative)] was spawned as a lone operative by an event.")
spawned_mobs += operative
return SUCCESSFUL_SPAWN