diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index f849d2fd419..e3117e026f9 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -135,15 +135,17 @@ mob/living/carbon/human/airflow_hit(atom/A) zone/proc/movables(list/origins) . = list() - if (!origins || !origins.len) + if (!origins?.len) return var/static/list/movables_tcache = typecacheof(list(/obj/effect, /mob/abstract)) var/atom/movable/AM for (var/testing_turf in contents) + CHECK_TICK for (var/am in testing_turf) AM = am + CHECK_TICK if (AM.simulated && !AM.anchored && !movables_tcache[AM.type]) for (var/source_turf in origins) if (get_dist(testing_turf, source_turf) <= EDGE_KNOCKDOWN_MAX_DISTANCE) diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm index 4ee8963e135..49ddf172627 100644 --- a/code/modules/admin/view_variables/view_variables.dm +++ b/code/modules/admin/view_variables/view_variables.dm @@ -108,11 +108,13 @@ . = "" var/list/variables = list() for(var/x in D.vars) + CHECK_TICK if(x in view_variables_hide_vars) continue variables += x variables = sortList(variables) for(var/x in variables) + CHECK_TICK . += make_view_variables_var_entry(D, x, D.vars[x]) /proc/make_view_variables_value(value, varname = "*") diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm index f9949c6a000..ca8adf8a10a 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm @@ -4,6 +4,7 @@ effecttype = "cellcharge" effect_type = 3 var/last_message + var/is_looping = FALSE /datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/user) if(user) @@ -14,22 +15,50 @@ to_chat(R, "SYSTEM ALERT: Large energy boost detected!") return 1 +#define SLEEP_AND_STOP \ +if (TICK_CHECK) { \ + stoplag(); \ + if (QDELETED(src)) { \ + return 1; \ + } else { \ + T = get_turf(holder); \ + } \ +} + /datum/artifact_effect/cellcharge/DoEffectAura() + set background = 1 + if(holder) + if (is_looping) + return 1 + is_looping = TRUE + var/turf/T = get_turf(holder) - for (var/obj/machinery/power/apc/C in range(200, T)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge += 25 - for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) - S.charge += 25 - for (var/mob/living/silicon/robot/M in range(50, T)) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge += 25 - if(world.time - last_message > 200) - to_chat(M, "SYSTEM ALERT: Energy boost detected!") - last_message = world.time + + for (var/P in range(src.effectrange, T)) + SLEEP_AND_STOP + + if (istype(P, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/apc = P + if (apc.cell) + apc.cell.charge += 25 + else if (istype(P, /obj/machinery/power/smes)) + var/obj/machinery/power/smes/smes = P + smes.charge += 25 + else if (isrobot(P)) + var/mob/living/silicon/robot/M = P + if (get_dist(T, M) <= effectrange) + if (M.cell) + M.cell.charge += 25 + if(world.time - last_message > 200) + to_chat(M, "SYSTEM ALERT: Energy boost detected!") + last_message = world.time + + is_looping = FALSE return 1 +#undef SLEEP_AND_STOP + /datum/artifact_effect/cellcharge/DoEffectPulse() if(holder) var/turf/T = get_turf(holder) diff --git a/html/changelogs/skull132_tickcheck.yml b/html/changelogs/skull132_tickcheck.yml new file mode 100644 index 00000000000..08dd616f6ed --- /dev/null +++ b/html/changelogs/skull132_tickcheck.yml @@ -0,0 +1,7 @@ +author: Skull132 +delete-after: True + +changes: + - tweak: "Modified the way the cell charge anomaly works. It no longer uses absurd ranges to charge stuff." + - tweak: "ZAS might be a tick slower at kicking objects around for large zones. On the flip side, it shouldn't lag the server as consistently anymore." + - tweak: "VV might take a bit to generate the VV screen for large entries."