mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Meteor events are now direction biased.
When a meteor event triggers it now selects a main edge to arrive from, with a 20% probability to come from either neighboring edge. Will never arrive from the opposite edge. The meteor event end time is now made more useful, and is based on a longest delay between meteor waves scenario. The meteor event now supports multiple station Z-levels. Removes the meteor sounds, as they can rarely be heard over the explosions anyway.
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
endWhen = 7
|
||||
var/next_meteor = 6
|
||||
var/waves = 1
|
||||
var/start_side
|
||||
|
||||
/datum/event/meteor_wave/setup()
|
||||
waves = severity * rand(1,3)
|
||||
start_side = pick(cardinal)
|
||||
endWhen = worst_case_end()
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
switch(severity)
|
||||
@@ -14,13 +17,17 @@
|
||||
else
|
||||
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
|
||||
//meteor showers are lighter and more common,
|
||||
/datum/event/meteor_wave/tick()
|
||||
if(waves && activeFor >= next_meteor)
|
||||
spawn() spawn_meteors(severity * rand(1,2), get_meteors())
|
||||
var/pick_side = prob(80) ? start_side : (prob(50) ? turn(start_side, 90) : turn(start_side, -90))
|
||||
|
||||
spawn() spawn_meteors(severity * rand(1,2), get_meteors(), pick_side)
|
||||
next_meteor += rand(15, 30) / severity
|
||||
waves--
|
||||
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
|
||||
endWhen = worst_case_end()
|
||||
|
||||
/datum/event/meteor_wave/proc/worst_case_end()
|
||||
return activeFor + ((30 / severity) * waves) + 10
|
||||
|
||||
/datum/event/meteor_wave/end()
|
||||
switch(severity)
|
||||
|
||||
Reference in New Issue
Block a user