removed unused event files, added some new events from unused ones, restructured/tweaked some event procs

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-10 21:11:47 +10:00
parent fb25d2f24a
commit 4500be323c
41 changed files with 627 additions and 4520 deletions

View File

@@ -0,0 +1,12 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)

View File

@@ -0,0 +1,191 @@
/*
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
//and also to stop spawn copying variables from the game ticker
spawn(3000)
while(1)
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")*/
if(!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events)
hadevent = event()
else
Holiday_Random_Event()
else
event = 0
sleep(2400)
*/
//Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
return
var/minutes_passed = world.time/600
var/list/active_with_role = number_active_with_role()
//var/engineer_count = number_active_with_role("Engineer")
//var/security_count = number_active_with_role("Security")
//var/medical_count = number_active_with_role("Medical")
//var/AI_count = number_active_with_role("AI")
//var/janitor_count = number_active_with_role("Janitor")
// Maps event names to event chances
// For each chance, 100 represents "normal likelihood", anything below 100 is "reduced likelihood", anything above 100 is "increased likelihood"
var/list/possibleEvents = list()
// Check for additional possible events
possibleEvents[/datum/event/economic_event] = 100 //see Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
if(active_with_role["AI"] > 0 || active_with_role["Cyborg"] > 0)
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
if(active_with_role["Janitor"] > 0)
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"]
if(active_with_role["Engineer"] > 0 && minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/meteor_wave] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/grid_check] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 25
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 50
if(active_with_role["Security"] > 0)
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(!sent_spiders_to_station)
possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5
if(!sent_aliens_to_station)
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
var/picked_event = pickweight(possibleEvents)
if(!picked_event)
return
//The event will add itself to the MC's event list
//and start working via the constructor.
new picked_event
//moved this to proc/check_event()
/*var/chance = possibleEvents[picked_event]
var/base_chance = 0.4
switch(player_list.len)
if(5 to 10)
base_chance = 0.6
if(11 to 15)
base_chance = 0.7
if(16 to 20)
base_chance = 0.8
if(21 to 25)
base_chance = 0.9
if(26 to 30)
base_chance = 1.0
if(30 to 100000)
base_chance = 1.1
// Trigger the event based on how likely it currently is.
if(!prob(chance * eventchance * base_chance / 100))
return 0*/
/*switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave(10)
spawn_meteors()
spawn(700)
meteor_wave(10)
spawn_meteors()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
if("Radiation")
high_radiation_event()
if("Virus")
viral_outbreak()
if("Alien")
alien_infestation()
if("Prison Break")
prison_break()
if("Carp")
carp_migration()
if("Lights")
lightsout(1,2)
if("Appendicitis")
appendicitis()
if("Ion Storm")
IonStorm()
if("Spacevine")
spacevine_infestation()
if("Communications")
communications_blackout()
if("Grid Check")
grid_check()
if("Meteor")
meteor_shower()*/
return 1
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
// with a specific role.
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
/proc/number_active_with_role(role)
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
active_with_role["Security"] = 0
active_with_role["Scientist"] = 0
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
for(var/mob/M in player_list)
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
switch(role)
if("Engineer")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
active_with_role["Engineer"]++
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
active_with_role["Engineer"]++
if("Medical")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
active_with_role["Medical"]++
if("Security")
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
active_with_role["Security"]++
if(M.mind.assigned_role in security_positions)
active_with_role["Security"]++
if("Scientist")
if(M.mind.assigned_role in list("Research Director", "Scientist"))
active_with_role["Scientist"]++
if("AI")
if(M.mind.assigned_role == "AI")
active_with_role["AI"]++
if("Cyborg")
if(M.mind.assigned_role == "Cyborg")
active_with_role["Cyborg"]++
if("Janitor")
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
return active_with_role

View File

@@ -0,0 +1,19 @@
/datum/event/grid_check //NOTE: Times are measured in master controller ticks!
startWhen = 5
/datum/event/grid_check/setup()
endWhen = rand(90,600)
/datum/event/grid_check/start()
power_failure(1)
/datum/event/grid_check/announce()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
/datum/event/grid_check/end()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
power_restore()

View File

@@ -0,0 +1,216 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/ionstorm
var/botEmagChance = 0.5
var/list/players = list()
/datum/event/ionstorm/announce()
endWhen = rand(500, 1500)
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
for (var/mob/living/carbon/human/player in world)
if(player.client)
players += player.real_name
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
laws |= list( "The station needs elected officials." )
laws |= list( "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
laws |= list( "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
laws |= list( "The Singularity is tasty, tasty taffy." )
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
if(target.mind.special_role == "traitor")
continue
target << "\red <b>You have detected a change in your laws information:</b>"
target << law
target.add_ion_law(law)
/datum/event/ionstorm/tick()
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
/datum/event/ionstorm/end()
spawn(rand(5000,8000))
if(prob(50))
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
/*
/proc/IonStorm(botEmagChance = 10)
/*Deuryn's current project, notes here for those who care.
Revamping the random laws so they don't suck.
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
*/
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew
var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in player_list)
pos_crew += pos.real_name
if(pos_crew.len)
crew = pick(pos_crew)
else
crew = "Any Human"
switch(rand(1,14))
if(1)
M << "<br>"
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "<br>"
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "<br>"
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "<br>"
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M << "<br>"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "<br>"
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "<br>"
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "<br>"
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "<br>"
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "<br>"
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "<br>"
M << "\red [crew] is [target]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [target]")
if(11)
M << "<br>"
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "<br>"
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "<br>"
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [allergysev] to [allergy]")
if(14)
M << "<br>"
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
*/
/*
var/apcnum = 0
var/smesnum = 0
var/airlocknum = 0
var/firedoornum = 0
world << "Ion Storm Main Started"
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
D.ion_act()
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
firedoornum++;
spawn(0)
D.ion_act()
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
world << "Ion Storm Main Done"
*/

View File

@@ -1,12 +0,0 @@
/datum/event/meteor_wave
startWhen = 6
endWhen = 66
/datum/event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
/datum/event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5)

View File

@@ -0,0 +1,47 @@
//cael - two events here
//meteor storms are much heavier
/datum/event/meteor_wave
startWhen = 6
endWhen = 33
/datum/event/meteor_wave/setup()
endWhen = rand(10,25) * 3
/datum/event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
/datum/event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(rand(2,5))
/datum/event/meteor_wave/end()
command_alert("The station has cleared the meteor storm.", "Meteor Alert")
//
/datum/event/meteor_shower
startWhen = 6
endWhen = 7
var/next_meteor = 6
var/waves = 1
/datum/event/meteor_shower/setup()
waves = rand(1,4)
/datum/event/meteor_shower/announce()
command_alert("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
/datum/event/meteor_shower/tick()
if(activeFor >= next_meteor)
spawn_meteors(rand(1,4))
next_meteor += rand(20,100)
waves--
if(waves <= 0)
endWhen = activeFor + 1
else
endWhen = next_meteor + 1
/datum/event/meteor_shower/end()
command_alert("The station has cleared the meteor shower", "Meteor Alert")

View File

@@ -0,0 +1,2 @@
/datum/event/space_ninja/setup()
space_ninja_arrival()

View File

@@ -0,0 +1,25 @@
datum/event/viral_infection
var/severity = 1
datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(1, 3)
datum/event/viral_infection/announce()
command_alert("Confirmed outbreak of level [severity + rand(0,3)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
infect_mob_random_lesser(candidates[1])
candidates.Remove(candidates[1])
severity--

View File

@@ -0,0 +1,29 @@
datum/event/viral_outbreak
var/severity = 1
datum/event/viral_outbreak/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
severity = rand(2, 4)
datum/event/viral_outbreak/announce()
command_alert("Confirmed outbreak of level [severity + rand(0,6)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
datum/event/viral_outbreak/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
if(prob(33))
infect_mob_random_lesser(candidates[1])
else
infect_mob_random_greater(candidates[1])
candidates.Remove(candidates[1])
severity--