-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathanomaly.dm
58 lines (46 loc) · 1.85 KB
/
anomaly.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
51
52
53
54
55
56
57
/datum/round_event_control/anomaly
name = "Anomaly: Energetic Flux"
typepath = /datum/round_event/anomaly
min_players = 1
max_occurrences = 0 //This one probably shouldn't occur! It'd work, but it wouldn't be very fun.
weight = 15
description = "This anomaly shocks and explodes. This is the base type."
admin_setup = list(/datum/event_admin_setup/set_location/anomaly)
track = EVENT_TRACK_MODERATE
tags = list(TAG_DESTRUCTIVE, TAG_MAGICAL)
event_group = /datum/event_group/anomalies
/datum/round_event/anomaly
start_when = ANOMALY_START_HARMFUL_TIME
announce_when = ANOMALY_ANNOUNCE_HARMFUL_TIME
var/area/impact_area
var/datum/anomaly_placer/placer = new()
var/obj/effect/anomaly/anomaly_path = /obj/effect/anomaly/flux/explosion
///The admin-chosen spawn location.
var/turf/spawn_location
/datum/round_event/anomaly/setup()
if(spawn_location)
impact_area = get_area(spawn_location)
else
impact_area = placer.findValidArea()
setup = TRUE //MONKESTATION ADDITION
/datum/round_event/anomaly/announce(fake)
priority_announce("Energetic flux wave detected on [ANOMALY_ANNOUNCE_DANGEROUS_TEXT] [impact_area.name].", "Anomaly Alert")
/datum/round_event/anomaly/start()
var/turf/anomaly_turf
if(spawn_location)
anomaly_turf = spawn_location
else
anomaly_turf = placer.findValidTurf(impact_area)
var/newAnomaly
if(anomaly_turf)
newAnomaly = new anomaly_path(anomaly_turf)
if (newAnomaly)
apply_anomaly_properties(newAnomaly)
announce_to_ghosts(newAnomaly)
/// Make any further post-creation modifications to the anomaly
/datum/round_event/anomaly/proc/apply_anomaly_properties(obj/effect/anomaly/new_anomaly)
return
/datum/event_admin_setup/set_location/anomaly
input_text = "Spawn anomaly at your current location?"
/datum/event_admin_setup/set_location/anomaly/apply_to_event(datum/round_event/anomaly/event)
event.spawn_location = chosen_turf