From ea9180169b8820141eb795efff1c1f2f85102624 Mon Sep 17 00:00:00 2001 From: Razgriz1032 Date: Sun, 16 Jun 2019 22:08:19 -0700 Subject: [PATCH] Rebalanced Station Events Security-related events are now more likely to occur when security is online. I also added two new defines for Head of Security and Warden, and gave them additional weight for said events because they have access to the armory. Also tweaked meteor event for engineers so that the moderate and major events have a small chance of occuring with even just one engineer on station. --- code/modules/events/event_container_vr.dm | 32 ++++++++++++----------- code/modules/events/event_dynamic.dm | 7 +++++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/code/modules/events/event_container_vr.dm b/code/modules/events/event_container_vr.dm index b69e3753a1..8244528370 100644 --- a/code/modules/events/event_container_vr.dm +++ b/code/modules/events/event_container_vr.dm @@ -7,6 +7,8 @@ #define ASSIGNMENT_MEDICAL "Medical" #define ASSIGNMENT_SCIENTIST "Scientist" #define ASSIGNMENT_SECURITY "Security" +#define ASSIGNMENT_HOS "Head of Security" +#define ASSIGNMENT_WARDEN "Warden" // // VOREStation overrides to the default event manager configuration. @@ -36,7 +38,7 @@ new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Canister Leak", /datum/event/canister_leak, 10, list(ASSIGNMENT_ENGINEER = 20)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Electrified Door", /datum/event/electrified_door, -5, list(ASSIGNMENT_MEDICAL = 5, ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_AI = 10)), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 30), 1), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Meteor Shower", /datum/event/meteor_wave, -15, list(ASSIGNMENT_ENGINEER = 5), 1), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Shipping Error", /datum/event/shipping_error , 30, list(ASSIGNMENT_ANY = 2), 0), @@ -62,31 +64,32 @@ new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 30), 1), // Leaks gas into an unoccupied room. new /datum/event_meta(EVENT_LEVEL_MODERATE, "Atmos Leak", /datum/event/atmos_leak, 150, list(ASSIGNMENT_ENGINEER = 25), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_AI = 40)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_AI = 40)), // Just disables comms for a short while. new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120), 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, -50, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SECURITY = 30), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, -20, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 30, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 5), 1), // Just blows out a few lights new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150), 1), // This one is just too fun. + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Escaped Slimes", /datum/event/escaped_slimes, -60, list(ASSIGNMENT_SCIENTIST = 40, ASSIGNMENT_SECURITY = 30)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 75, list(ASSIGNMENT_ENGINEER = 60), 1), // Temporary power failure, but mitigatead by subgrids new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 0, list(ASSIGNMENT_SCIENTIST = 10, ASSIGNMENT_ENGINEER = 25), 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 = 50, ASSIGNMENT_ENGINEER = 50), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, -20, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_ENGINEER = 50), 1), // Pure RP fun, no mechanical effects. new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, -50, list(ASSIGNMENT_AI = 200, ASSIGNMENT_CYBORG = 100, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5), 0), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, -15, list(ASSIGNMENT_ENGINEER = 5), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, -10, list(ASSIGNMENT_ENGINEER = 15), 1), //New CHOMPStation event. Mice grow into rats. - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mutants", /datum/event/mutants, 0, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 50), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mutants", /datum/event/mutants, 20, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 50), 1), // Opens doors in brig. So just RP fun new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, -50, list(ASSIGNMENT_SECURITY = 30, ASSIGNMENT_ENGINEER = 50), 1), // Not bad (dorms are shielded) but inconvenient new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, -50, list(ASSIGNMENT_SECURITY = 60)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, -30, list(ASSIGNMENT_SECURITY = 25, ASSIGNMENT_HOS = 35, ASSIGNMENT_WARDEN = 15)), // Radiation, but only in space. new /datum/event_meta(EVENT_LEVEL_MODERATE, "Solar Storm", /datum/event/solar_storm, 50, list(ASSIGNMENT_ENGINEER = 40, ASSIGNMENT_SECURITY = 30), 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, -60, list(ASSIGNMENT_SECURITY = 40), 0), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, -45, list(ASSIGNMENT_SECURITY = 30, ASSIGNMENT_HOS = 20, ASSIGNMENT_WARDEN = 10), 0), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, -40, list(ASSIGNMENT_MEDICAL = 50), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, -50, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_ENGINEER = 50), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50), 1), @@ -100,21 +103,21 @@ new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation_NoRequirements", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 40), 0), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Supply Demand", /datum/event/supply_demand, 0, list(ASSIGNMENT_ANY = 5, ASSIGNMENT_SCIENCE = 15, ASSIGNMENT_GARDENER = 10, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_MEDICAL = 15), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 3, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Escaped Slimes", /datum/event/escaped_slimes, -60, list(ASSIGNMENT_SCIENTIST = 40, ASSIGNMENT_SECURITY = 30)), )) /datum/event_container/major/New() available_events = list( new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 900), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Atmos Leak", /datum/event/atmos_leak, 30, list(ASSIGNMENT_ENGINEER = 25), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, -25, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_ENGINEER = 5), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, -30, list(ASSIGNMENT_SECURITY = 10), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Atmos Leak", /datum/event/atmos_leak, 10, list(ASSIGNMENT_ENGINEER = 25), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, -20, list(ASSIGNMENT_HOS = 15, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_SECURITY = 5, ASSIGNMENT_ENGINEER = 5), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, -30, list(ASSIGNMENT_SECURITY = 20, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 5), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station,0, list(ASSIGNMENT_ANY = 5), 0), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Escaped Slimes", /datum/event/escaped_slimes, -15, list(ASSIGNMENT_SCIENTIST = 10, ASSIGNMENT_SECURITY = 5), 0), // TFF: Virgo event commented out. Technically meant for Tether maps, not Polaris. - // new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Strike", /datum/event/meteor_strike, 10, list(ASSIGNMENT_ENGINEER = 15), 1), + // new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Strike", /datum/event/meteor_strike, 10, list(ASSIGNMENT_ENGINEER = 15), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, -30, list(ASSIGNMENT_ENGINEER = 10), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 20, list(ASSIGNMENT_ENGINEER = 15), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation", /datum/event/spider_infestation, -25, list(ASSIGNMENT_SECURITY = 10), 0), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation", /datum/event/spider_infestation, -25, list(ASSIGNMENT_SECURITY = 15, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 5), 0), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, -30, list(ASSIGNMENT_MEDICAL = 10), 1), ) add_disabled_events(list( @@ -125,7 +128,6 @@ new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation_NoRequirements", /datum/event/spider_infestation, 30, list(ASSIGNMENT_SECURITY = 10), 0), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Supply Demand", /datum/event/supply_demand, 0, list(ASSIGNMENT_ANY = 5, ASSIGNMENT_SCIENCE = 15, ASSIGNMENT_GARDENER = 10, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_MEDICAL = 15), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection_NoRequirements", /datum/event/viral_infection, 50, list(ASSIGNMENT_MEDICAL = 50), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Escaped Slimes", /datum/event/escaped_slimes, -25, list(ASSIGNMENT_SCIENTIST = 10, ASSIGNMENT_SECURITY = 5), 0), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 30), 0), )) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 6a09d21008..bf5ca4fe3d 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -189,6 +189,7 @@ var/list/event_last_fired = list() active_with_role["Cyborg"] = 0 active_with_role["Janitor"] = 0 active_with_role["Gardener"] = 0 + active_with_role["HOS"] = 0 for(var/mob/M in player_list) if(!M.mind || !M.client || M.client.is_afk(10 MINUTES)) // longer than 10 minutes AFK counts them as inactive @@ -231,5 +232,11 @@ var/list/event_last_fired = list() if(M.mind.assigned_role == "Gardener") active_with_role["Gardener"]++ + + if(M.mind.assigned_role == "Head of Security") + active_with_role["Head of Security"]++ + + if(M.mind.assigned_role == "Warden") + active_with_role["Warden"]++ return active_with_role