mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Ports /tg/'s meteor implementation.
Merges the two meteor events into one, and now takes severity into consideration instead. Including the basic meteors there are also new types ranging from flaming to radioactive which may drop appropriate types of ore.
This commit is contained in:
@@ -153,7 +153,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 75, list(ASSIGNMENT_ENGINEER = 60)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_SCIENTIST = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
|
||||
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, "Random Antagonist", /datum/event/random_antag, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
@@ -168,13 +168,13 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
/datum/event_container/major
|
||||
severity = EVENT_LEVEL_MAJOR
|
||||
available_events = list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 60), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station, 0, list(ASSIGNMENT_ANY = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 0, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 60), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station,0,list(ASSIGNMENT_ANY = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 0, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ var/list/event_last_fired = list()
|
||||
possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"]
|
||||
if(minutes_passed >= 30) // Give engineers time to set up engine
|
||||
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
|
||||
|
||||
if(active_with_role["Medical"] > 0)
|
||||
|
||||
@@ -1,44 +1,39 @@
|
||||
//meteor storms are much heavier
|
||||
/datum/event/meteor_wave
|
||||
startWhen = 6
|
||||
endWhen = 33
|
||||
|
||||
/datum/event/meteor_wave/setup()
|
||||
endWhen = rand(15,30) * 3
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
meteor_wave(rand(2,5))
|
||||
|
||||
/datum/event/meteor_wave/end()
|
||||
command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
|
||||
//
|
||||
/datum/event/meteor_shower
|
||||
startWhen = 5
|
||||
endWhen = 7
|
||||
var/next_meteor = 6
|
||||
var/waves = 1
|
||||
|
||||
/datum/event/meteor_shower/setup()
|
||||
waves = rand(2,5)
|
||||
/datum/event/meteor_wave/setup()
|
||||
waves = severity * rand(1,3)
|
||||
|
||||
/datum/event/meteor_shower/announce()
|
||||
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
/datum/event/meteor_wave/announce()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
else
|
||||
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
|
||||
//meteor showers are lighter and more common,
|
||||
/datum/event/meteor_shower/tick()
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(activeFor >= next_meteor)
|
||||
meteor_wave(rand(1,4))
|
||||
next_meteor += rand(20,100)
|
||||
spawn() spawn_meteors(severity * rand(1,2), get_meteors())
|
||||
next_meteor += rand(15, 30) / severity
|
||||
waves--
|
||||
if(waves <= 0)
|
||||
endWhen = activeFor + 1
|
||||
else
|
||||
endWhen = next_meteor + 1
|
||||
endWhen = (waves <= 0 ? activeFor + 15 : next_meteor + 1)
|
||||
|
||||
/datum/event/meteor_shower/end()
|
||||
command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
/datum/event/meteor_wave/end()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
else
|
||||
command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/datum/event/meteor_wave/proc/get_meteors()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
return meteors_catastrophic
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
return meteors_threatening
|
||||
else
|
||||
return meteors_normal
|
||||
|
||||
Reference in New Issue
Block a user