Random Event Fixes (#9582)

This commit is contained in:
Guti
2024-12-09 22:57:39 +01:00
committed by GitHub
parent 6e1bc8aadf
commit dc4c515c8b
12 changed files with 56 additions and 109 deletions

View File

@@ -15,8 +15,6 @@ GLOBAL_LIST_INIT(slosh, list(
var/global/list/item_tf_spawnpoints = list() // Global variable tracking which items are item tf spawnpoints
/var/global/list/existing_metroids = list() //Global variable for tracking metroids for the event announcement. Needs to go here for load order.
//stuff that only synths can eat
var/global/list/edible_tech = list(/obj/item/cell,
/obj/item/circuitboard,

View File

@@ -9,9 +9,12 @@
Z_choices -= global.using_map.sealed_levels
// CHOMPEdit End
for(var/turf/simulated/floor/T in world)
var/area/A = T.loc
if(T.z in Z_choices)
if(!T.block_tele)
pick_turfs += T
if(A.flag_check(AREA_FORBID_EVENTS)) // CHOMPEdit - No spawning in dorms
continue
// CHOMPAdd Start - Chance to end up in a belly. Fun (:
for(var/mob/living/mob in player_list)
if(mob.can_be_drop_pred && isfloor(mob.loc))

View File

@@ -6,11 +6,6 @@
/datum/event/spider_infestation/setup()
if(prob(25)) //CHOMP Add 25% chance for the event to fail if chosen
log_debug("Spider infestation failed successfully.")
kill()
return
announceWhen = rand(announceWhen, announceWhen + 60)
spawncount = rand(4 * severity, 10 * severity) //spiderlings only have a 50% chance to grow big and strong //CHOMP Edit: old: 2/4 new: 6/14 new: 4/10
sent_spiders_to_station = 0

View File

@@ -69,7 +69,6 @@
/mob/living/simple_mob/metroid/Initialize()
nutrition = 100 //Have them start off pretty hungry still.
existing_metroids += src //Keep track of how many for the event.
add_verb(src,/mob/living/proc/ventcrawl) //CHOMPEdit TGPanel //May not do anything at the moment.
return ..()

View File

@@ -83,6 +83,7 @@
// 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),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, -20, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_ENGINEER = 40), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Infected Room", /datum/event/disease_outbreak/floor, -50, list(ASSIGNMENT_MEDICAL = 25, ASSIGNMENT_JANITOR = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
// Pure RP fun, no mechanical effects.
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, -125, list(ASSIGNMENT_AI = 80, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5), min_jobs = list(ASSIGNMENT_CYBORG = 3)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Jellyfish School", /datum/event/jellyfish_migration, 5, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1),
@@ -112,6 +113,7 @@
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
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, min_jobs = list(ASSIGNMENT_SECURITY = 2)),
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, "Disease Outbreak", /datum/event/disease_outbreak, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
// new /datum/event_meta(EVENT_LEVEL_MODERATE, "Lost Spiders", /datum/event/spider_migration, 0, list(ASSIGNMENT_SECURITY = 30), 1), //YW EDIT //CHOMPStation Edit: Moved to disabled. This is a YW feature that spawns spiders on carp spawns.
))
@@ -122,14 +124,14 @@
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Atmos Leak", /datum/event/atmos_leak, 5, list(ASSIGNMENT_ENGINEER = 35), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, -100, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_ENGINEER = 5), 1, min_jobs = list(ASSIGNMENT_SECURITY = 1)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, -110, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 1, min_jobs = list(ASSIGNMENT_SECURITY = 3)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Exotic Horde Infestation", /datum/event/highdangerinfestation, -50, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SCIENCE = 5, ASSIGNMENT_ANY = 2)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Disease Outbreak", /datum/event/disease_outbreak, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Exotic Horde Infestation", /datum/event/highdangerinfestation, -50, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SCIENCE = 5, ASSIGNMENT_ANY = 2), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Horde Infestation", /datum/event/horde_infestation, -60, list(ASSIGNMENT_SECURITY = 20, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_ANY = 3), 0),
// new /datum/event_meta(EVENT_LEVEL_MAJOR, "Infected Room", /datum/event/infectedroom, -50, list(ASSIGNMENT_MEDICAL = 25, ASSIGNMENT_JANITOR = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Infected Room", /datum/event/disease_outbreak/floor, -50, list(ASSIGNMENT_MEDICAL = 25, ASSIGNMENT_JANITOR = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Jellyfish Migration", /datum/event/jellyfish_migration, 5, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meaty Ores Wave", /datum/event/meteor_wave/meatyores, -90, list(ASSIGNMENT_ENGINEER = 50, ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_ENGINEER = 1)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, -90, list(ASSIGNMENT_ENGINEER = 50, ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_ENGINEER = 1)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spacefish Swarm", /datum/event/spacefish_migration, 10, list(ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1, min_jobs = list(ASSIGNMENT_SECURITY = 3)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spacefish Swarm", /datum/event/spacefish_migration, 10, list(ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1, min_jobs = list(ASSIGNMENT_SECURITY = 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, "Supply Demand", /datum/event/supply_demand, 0, list(ASSIGNMENT_ANY = 5, ASSIGNMENT_SCIENCE = 15, ASSIGNMENT_GARDENER = 10, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_MEDICAL = 15), 1, min_jobs = list(ASSIGNMENT_CARGO = 1)),
)

View File

@@ -5,19 +5,15 @@
var/list/vents = list()
var/spiders = FALSE
var/metroids = FALSE
var/list/alive_metroids = list()
/datum/event/horde_infestation/setup()
if(prob(25)) //CHOMP Add 25% chance for the event to fail if chosen
log_debug("Horde infestation failed successfully.")
kill()
return //The event dies here.
announceWhen = rand(announceWhen, announceWhen + 60)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) //Gathering together all possible areas to spawn mobs.
//CHOMPEdit: Added a couple areas to the exclusion.
var/in_area = get_area(temp_vent)
if(istype(in_area, /area/crew_quarters/sleep) || istype(in_area, /area/hallway/secondary/entry))
var/area/in_area = get_area(temp_vent)
if(in_area.flag_check(AREA_FORBID_EVENTS))
continue
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels)) //No spawns on welded vents
if(temp_vent.network.normal_members.len > 10) //CHOMP Edit: Most our networks are 40. SM is 4 and toxins is 2. This needed to change in order to spawn.
@@ -45,8 +41,8 @@
if(spiders)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
//CHOMPEdit: Added a couple areas to the exclusion. Also made this actually work.
var/in_area = get_area(temp_vent)
if(istype(in_area, /area/crew_quarters/sleep) || istype(in_area, /area/hallway/secondary/entry))
var/area/in_area = get_area(temp_vent)
if(in_area.flag_check(AREA_FORBID_EVENTS))
continue
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
if(temp_vent.network.normal_members.len > 10) //CHOMP Edit: Most our networks are 40. SM is 4 and toxins is 2. This needed to change to 10 from 50 in order for spawns to work.
@@ -77,7 +73,7 @@
/mob/living/simple_mob/metroid/juvenile/zeta = 2,
/mob/living/simple_mob/metroid/juvenile/omega = 1,
))
new spawn_metroids(get_turf(vent))
alive_metroids.Add(new spawn_metroids(get_turf(vent)))
vents -= vent
spawncount--
vents.Cut()
@@ -87,7 +83,7 @@
return
if(metroids)
var/list/area_names = list()
for(var/metroids in existing_metroids)
for(var/metroids in alive_metroids)
var/mob/living/M = metroids
if(!M || M.stat == DEAD)
continue
@@ -99,4 +95,4 @@
area_names |= metroid_area.name
if(area_names.len)
var/english_list = english_list(area_names)
command_announcement.Announce("Sensors have narrowed down remaining lifeforms to the followng areas: [english_list]", "Lifesign Alert")
command_announcement.Announce("Sensors have narrowed down remaining lifeforms to the following areas: [english_list]", "Lifesign Alert")

View File

@@ -1,7 +1,6 @@
/datum/event/infectedroom
/datum/event/disease_outbreak/floor
var/area/target_area
var/area/target_turfs = list()
var/datum/disease2/disease/virus = new
var/infected_tiles
var/list/excluded = list(
@@ -14,60 +13,21 @@
/area/engineering/gravgen,
/area/maintenance,
/area/medical,
/area/rnd/test_area)
var/commondisease = list(
"Friday Fever" = list(
/datum/disease2/effect/choreomania,
/datum/disease2/effect/spin,
/datum/disease2/effect/flip,
/datum/disease2/effect/scream),
"Common Cold" = list(
/datum/disease2/effect/sneeze,
/datum/disease2/effect/cough,
/datum/disease2/effect/fridge,
/datum/disease2/effect/drowsness),
"Brain Bloat" = list(
/datum/disease2/effect/invisible,
/datum/disease2/effect/headache,
/datum/disease2/effect/telepathic,
/datum/disease2/effect/nothing
),
"Glutton's Gut" = list(
/datum/disease2/effect/drool,
/datum/disease2/effect/hungry,
/datum/disease2/effect/pica,
/datum/disease2/effect/nothing
),
"Motor System Impairment" = list(
/datum/disease2/effect/twitch,
/datum/disease2/effect/jellylegs,
/datum/disease2/effect/spin,
/datum/disease2/effect/groan
/area/rnd/test_area
)
)
/datum/event/infectedroom/setup()
/datum/event/disease_outbreak/floor/setup()
. = ..()
announceWhen = rand(0, 1500)
endWhen = announceWhen + 1
var/list/area/affected_area = get_station_areas(excluded)
var/chosenvirus = pick(commondisease)
if(severity == EVENT_LEVEL_MAJOR)
if(prob(75))
virus.makerandom(rand(2,3))
else
virus.makedisease(commondisease[chosenvirus], rand(2,3), chosenvirus)
infected_tiles = rand(7, 10)
else if(severity == EVENT_LEVEL_MODERATE)
if(prob(50))
virus.makerandom(2)
else
virus.makedisease(commondisease[chosenvirus], 2, chosenvirus)
infected_tiles = rand(5, 8)
else
virus.makerandom(1)
infected_tiles = rand(3, 6)
/datum/event/disease_outbreak/floor/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard \the [location_name()]. All personnel must contain the outbreak.", "Infectious Contaminant in [target_area.name]", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/floor/start()
GLOB.current_pending_diseases += chosen_disease
var/list/area/affected_area = get_station_areas(excluded)
var/decal
for(var/i in 1 to 10)
var/area/A = pick(affected_area)
@@ -91,14 +51,14 @@
return
else
log_debug("infectedroom event: [target_area] was chosen. Infecting...")
log_admin("Infected room event started; Virus: [virus.name()]")
message_admins("Infected room event started; Virus: <a href='?src=\ref[virus];[HrefToken()];info=1'>[virus.name()]</a>")
log_admin("Infected room event started; Virus: [chosen_disease.name]")
message_admins("Infected room event started; Virus: [chosen_disease.name]")
/datum/event/infectedroom/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard \the [location_name()]. All personnel must contain the outbreak.", "Infectious Contaminant in [target_area.name]", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/infectedroom/start()
var/decal
switch(severity)
if(EVENT_LEVEL_MODERATE)
infected_tiles = rand(5, 8)
else
infected_tiles = rand(7, 10)
for(var/i in 1 to infected_tiles)
decal = rand(1, 5)
@@ -107,15 +67,12 @@
C = new(pick_n_take(target_turfs))
C.basecolor = get_random_colour(rand(0, 1))
C.update_icon()
C.virus2 |= new /datum/disease2/disease
C.virus2[1] = virus.getcopy()
C.viruses |= chosen_disease
else if(decal == 2)
var/obj/effect/decal/cleanable/vomit/V
V = new(pick_n_take(target_turfs))
V.virus2 |= new /datum/disease2/disease
V.virus2[1] = virus.getcopy()
V.viruses |= chosen_disease
else
var/obj/effect/decal/cleanable/mucus/M
M = new(pick_n_take(target_turfs))
M.virus2 |= new /datum/disease2/disease
M.virus2[1] = virus.getcopy()
M.viruses |= chosen_disease

View File

@@ -5,13 +5,9 @@
var/list/vents = list()
var/give_positions = 0
var/active_metroid_event = TRUE
var/list/alive_metroids = list()
/datum/event/metroid_infestation/setup()
if(prob(50)) //50% chance of the event to even occur if procced
active_metroid_event = FALSE
log_debug("Metroid infestation failed successfully.")
kill()
return
active_metroid_event = TRUE
announceWhen = rand(announceWhen, announceWhen + 60)
@@ -19,8 +15,8 @@
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
//CHOMPEdit: Added a couple areas to the exclusion. Also made this actually work.
var/in_area = get_area(temp_vent)
if(istype(in_area, /area/crew_quarters/sleep) || istype(in_area, /area/hallway/secondary/entry))
var/area/in_area = get_area(temp_vent)
if(in_area.flag_check(AREA_FORBID_EVENTS))
continue
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
if(temp_vent.network.normal_members.len > 10) //CHOMP Edit: Most our networks are 40. SM is 4 and toxins is 2. This needed to change in order to spawn.
@@ -40,14 +36,14 @@
/mob/living/simple_mob/metroid/juvenile/zeta = 2,
/mob/living/simple_mob/metroid/juvenile/omega = 1,
))
new spawn_metroids(get_turf(vent))
alive_metroids.Add(new spawn_metroids(get_turf(vent)))
vents -= vent
spawncount--
vents.Cut()
/datum/event/metroid_infestation/end()
var/list/area_names = list()
for(var/metroids in existing_metroids)
for(var/metroids in alive_metroids)
var/mob/living/M = metroids
if(!M || M.stat == DEAD)
continue
@@ -59,4 +55,4 @@
area_names |= metroid_area.name
if(area_names.len && active_metroid_event == TRUE)
var/english_list = english_list(area_names)
command_announcement.Announce("Sensors have narrowed down remaining lifeforms to the followng areas: [english_list]", "Lifesign Alert")
command_announcement.Announce("Sensors have narrowed down remaining lifeforms to the following areas: [english_list]", "Lifesign Alert")

View File

@@ -4,10 +4,9 @@
#define LOC_LIBRARY 3
#define LOC_HYDRO 4
#define LOC_TECH 5
#define LOC_HANGAR1 6
#define LOC_HANGAR2 7
#define LOC_HANGAR3 8
#define LOC_FIELD 9 // CHOMPEdit - More mutant places! This one might allow them to grow
#define LOC_HANGAR2 6
#define LOC_HANGAR3 7
#define LOC_FIELD 8
#define VERM_RATS 0
@@ -23,7 +22,7 @@
/datum/event/mutants/start()
location = rand(0,9) // CHOMPEdit - Bumping up to 9
location = rand(0,8)
var/list/turf/simulated/floor/turfs = list()
var/spawn_area_type
switch(location)
@@ -45,9 +44,11 @@
if(LOC_TECH)
spawn_area_type = /area/storage/tech
locstring = "technical storage"
/*
if(LOC_HANGAR1)
spawn_area_type = /area/hangar/one
locstring = "the hangar deck"
*/
if(LOC_HANGAR2)
spawn_area_type = /area/hangar/two
locstring = "the hangar deck"
@@ -96,7 +97,6 @@
#undef LOC_LIBRARY
#undef LOC_HYDRO
#undef LOC_TECH
#undef LOC_HANGAR1
#undef LOC_HANGAR2
#undef LOC_HANGAR3

View File

@@ -10,7 +10,7 @@
// #define USE_MAP_RELIC_BASE
// Debug
// #define USE_MAP_MINITEST
//#define USE_MAP_MINITEST
/*********************/
/* End Map Selection */

View File

@@ -2587,7 +2587,6 @@
#include "code\modules\events\gravity.dm"
#include "code\modules\events\grid_check.dm"
#include "code\modules\events\grubinfestation_vr.dm"
#include "code\modules\events\horde_infestation.dm"
#include "code\modules\events\ian_storm_vr.dm"
#include "code\modules\events\infestation.dm"
#include "code\modules\events\ion_storm.dm"
@@ -2596,12 +2595,10 @@
#include "code\modules\events\maintenance_predator_vr.dm"
#include "code\modules\events\meteor_strike_vr.dm"
#include "code\modules\events\meteors.dm"
#include "code\modules\events\metroid_infestation.dm"
#include "code\modules\events\money_hacker.dm"
#include "code\modules\events\money_lotto.dm"
#include "code\modules\events\money_spam.dm"
#include "code\modules\events\morph_spawn_vr.dm"
#include "code\modules\events\mutants.dm"
#include "code\modules\events\prison_break.dm"
#include "code\modules\events\radiation_storm.dm"
#include "code\modules\events\random_antagonist.dm"
@@ -4927,7 +4924,11 @@
#include "modular_chomp\code\modules\event\dangerinfestation.dm"
#include "modular_chomp\code\modules\event\event_container_ch.dm"
#include "modular_chomp\code\modules\event\heavydangerinfestation.dm"
#include "modular_chomp\code\modules\event\horde_infestation.dm"
#include "modular_chomp\code\modules\event\infectedroom.dm"
#include "modular_chomp\code\modules\event\meatyores.dm"
#include "modular_chomp\code\modules\event\metroid_infestation.dm"
#include "modular_chomp\code\modules\event\mutants.dm"
#include "modular_chomp\code\modules\exploration\bossloots.dm"
#include "modular_chomp\code\modules\exploration\lootsafe.dm"
#include "modular_chomp\code\modules\exploration\tyr_tribal_gear.dm"