Adds new event: drone drop pod

This commit is contained in:
Heroman
2020-01-11 16:02:12 +10:00
parent e6e7098d30
commit 47086d7bf0
5 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/datum/event/drone_pod_drop
announceWhen = 1
var/turf/land_target = null
var/attempt_amount = 10
/datum/event/drone_pod_drop/setup()
startWhen = rand(8,15)
if(LAZYLEN(using_map.meteor_strike_areas))
var/turf/potential_target = null
for(var/i=1, i <= attempt_amount, i++)
potential_target = pick(get_area_turfs(pick(using_map.meteor_strike_areas)))
if(potential_target.x < 7 || potential_target.x > world.maxx-7 || potential_target.y < 7 || potential_target.y > world.maxy-7)
continue
else
land_target = potential_target
break
if(!land_target)
kill()
/datum/event/meteor_strike/announce()
command_announcement.Announce("An unidentified drone pod has been detected landing near the surface facilty. Open and examine at your own risk.", "NanoTrasen Orbital Monitoring")
/datum/event/drone_pod_drop/start()
if(istype(land_target, /turf/simulated/open))
while(istype(land_target, /turf/simulated/open))
land_target = GetBelow(land_target)
if(!land_target)
kill()
new /datum/random_map/droppod/supply(null, land_target.x-2, land_target.y-2, land_target.z, supplied_drops = list(/obj/structure/ghost_pod/manual/lost_drone))

View File

@@ -81,6 +81,7 @@
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 30, list(ASSIGNMENT_SECURITY = 30), 1),
//Evil grubs that drain station power slightly
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, 0, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_ENGINEER = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Drone Pod Drop", /datum/event/drone_pod_drop, 10, list(ASSIGNMENT_SCIENTIST = 40), 1)
)
add_disabled_events(list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 30), 1),