-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathstray_meteor_event.dm
45 lines (39 loc) · 1.8 KB
/
stray_meteor_event.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
/datum/round_event_control/stray_meteor
name = "Stray Meteor"
typepath = /datum/round_event/stray_meteor
weight = 15 //Number subject to change based on how often meteors actually collide with the station
min_players = 15
max_occurrences = 3
earliest_start = 20 MINUTES
description = "Throw a random meteor somewhere near the station."
min_wizard_trigger_potency = 3
max_wizard_trigger_potency = 7
admin_setup = list(/datum/event_admin_setup/listed_options/stray_meteor)
map_flags = EVENT_SPACE_ONLY
track = EVENT_TRACK_MODERATE
tags = list(TAG_DESTRUCTIVE, TAG_SPACE, TAG_EXTERNAL)
event_group = /datum/event_group/debris
/datum/round_event/stray_meteor
announce_when = 1
fakeable = FALSE //Already faked by meteors that miss
///The selected meteor type if chosen through admin setup.
var/chosen_meteor
/datum/round_event/stray_meteor/start()
if(chosen_meteor)
var/list/chosen_meteor_list = list()
chosen_meteor_list[chosen_meteor] = 1
spawn_meteor(chosen_meteor_list)
else
spawn_meteor(GLOB.meteors_stray)
/datum/round_event/stray_meteor/announce(fake)
if(GLOB.meteor_list)
var/obj/effect/meteor/detected_meteor = pick(GLOB.meteor_list) //If we accidentally pick a meteor not spawned by the event, we're still technically not wrong
var/sensor_name = detected_meteor.signature
priority_announce("Our [sensor_name] sensors have detected an incoming signature approaching [GLOB.station_name]. Please brace for impact.", "Meteor Alert")
/datum/event_admin_setup/listed_options/stray_meteor
input_text = "Select a meteor type?"
normal_run_option = "Random Meteor"
/datum/event_admin_setup/listed_options/stray_meteor/get_list()
return subtypesof(/obj/effect/meteor)
/datum/event_admin_setup/listed_options/stray_meteor/apply_to_event(datum/round_event/stray_meteor/event)
event.chosen_meteor = chosen