From cd0c0acc78c2e485ba558d8525bbcfa2afee0b8b Mon Sep 17 00:00:00 2001 From: spookerton Date: Thu, 1 Sep 2022 11:33:33 +0100 Subject: [PATCH] remove returns & bad spacing from DoEffectAura --- .../modules/xenoarcheaology/effects/animate_anomaly.dm | 3 --- code/modules/xenoarcheaology/effects/badfeeling.dm | 2 -- code/modules/xenoarcheaology/effects/berserk.dm | 1 - code/modules/xenoarcheaology/effects/cannibal.dm | 2 -- code/modules/xenoarcheaology/effects/celldrain.dm | 1 - code/modules/xenoarcheaology/effects/electric_field.dm | 3 --- code/modules/xenoarcheaology/effects/feysight.dm | 1 - code/modules/xenoarcheaology/effects/gaia.dm | 3 --- code/modules/xenoarcheaology/effects/goodfeeling.dm | 2 -- .../xenoarcheaology/effects/gravitational_waves.dm | 1 - code/modules/xenoarcheaology/effects/heal.dm | 1 - code/modules/xenoarcheaology/effects/poltergeist.dm | 3 --- code/modules/xenoarcheaology/effects/radiate.dm | 1 - code/modules/xenoarcheaology/effects/resurrect.dm | 1 - code/modules/xenoarcheaology/effects/roboheal.dm | 1 - code/modules/xenoarcheaology/effects/robohurt.dm | 1 - code/modules/xenoarcheaology/effects/sleepy.dm | 1 - code/modules/xenoarcheaology/effects/teleport.dm | 2 -- code/modules/xenoarcheaology/effects/vampire.dm | 10 ---------- 19 files changed, 40 deletions(-) diff --git a/code/modules/xenoarcheaology/effects/animate_anomaly.dm b/code/modules/xenoarcheaology/effects/animate_anomaly.dm index 91b1f15a0b..db1ba3705d 100644 --- a/code/modules/xenoarcheaology/effects/animate_anomaly.dm +++ b/code/modules/xenoarcheaology/effects/animate_anomaly.dm @@ -44,12 +44,9 @@ /datum/artifact_effect/common/animate_anomaly/DoEffectAura() var/obj/O = get_master_holder() find_target() - if(!target || !istype(O)) return - O.dir = get_dir(O, target) - if(istype(O.loc, /turf)) if(get_dist(O.loc, target.loc) > 1) O.Move(get_step_to(O, target)) diff --git a/code/modules/xenoarcheaology/effects/badfeeling.dm b/code/modules/xenoarcheaology/effects/badfeeling.dm index 5add22ea02..a3b2b1fa9c 100644 --- a/code/modules/xenoarcheaology/effects/badfeeling.dm +++ b/code/modules/xenoarcheaology/effects/badfeeling.dm @@ -51,10 +51,8 @@ to_chat(H, "[pick(messages)]") else to_chat(H, "[pick(drastic_messages)]") - if(prob(10)) H.dizziness += rand(3,5) - return 1 /datum/artifact_effect/common/badfeeling/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/berserk.dm b/code/modules/xenoarcheaology/effects/berserk.dm index 22017a5490..9c99f60e38 100644 --- a/code/modules/xenoarcheaology/effects/berserk.dm +++ b/code/modules/xenoarcheaology/effects/berserk.dm @@ -37,7 +37,6 @@ for(var/mob/living/L in range(src.effectrange,T)) if(prob(10)) apply_berserk(L) - return TRUE /datum/artifact_effect/uncommon/berserk/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/cannibal.dm b/code/modules/xenoarcheaology/effects/cannibal.dm index 78d8160c50..bf5ce78eaa 100644 --- a/code/modules/xenoarcheaology/effects/cannibal.dm +++ b/code/modules/xenoarcheaology/effects/cannibal.dm @@ -54,11 +54,9 @@ to_chat(H, "[pick(messages)]") else to_chat(H, "[pick(drastic_messages)]") - if(prob(10)) H.dizziness += rand(3,5) H.nutrition = H.nutrition / 2 - return 1 /datum/artifact_effect/uncommon/cannibalfeeling/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/celldrain.dm b/code/modules/xenoarcheaology/effects/celldrain.dm index bb9b416345..5a6927b1f6 100644 --- a/code/modules/xenoarcheaology/effects/celldrain.dm +++ b/code/modules/xenoarcheaology/effects/celldrain.dm @@ -33,7 +33,6 @@ if(world.time - last_message > 200) to_chat(M, "SYSTEM ALERT: Energy drain detected!") last_message = world.time - return 1 /datum/artifact_effect/uncommon/celldrain/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/electric_field.dm b/code/modules/xenoarcheaology/effects/electric_field.dm index a9d5b8743c..38f859d5bd 100644 --- a/code/modules/xenoarcheaology/effects/electric_field.dm +++ b/code/modules/xenoarcheaology/effects/electric_field.dm @@ -35,15 +35,12 @@ for(var/mob/living/L in oview(effectrange, get_turf(holder))) if(!L.stat) nearby_mobs |= L - for(var/obj/machinery/light/light in range(effectrange, get_turf(holder))) light.flicker() - for(var/mob/living/L in nearby_mobs) if(L.isSynthetic()) to_chat(L, "ERROR: Electrical fault detected!") L.stuttering += 3 - if(ishuman(L)) var/mob/living/carbon/human/H = L var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO)) diff --git a/code/modules/xenoarcheaology/effects/feysight.dm b/code/modules/xenoarcheaology/effects/feysight.dm index 1d10ea338d..a632b9f5ce 100644 --- a/code/modules/xenoarcheaology/effects/feysight.dm +++ b/code/modules/xenoarcheaology/effects/feysight.dm @@ -37,7 +37,6 @@ for(var/mob/living/L in range(src.effectrange,T)) if(prob(10)) apply_modifier(L) - return TRUE /datum/artifact_effect/rare/feysight/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/gaia.dm b/code/modules/xenoarcheaology/effects/gaia.dm index ac95a798ab..5604e434fe 100644 --- a/code/modules/xenoarcheaology/effects/gaia.dm +++ b/code/modules/xenoarcheaology/effects/gaia.dm @@ -51,11 +51,8 @@ age_plantlife(Tray) if(prob(2)) var/mob/living/simple_mob/animal/sif/glitterfly/G = new(get_turf(Tray)) - my_glitterflies |= G - G.ai_holder.returns_home = TRUE - for(var/obj/effect/plant/P in view(effectrange,get_turf(holder))) age_plantlife(P) diff --git a/code/modules/xenoarcheaology/effects/goodfeeling.dm b/code/modules/xenoarcheaology/effects/goodfeeling.dm index 37c9d655ae..d23bbbba75 100644 --- a/code/modules/xenoarcheaology/effects/goodfeeling.dm +++ b/code/modules/xenoarcheaology/effects/goodfeeling.dm @@ -49,10 +49,8 @@ to_chat(H, "[pick(messages)]") else to_chat(H, "[pick(drastic_messages)]") - if(prob(5)) H.dizziness += rand(3,5) - return 1 /datum/artifact_effect/common/goodfeeling/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/gravitational_waves.dm b/code/modules/xenoarcheaology/effects/gravitational_waves.dm index c22eb87167..e017d46152 100644 --- a/code/modules/xenoarcheaology/effects/gravitational_waves.dm +++ b/code/modules/xenoarcheaology/effects/gravitational_waves.dm @@ -26,7 +26,6 @@ /datum/artifact_effect/extreme/gravity_wave/DoEffectAura() var/atom/holder = get_master_holder() var/seconds_since_last_pull = max(0, round((last_wave_pull - world.time) / 10)) - if(prob(10 + seconds_since_last_pull)) holder.visible_message("\The [holder] distorts as local gravity intensifies, and shifts toward it.") last_wave_pull = world.time diff --git a/code/modules/xenoarcheaology/effects/heal.dm b/code/modules/xenoarcheaology/effects/heal.dm index 4fe20ae817..69d54ca49f 100644 --- a/code/modules/xenoarcheaology/effects/heal.dm +++ b/code/modules/xenoarcheaology/effects/heal.dm @@ -35,7 +35,6 @@ /datum/artifact_effect/uncommon/heal/DoEffectAura() var/atom/holder = get_master_holder() - //todo: check over this properly if(holder) var/turf/T = get_turf(holder) for (var/mob/living/carbon/C in range(src.effectrange,T)) diff --git a/code/modules/xenoarcheaology/effects/poltergeist.dm b/code/modules/xenoarcheaology/effects/poltergeist.dm index 4f965b21c1..47dfce07dc 100644 --- a/code/modules/xenoarcheaology/effects/poltergeist.dm +++ b/code/modules/xenoarcheaology/effects/poltergeist.dm @@ -27,12 +27,9 @@ for(var/mob/living/L in oview(get_turf(holder), effectrange)) if(L.stat || !L.mind) continue - if(target && get_dist(get_turf(holder), L) > get_dist(get_turf(holder), target)) continue - target = L - if(target) throw_at_mob(target, rand(15, 30)) diff --git a/code/modules/xenoarcheaology/effects/radiate.dm b/code/modules/xenoarcheaology/effects/radiate.dm index 37be883849..ae80e6e440 100644 --- a/code/modules/xenoarcheaology/effects/radiate.dm +++ b/code/modules/xenoarcheaology/effects/radiate.dm @@ -19,7 +19,6 @@ var/atom/holder = get_master_holder() if(holder) SSradiation.flat_radiate(holder, radiation_amount, src.effectrange) - return 1 /datum/artifact_effect/rare/radiate/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/resurrect.dm b/code/modules/xenoarcheaology/effects/resurrect.dm index 1b5ff1b1bf..9a8c89923f 100644 --- a/code/modules/xenoarcheaology/effects/resurrect.dm +++ b/code/modules/xenoarcheaology/effects/resurrect.dm @@ -90,7 +90,6 @@ var/atom/holder = get_master_holder() for(var/mob/living/L in oview(effectrange, get_turf(holder))) stored_life += steal_life(L) - var/turf/T = get_turf(holder) for(var/mob/living/L in T) if(L.stat == DEAD) diff --git a/code/modules/xenoarcheaology/effects/roboheal.dm b/code/modules/xenoarcheaology/effects/roboheal.dm index 4956e03fac..d2160285fa 100644 --- a/code/modules/xenoarcheaology/effects/roboheal.dm +++ b/code/modules/xenoarcheaology/effects/roboheal.dm @@ -28,7 +28,6 @@ M.adjustBruteLoss(-1) M.adjustFireLoss(-1) M.updatehealth() - return 1 /datum/artifact_effect/uncommon/roboheal/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/robohurt.dm b/code/modules/xenoarcheaology/effects/robohurt.dm index e5e9b30cb3..b325ad7bb3 100644 --- a/code/modules/xenoarcheaology/effects/robohurt.dm +++ b/code/modules/xenoarcheaology/effects/robohurt.dm @@ -28,7 +28,6 @@ M.adjustBruteLoss(1) M.adjustFireLoss(1) M.updatehealth() - return 1 /datum/artifact_effect/uncommon/robohurt/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/sleepy.dm b/code/modules/xenoarcheaology/effects/sleepy.dm index e17ce4a343..717f188bfc 100644 --- a/code/modules/xenoarcheaology/effects/sleepy.dm +++ b/code/modules/xenoarcheaology/effects/sleepy.dm @@ -33,7 +33,6 @@ H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness) for (var/mob/living/silicon/robot/R in range(src.effectrange,holder)) to_chat(R, "SYSTEM ALERT: CPU cycles slowing down.") - return 1 /datum/artifact_effect/uncommon/sleepy/DoEffectPulse() var/atom/holder = get_master_holder() diff --git a/code/modules/xenoarcheaology/effects/teleport.dm b/code/modules/xenoarcheaology/effects/teleport.dm index efbe70c6a0..c3fbc489d4 100644 --- a/code/modules/xenoarcheaology/effects/teleport.dm +++ b/code/modules/xenoarcheaology/effects/teleport.dm @@ -32,11 +32,9 @@ to_chat(M, "You are displaced by a strange force!") if(M.buckled) M.buckled.unbuckle_mob() - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, get_turf(M)) sparks.start() - M.Move(pick(trange(50, T))) sparks = new /datum/effect_system/spark_spread() sparks.set_up(3, 0, M.loc) diff --git a/code/modules/xenoarcheaology/effects/vampire.dm b/code/modules/xenoarcheaology/effects/vampire.dm index b989bbfafa..412b76fec7 100644 --- a/code/modules/xenoarcheaology/effects/vampire.dm +++ b/code/modules/xenoarcheaology/effects/vampire.dm @@ -38,17 +38,14 @@ if(nearby_mobs.len) nearby_mobs.Cut() var/turf/T = get_turf(holder) - for(var/mob/living/L in oview(effectrange, T)) if(!L.stat && L.mind) nearby_mobs |= L - if(world.time - bloodcall_interval >= last_bloodcall && LAZYLEN(nearby_mobs)) var/mob/living/carbon/human/M = pick(nearby_mobs) if(get_dist(M, T) <= effectrange && M.health > 20) bloodcall(M) holder.Beam(M, icon_state = "drainbeam", time = 1 SECOND) - if(world.time - last_eat >= eat_interval) var/obj/effect/decal/cleanable/blood/B = locate() in range(2,holder) if(B) @@ -59,28 +56,21 @@ else charges += 1 playsound(holder, 'sound/effects/splat.ogg', 50, 1, -3) - qdel(B) - if(charges >= 10) charges -= 10 var/manifestation = pick(/obj/item/soulstone, /mob/living/simple_mob/faithless/cult/strong, /mob/living/simple_mob/creature/cult/strong, /mob/living/simple_mob/animal/space/bats/cult/strong) new manifestation(pick(RANGE_TURFS(1,T))) - if(charges >= 3) if(prob(5)) charges -= 1 var/spawn_type = pick(/mob/living/simple_mob/animal/space/bats, /mob/living/simple_mob/creature, /mob/living/simple_mob/faithless) new spawn_type(pick(RANGE_TURFS(1,T))) playsound(holder, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3) - if(charges >= 1 && nearby_mobs.len && prob(15 * nearby_mobs.len)) var/mob/living/L = pick(nearby_mobs) - holder.Beam(L, icon_state = "drainbeam", time = 1 SECOND) - L.add_modifier(/datum/modifier/agonize, 5 SECONDS) - if(charges >= 0.1) if(prob(5)) holder.visible_message("\icon[holder] \The [holder] gleams a bloody red!")