More tweaks, whoops
This commit is contained in:
@@ -17,15 +17,20 @@
|
||||
announceWhen = rand(4, 60)
|
||||
supernova = new
|
||||
SSsun.suns += supernova
|
||||
if(prob(20))
|
||||
power = rand(5,100) / 100
|
||||
else
|
||||
power = rand(5,5000) / 100
|
||||
switch(rand(1,5))
|
||||
if(1)
|
||||
power = rand(5,100) / 100
|
||||
if(2)
|
||||
power = rand(5,500) / 100
|
||||
if(3)
|
||||
power = rand(5,1000) / 100
|
||||
if(4, 5)
|
||||
power = rand(5,5000) / 100
|
||||
supernova.azimuth = rand(0, 359)
|
||||
supernova.power_mod = 0
|
||||
|
||||
/datum/round_event/supernova/announce()
|
||||
var/message = "Our tachyon-doppler array has detected a supernova in your vicinity. Peak flux from the supernova estimated to be [round(power,0.1)] times current solar flux. [power > 1 ? "Short burts of radiation may be possible, so please prepare accordingly." : ""]"
|
||||
var/message = "[station_name()]: Our tachyon-doppler array has detected a supernova in your vicinity. Peak flux from the supernova estimated to be [round(power,0.1)] times current solar flux; if the supernova is close to your sun in the sky, your solars may receive this as a power boost.[power > 1 ? " Short burts of radiation may be possible, so please prepare accordingly." : ""] We hope you enjoy the light."
|
||||
if(prob(power * 25))
|
||||
priority_announce(message, sender_override = "Nanotrasen Meteorology Division")
|
||||
else
|
||||
@@ -34,7 +39,7 @@
|
||||
|
||||
/datum/round_event/supernova/start()
|
||||
supernova.power_mod = 0.001 * power
|
||||
var/explosion_size = rand(1000000000, 999999999)
|
||||
var/explosion_size = rand(1000000000, 10000000000)
|
||||
var/turf/epicenter = get_turf_in_angle(supernova.azimuth, SSmapping.get_station_center(), round(world.maxx * 0.45))
|
||||
for(var/array in GLOB.doppler_arrays)
|
||||
var/obj/machinery/doppler_array/A = array
|
||||
@@ -51,7 +56,7 @@
|
||||
supernova.power_mod = min(supernova.power_mod*1.2, power)
|
||||
if(activeFor > endWhen-10)
|
||||
supernova.power_mod /= 4
|
||||
if(prob(round(supernova.power_mod)) && prob(3) && storm_count < 5 && !SSweather.get_weather_by_type(/datum/weather/rad_storm))
|
||||
if(prob(round(supernova.power_mod*2)) && prob(3) && storm_count < 5 && !SSweather.get_weather_by_type(/datum/weather/rad_storm))
|
||||
SSweather.run_weather(/datum/weather/rad_storm/supernova)
|
||||
storm_count++
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
//dot product of sun and panel -- Lambert's Cosine Law
|
||||
cur_pow = cos(azimuth_current - sun_azimuth) * sun.power_mod
|
||||
cur_pow = clamp(round(cur_pow, 0.01), 0, 1)
|
||||
cur_pow = clamp(round(cur_pow, 0.01), 0, sun.power_mod)
|
||||
total_flux += cur_pow
|
||||
|
||||
/obj/machinery/power/solar/process()
|
||||
|
||||
Reference in New Issue
Block a user