mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Reverts Bubberstation/Bubberstation#4760 This was merged way too quickly in like 2 hours. So I'm going to revert it. I am also reopening #4753 which should be merged after this revert is merged. 🆑 del: Reverts the 30 pop minimum for Lone Operative /🆑
41 lines
1.8 KiB
Plaintext
41 lines
1.8 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
|
|
category = EVENT_CATEGORY_INVASION
|
|
description = "A single nuclear operative assaults the station."
|
|
|
|
/datum/round_event_control/operative/can_spawn_event(players_amt, allow_magic)
|
|
return ..() && SSdynamic.antag_events_enabled
|
|
|
|
/datum/round_event/ghost_role/operative
|
|
minimum_required = 1
|
|
role_name = "lone operative"
|
|
fakeable = FALSE
|
|
|
|
/datum/round_event/ghost_role/operative/spawn_role()
|
|
var/mob/chosen_one = SSpolling.poll_ghost_candidates(check_jobban = ROLE_OPERATIVE, role = ROLE_LONE_OPERATIVE, alert_pic = /obj/machinery/nuclearbomb, amount_to_pick = 1)
|
|
if(isnull(chosen_one))
|
|
return NOT_ENOUGH_PLAYERS
|
|
var/spawn_location = find_space_spawn()
|
|
if(isnull(spawn_location))
|
|
return MAP_ERROR
|
|
var/mob/living/carbon/human/operative = new(spawn_location)
|
|
operative.randomize_human_appearance(~RANDOMIZE_SPECIES)
|
|
operative.dna.update_dna_identity()
|
|
var/datum/mind/Mind = new /datum/mind(chosen_one.key)
|
|
Mind.set_assigned_role(SSjob.get_job_type(/datum/job/lone_operative))
|
|
Mind.active = TRUE
|
|
Mind.transfer_to(operative)
|
|
if(!operative.client?.prefs.read_preference(/datum/preference/toggle/nuke_ops_species))
|
|
var/species_type = operative.client.prefs.read_preference(/datum/preference/choiced/species)
|
|
operative.set_species(species_type) //Apply the preferred species to our freshly-made body.
|
|
|
|
Mind.add_antag_datum(/datum/antagonist/nukeop/lone)
|
|
|
|
message_admins("[ADMIN_LOOKUPFLW(operative)] has been made into lone operative by an event.")
|
|
operative.log_message("was spawned as a lone operative by an event.", LOG_GAME)
|
|
spawned_mobs += operative
|
|
return SUCCESSFUL_SPAWN
|