4 Commits

Author SHA1 Message Date
chompstation-ci[bot]
1b99ac2969 Automatic changelog for PR #12039 [ci skip] 2025-12-04 20:51:53 +00:00
CHOMPStation2StaffMirrorBot
bea3ac2c9f [MIRROR] Subsystem overruns (#12039)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-12-04 21:51:11 +01:00
chompstation-ci[bot]
2de333c264 Automatic changelog for PR #12066 [ci skip] 2025-12-04 20:36:08 +00:00
CHOMPStation2StaffMirrorBot
c82f5a7d6d [MIRROR] No shadekin knockdown on shuttle move (#12066)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
2025-12-04 21:33:47 +01:00
9 changed files with 49 additions and 27 deletions

View File

@@ -5,12 +5,12 @@ SUBSYSTEM_DEF(nightshift)
)
priority = FIRE_PRIORITY_NIGHTSHIFT
wait = 60 SECONDS
flags = SS_NO_TICK_CHECK
var/nightshift_active = FALSE
var/nightshift_first_check = 30 SECONDS
var/high_security_mode = FALSE
var/list/currentrun
/datum/controller/subsystem/nightshift/Initialize()
if(!CONFIG_GET(flag/enable_night_shifts))
@@ -18,7 +18,10 @@ SUBSYSTEM_DEF(nightshift)
return SS_INIT_SUCCESS
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
if(round_duration_in_ds < nightshift_first_check)
if(resumed)
update_nightshift(resumed = TRUE)
return
if(world.time - SSticker.round_start_time < nightshift_first_check)
return
check_nightshift()
@@ -39,9 +42,7 @@ SUBSYSTEM_DEF(nightshift)
// CHOMPEdit End
//VOREStation Edit End
/datum/controller/subsystem/nightshift/proc/check_nightshift(check_canfire=FALSE) //This is called from elsewhere, like setting the alert levels
if(check_canfire && !can_fire)
return
/datum/controller/subsystem/nightshift/proc/check_nightshift(forced) //This is called from elsewhere, like setting the alert levels, sadly
var/emergency = GLOB.security_level > SEC_LEVEL_GREEN
var/announcing = TRUE
var/night_time = using_map.get_nightshift()
@@ -56,16 +57,20 @@ SUBSYSTEM_DEF(nightshift)
if(emergency)
night_time = FALSE
if(nightshift_active != night_time)
update_nightshift(night_time, announcing)
update_nightshift(night_time, announcing, forced = forced)
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE, resumed = FALSE, forced = FALSE)
nightshift_active = active
if(announce)
if(active)
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
else
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
for(var/obj/machinery/power/apc/apc in GLOB.apcs)
if(!resumed)
currentrun = GLOB.apcs
nightshift_active = active
if(announce)
if (active)
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
else
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
for(var/obj/machinery/power/apc/apc as anything in currentrun)
currentrun -= apc
if(apc.z in using_map.station_levels)
apc.set_nightshift(active, TRUE)
CHECK_TICK
if(MC_TICK_CHECK && !forced) // subsystem will be in state SS_IDLE if forced by an admin
return

View File

@@ -3,6 +3,20 @@ SUBSYSTEM_DEF(sun)
wait = 600
flags = SS_NO_INIT
var/static/datum/sun/sun = new
var/list/current_run
/datum/controller/subsystem/sun/fire()
sun.calc_position()
/datum/controller/subsystem/sun/fire(resumed)
if(!resumed)
current_run = GLOB.solars_list.Copy()
sun.calc_position()
//now tell the solar control computers to update their status and linked devices
while(current_run.len)
var/obj/machinery/power/solar_control/SC = current_run[current_run.len]
current_run.len--
if(!SC.powernet)
GLOB.solars_list.Remove(SC)
continue
SC.update()
if(MC_TICK_CHECK)
return

View File

@@ -32,10 +32,3 @@
else
dx = s/abs(s)
dy = c / abs(s)
//now tell the solar control computers to update their status and linked devices
for(var/obj/machinery/power/solar_control/SC in GLOB.solars_list)
if(!SC.powernet)
GLOB.solars_list.Remove(SC)
continue
SC.update()

View File

@@ -683,7 +683,7 @@
if(last_adrenaline_rush && last_adrenaline_rush + (30 MINUTES) > world.time)
return
last_adrenaline_rush = world.time
log_and_message_admins("[H]'s adrenaline rush trait just activated!")
log_and_message_admins("[H]'s adrenaline rush trait just activated!", H)
H.add_modifier(/datum/modifier/adrenaline, 30 SECONDS)
/datum/modifier/adrenaline

View File

@@ -86,7 +86,7 @@ GLOBAL_VAR_INIT(security_level, 0)
SSatc.reroute_traffic(yes = 0)
spawn()
//SSnightshift.check_nightshift() //CHOMPedit: disabling this for now as we do not use the nightshift currently.
//SSnightshift.check_nightshift(TRUE) //CHOMPedit: disabling this for now as we do not use the nightshift currently.
admin_chat_message(message = "Security level is now: [uppertext(get_security_level())]", color = "#CC2222") //VOREStation Add

View File

@@ -330,6 +330,8 @@
TA.ChangeTurf(get_base_turf_by_area(TA), 1, 1)
if(knockdown)
for(var/mob/living/M in A)
if(M.is_incorporeal())
continue
if(M.buckled)
to_chat(M, span_red("Sudden acceleration presses you into \the [M.buckled]!"))
shake_camera(M, 3, 1)

View File

@@ -75,8 +75,7 @@
trailing_newline = TRUE,
confidential = FALSE
)
//if(isnull(Master) || !SSchat?.initialized || !MC_RUNNING(SSchat.init_stage))
if(isnull(Master) || !SSchat?.initialized)
if(isnull(Master) || !SSchat?.initialized || !MC_RUNNING(SSchat.init_stage))
to_chat_immediate(target, html, type, text, avoid_highlighting)
return

View File

@@ -0,0 +1,5 @@
author: "CHOMPStation2StaffMirrorBot"
delete-after: True
changes:
- bugfix: "sun subsystem overruns"
- bugfix: "nightshift subsystem overruns"

View File

@@ -0,0 +1,4 @@
author: "Will"
delete-after: True
changes:
- bugfix: "Phased shadekin are no longer knocked down or thrown when a shuttle they are inside of moves."