From e35ff2dcb2b54fb37055090bc92c7a47fc1472c9 Mon Sep 17 00:00:00 2001 From: Toastical <20125180+Toastical@users.noreply.github.com> Date: Wed, 6 Aug 2025 00:05:00 +0300 Subject: [PATCH] some dreamchecker fixes and a for loop change (#29997) --- code/datums/elements/_element.dm | 2 +- code/game/gamemodes/objective.dm | 2 +- code/game/machinery/camera/camera.dm | 2 +- code/modules/mob/living/carbon/carbon_procs.dm | 1 - code/modules/mob/living/living.dm | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/elements/_element.dm b/code/datums/elements/_element.dm index cc5fc2006c5..bcf2cc294b8 100644 --- a/code/datums/elements/_element.dm +++ b/code/datums/elements/_element.dm @@ -37,8 +37,8 @@ /// Deactivates the functionality defines by the element on the given datum /datum/element/proc/Detach(datum/source, force) + SHOULD_CALL_PARENT(TRUE) SEND_SIGNAL(source, COMSIG_ELEMENT_DETACH, src) - SHOULD_CALL_PARENT(1) UnregisterSignal(source, COMSIG_PARENT_QDELETING) /datum/element/Destroy(force) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 0d3140de4e3..74d6e7e6c20 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -46,8 +46,8 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) var/delayed_objective_text = "This is a bug! Report it on the github and ask an admin what type of objective" /datum/objective/New(text, datum/team/team_to_join, datum/mind/_owner) - . = ..() SHOULD_CALL_PARENT(TRUE) + . = ..() GLOB.all_objectives += src if(text) explanation_text = text diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 87e38267bdc..cecfd01c188 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -356,7 +356,7 @@ /atom/proc/auto_turn() //Automatically turns based on nearby walls. var/turf/simulated/wall/T = null - for(var/i = 1, i <= 8; i += i) + for(var/i in 1 to 8) T = get_ranged_target_turf(src, i, 1) if(istype(T)) //If someone knows a better way to do this, let me know. -Giacom diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 562b62a9781..a8f860c952b 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -393,7 +393,6 @@ //Parent proc checks if a mob can_be_flashed() . = ..() - SIGNAL_HANDLER SEND_SIGNAL(src, COMSIG_CARBON_FLASH_EYES, laser_pointer) var/damage = intensity - check_eye_prot() var/extra_damage = 0 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index be687fb00bc..0562bb5bed4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -860,6 +860,7 @@ //called when the mob receives a bright flash /mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, laser_pointer = FALSE, type = /atom/movable/screen/fullscreen/stretch/flash) + SIGNAL_HANDLER if(can_be_flashed(intensity, override_blindness_check)) overlay_fullscreen("flash", type) addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), "flash", 25), 25)