/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 category = EVENT_CATEGORY_ANOMALIES description = "This anomaly shocks and explodes. This is the base type." admin_setup = list(/datum/event_admin_setup/set_location/anomaly) /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 ///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() /datum/round_event/anomaly/announce(fake) if(isnull(impact_area)) impact_area = placer.findValidArea() priority_announce("Energetic flux wave detected on [ANOMALY_ANNOUNCE_DANGEROUS_TEXT] [impact_area.name].", "Anomaly Alert", ANNOUNCER_ANOMALIES) //SKYRAT EDIT CHANGE - ORIGINAL: 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 = make_anomaly(anomaly_turf) if (newAnomaly) apply_anomaly_properties(newAnomaly) announce_to_ghosts(newAnomaly) /datum/round_event/anomaly/proc/make_anomaly(turf/anomaly_turf) return new anomaly_path(anomaly_turf) /// 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