Make sure to hit the funny tick

This commit is contained in:
Putnam
2021-02-24 03:12:01 -08:00
parent 311d766bd5
commit 23eaf250a9
3 changed files with 9 additions and 7 deletions
+7 -7
View File
@@ -4,6 +4,12 @@
var/azimuth = 0 // clockwise, top-down rotation from 0 (north) to 359
var/power_mod = 1 // how much power this sun is outputting relative to standard
/datum/sun/vv_edit_var(var_name, var_value)
. = ..()
if(var_name == NAMEOF(src, azimuth))
SSsun.complete_movement()
/atom/proc/check_obscured(datum/sun/sun, distance = OCCLUSION_DISTANCE)
var/target_x = round(sin(sun.azimuth), 0.01)
var/target_y = round(cos(sun.azimuth), 0.01)
@@ -28,7 +34,6 @@ SUBSYSTEM_DEF(sun)
var/list/datum/sun/suns = list()
var/datum/sun/primary_sun
var/azimuth = 0 ///clockwise, top-down rotation from 0 (north) to 359
var/azimuth_mod = 1 ///multiplier against base_rotation
var/base_rotation = 6 ///base rotation in degrees per fire
@@ -45,7 +50,7 @@ SUBSYSTEM_DEF(sun)
for(var/S in suns)
var/datum/sun/sun = S
sun.azimuth += azimuth_mod * base_rotation
sun.azimuth = round(azimuth, 0.01)
sun.azimuth = round(sun.azimuth, 0.01)
if(sun.azimuth >= 360)
sun.azimuth -= 360
if(sun.azimuth < 0)
@@ -55,9 +60,4 @@ SUBSYSTEM_DEF(sun)
/datum/controller/subsystem/sun/proc/complete_movement()
SEND_SIGNAL(src, COMSIG_SUN_MOVED, primary_sun, suns)
/datum/controller/subsystem/sun/vv_edit_var(var_name, var_value)
. = ..()
if(var_name == NAMEOF(src, azimuth))
complete_movement()
#undef OCCLUSION_DISTANCE
+1
View File
@@ -35,6 +35,7 @@
/datum/round_event/supernova/start()
supernova.power_mod = 0.00000002 * power
var/explosion_size = rand(1000000000, 999999999)
var/turf/epicenter = get_turf_in_angle(supernova.azimuth, SSmapping.get_station_center(), world.maxx / 2)
for(var/array in GLOB.doppler_arrays)
var/obj/machinery/doppler_array/A = array
A.sense_explosion(epicenter, explosion_size/2, explosion_size, 0, 107000000 / power, explosion_size/2, explosion_size, 0)
+1
View File
@@ -2060,6 +2060,7 @@
#include "code\modules\events\spider_infestation.dm"
#include "code\modules\events\spontaneous_appendicitis.dm"
#include "code\modules\events\stray_cargo.dm"
#include "code\modules\events\supernova.dm"
#include "code\modules\events\travelling_trader.dm"
#include "code\modules\events\vent_clog.dm"
#include "code\modules\events\wisdomcow.dm"