-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
space_dragon.dm
50 lines (45 loc) · 2.32 KB
/
space_dragon.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/datum/traitor_objective/final/space_dragon
name = "Find a Space Carp and mutate their DNA with your own using a DNA harvester we will drop pod at %AREA%"
description = "Go to %AREA%, and recieve the Carp DNA scanner. Use it on any Space Carp to harvest its DNA. \
From there, use it on yourself, to mutate your own DNA with it and become a Space Dragon. \
Don't worry about finding one, I'm sure there'll have a wave of carp right when you need it."
///Area type the objective owner must be in to recieve the DNA extractor.
var/area/dna_scanner_spawnarea_type
///Whether the DNA extraction kit was sent already.
var/recieved_dna_scanner = FALSE
/datum/traitor_objective/final/space_dragon/on_objective_taken(mob/user)
. = ..()
var/datum/round_event/carp_migration/carp_event = locate(/datum/round_event_control/carp_migration) in SSevents.control
carp_event.start()
/datum/traitor_objective/final/space_dragon/generate_objective(datum/mind/generating_for, list/possible_duplicates)
if(!can_take_final_objective())
return
var/list/possible_areas = GLOB.the_station_areas.Copy()
for(var/area/possible_area as anything in possible_areas)
//remove areas too close to the destination, too obvious for our poor shmuck, or just unfair
if(istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security))
possible_areas -= possible_area
dna_scanner_spawnarea_type = pick(possible_areas)
replace_in_name("%AREA%", initial(dna_scanner_spawnarea_type.name))
return TRUE
/datum/traitor_objective/final/space_dragon/generate_ui_buttons(mob/user)
var/list/buttons = list()
if(!recieved_dna_scanner)
buttons += add_ui_button("", "Pressing this will call down a pod with the DNA extraction kit.", "biohazard", "carp_dna")
return buttons
/datum/traitor_objective/final/space_dragon/ui_perform_action(mob/living/user, action)
. = ..()
switch(action)
if("carp_dna")
if(recieved_dna_scanner)
return
var/area/delivery_area = get_area(user)
if(delivery_area.type != dna_scanner_spawnarea_type)
to_chat(user, span_warning("You must be in [initial(dna_scanner_spawnarea_type.name)] to recieve the DNA extraction kit."))
return
recieved_dna_scanner = TRUE
podspawn(list(
"target" = get_turf(user),
"style" = STYLE_SYNDICATE,
"spawn" = /obj/item/storage/box/syndie_kit/space_dragon,
))