mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #4326 from Fox-McCloud/even-less-lag
Makes Explosion and Singulo Defer Based on CPU
This commit is contained in:
@@ -387,7 +387,7 @@
|
||||
var/turf/simulated/S = T
|
||||
S.MakeSlippery()
|
||||
if("wall") //Wall-tank: Wets it's own tile and the surrounding 8 tiles (3x3 square)
|
||||
for(var/turf/T in trange(1, src.loc))
|
||||
for(var/turf/T in spiral_range_turfs(1, src.loc))
|
||||
if(!istype(T, /turf/simulated)) continue
|
||||
var/turf/simulated/S = T
|
||||
S.MakeSlippery()
|
||||
|
||||
@@ -237,16 +237,23 @@
|
||||
|
||||
/obj/singularity/proc/eat()
|
||||
set background = BACKGROUND_ENABLED
|
||||
for(var/atom/X in orange(grav_pull,src))
|
||||
var/dist = get_dist(X, src)
|
||||
var/obj/singularity/S = src
|
||||
if(dist > consume_range)
|
||||
X.singularity_pull(S, current_size)
|
||||
else if(dist <= consume_range)
|
||||
consume(X)
|
||||
for(var/tile in spiral_range_turfs(grav_pull, src, 1))
|
||||
var/turf/T = tile
|
||||
if(!T)
|
||||
continue
|
||||
if(get_dist(T, src) > consume_range)
|
||||
T.singularity_pull(src, current_size)
|
||||
else
|
||||
consume(T)
|
||||
for(var/thing in T)
|
||||
var/atom/movable/X = thing
|
||||
if(get_dist(X, src) > consume_range)
|
||||
X.singularity_pull(src, current_size)
|
||||
else
|
||||
consume(X)
|
||||
CHECK_TICK
|
||||
return
|
||||
|
||||
|
||||
/obj/singularity/proc/consume(var/atom/A)
|
||||
var/gain = A.singularity_act(current_size)
|
||||
src.energy += gain
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//You're the same as me? I hate you I'm going home
|
||||
if(clusterCheckFlags & CLUSTER_CHECK_SAME_TURFS)
|
||||
clustering = rand(clusterMin,clusterMax)
|
||||
for(var/turf/F in trange(clustering,T))
|
||||
for(var/turf/F in spiral_range_turfs(clustering,T))
|
||||
if(istype(F,turfPath))
|
||||
skipLoopIteration = TRUE
|
||||
break
|
||||
@@ -53,7 +53,7 @@
|
||||
//You're DIFFERENT to me? I hate you I'm going home
|
||||
if(clusterCheckFlags & CLUSTER_CHECK_DIFFERENT_TURFS)
|
||||
clustering = rand(clusterMin,clusterMax)
|
||||
for(var/turf/F in trange(clustering,T))
|
||||
for(var/turf/F in spiral_range_turfs(clustering,T))
|
||||
if(!(istype(F,turfPath)))
|
||||
skipLoopIteration = TRUE
|
||||
break
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
/datum/artifact_effect/teleport
|
||||
effecttype = "teleport"
|
||||
effect_type = 6
|
||||
|
||||
/datum/artifact_effect/teleport/DoEffectTouch(var/mob/user)
|
||||
var/weakness = GetAnomalySusceptibility(user)
|
||||
if(prob(100 * weakness))
|
||||
to_chat(user, "\red You are suddenly zapped away elsewhere!")
|
||||
if (user.buckled)
|
||||
user.buckled.unbuckle_mob()
|
||||
|
||||
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(user))
|
||||
sparks.start()
|
||||
//
|
||||
user.forceMove(pick(trange(50, get_turf(holder))))
|
||||
sparks = new /datum/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(user))
|
||||
sparks.start()
|
||||
|
||||
/datum/artifact_effect/teleport/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/M in range(src.effectrange,T))
|
||||
var/weakness = GetAnomalySusceptibility(M)
|
||||
if(prob(100 * weakness))
|
||||
to_chat(M, "\red 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.forceMove(pick(trange(50, T)))
|
||||
sparks = new /datum/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(M))
|
||||
sparks.start()
|
||||
|
||||
/datum/artifact_effect/teleport/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/M in range(src.effectrange, T))
|
||||
var/weakness = GetAnomalySusceptibility(M)
|
||||
if(prob(100 * weakness))
|
||||
to_chat(M, "\red 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.forceMove(pick(trange(50, T)))
|
||||
sparks = new /datum/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(M))
|
||||
sparks.start()
|
||||
Reference in New Issue
Block a user