Random Event Tweaks: Preparing for the Overhauls (#10367)

This commit is contained in:
JohnWildkins
2020-10-30 07:16:53 -04:00
committed by GitHub
parent 4ea177d63e
commit 886c07ac2d
13 changed files with 177 additions and 17 deletions

View File

@@ -22,6 +22,7 @@
/datum/event/blob/tick()
if(!Blob || !Blob.loc)
Blob = null
end()
kill()
return
if(IsMultiple(activeFor, 3))

View File

@@ -143,6 +143,8 @@
if(!dummy && isRunning)
end()
var/datum/event_container/killed_ec = SSevents.event_containers[severity]
killed_ec.start_event()
isRunning = 0
endedAt = world.time

View File

@@ -7,6 +7,7 @@
#define ASSIGNMENT_MEDICAL "Medical"
#define ASSIGNMENT_SCIENTIST "Scientist"
#define ASSIGNMENT_SECURITY "Security"
#define ASSIGNMENT_SURGEON "Surgeon"
var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major")
@@ -129,7 +130,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
// Severity level, event name, even type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 120),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "APC Damage", /datum/event/apc_damage, 20, list(ASSIGNMENT_ENGINEER = 15)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence", /datum/event/brand_intelligence, 15, list(ASSIGNMENT_JANITOR = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence", /datum/event/brand_intelligence, 0, list(ASSIGNMENT_ENGINEER = 5), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
@@ -143,30 +144,31 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Supply Drop", /datum/event/supply_drop, 80),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Golem Rune", /datum/event/supply_drop/golem, 20),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "CCIA General Notice", /datum/event/ccia_general_notice, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane Vermin Infestation",/datum/event/infestation, 60, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 15))
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane Vermin Infestation",/datum/event/infestation, 60, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 15)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Visitor", /datum/event/visitor, 50, is_one_shot = TRUE)
)
/datum/event_container/moderate
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 200),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 60),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 50, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_SURGEON = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 25, list(ASSIGNMENT_SECURITY = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 100),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 50, list(ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_JANITOR = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 100),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 80),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 45, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 6, ASSIGNMENT_SCIENTIST = 6)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave/shower, 40, list(ASSIGNMENT_ENGINEER = 13)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 15, ASSIGNMENT_CYBORG = 20),1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Containment Error - Xenobiology", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENTIST = 15, ASSIGNMENT_CYBORG = 20),1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Containment Error - Bridge", /datum/event/prison_break/bridge, 0, list(ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_CYBORG = 20),1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 100),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 100, list(ASSIGNMENT_MEDICAL = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 0, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 1),0,10,125, list("Extended")),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Spider Infestation", /datum/event/spider_infestation/moderate, 50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Vermin Infestation", /datum/event/infestation/moderate, 30, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 5))
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 15, list(ASSIGNMENT_SECURITY = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Spider Infestation", /datum/event/spider_infestation/moderate, 50, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Vermin Infestation", /datum/event/infestation/moderate, 30, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15, ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rescue Pod", /datum/event/rescue_pod, 50, list(ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_SECURITY = 2), is_one_shot = TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Burglar Pod", /datum/event/rescue_pod/burglar, 50, list(ASSIGNMENT_SECURITY = 5), is_one_shot = TRUE, excluded_roundtypes = list("Extended"))
)
/datum/event_container/major
@@ -191,3 +193,4 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
#undef ASSIGNMENT_MEDICAL
#undef ASSIGNMENT_SCIENTIST
#undef ASSIGNMENT_SECURITY
#undef ASSIGNMENT_SURGEON

View File

@@ -123,6 +123,7 @@ var/list/event_last_fired = list()
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
active_with_role["Surgeon"] = 0
active_with_role["Security"] = 0
active_with_role["Scientist"] = 0
active_with_role["AI"] = 0
@@ -151,6 +152,8 @@ var/list/event_last_fired = list()
if(M.mind.assigned_role in medical_positions)
active_with_role["Medical"]++
if(M.mind.assigned_role == "Surgeon")
active_with_role["Surgeon"]++
if(M.mind.assigned_role in security_positions)
active_with_role["Security"]++

View File

@@ -31,6 +31,7 @@
var/fake_allowed = 0
while (!fake_allowed)
if (E)
E.end()
E.kill()
qdel(E)
E = null
@@ -46,5 +47,6 @@
two_part = 1
E.start()
E.end()
E.kill()
E.announce()

View File

@@ -0,0 +1,31 @@
/datum/event/rescue_pod
no_fake = 1
var/spawner_name = "rescuepodsurv"
var/datum/ghostspawner/human/rescuepodsurv/spawner
/datum/event/rescue_pod/announce()
if(prob(66))
command_announcement.Announce("The NDV Icarus reports an escape pod inbound to the [station_name()]. Investigate and attend to the situation in accordance with NanoTrasen corporate regulations.", new_title="NDV Icarus", new_sound='sound/AI/escapepod.ogg')
/datum/event/rescue_pod/setup()
for(var/datum/event/E in typesof(src))
if(is_type_in_list(E, SSevents.finished_events))
kill()
return
spawner = SSghostroles.get_spawner(spawner_name)
/datum/event/rescue_pod/start()
if(istype(spawner))
spawner.enable()
/datum/event/rescue_pod/burglar
no_fake = 1
spawner_name = "burglarpod"
/datum/event/rescue_pod/burglar/announce()
if(prob(33)) // Make a silent drop more likely since they're spooky burglar
..()
/datum/event/rescue_pod/burglar/start()
if(istype(spawner))
spawner.enable()

View File

@@ -0,0 +1,10 @@
/datum/event/visitor
no_fake = 1
var/datum/ghostspawner/human/visitor/spawner
/datum/event/visitor/setup()
spawner = SSghostroles.get_spawner("visitor")
/datum/event/visitor/start()
if(istype(spawner))
spawner.enable()