mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
@@ -103,7 +103,7 @@ obj/item/check_airflow_movable(n)
|
||||
density = 1
|
||||
od = 1
|
||||
while(airflow_speed > 0)
|
||||
if(airflow_speed <= 0) return
|
||||
if(airflow_speed <= 0) break
|
||||
airflow_speed = min(airflow_speed,15)
|
||||
airflow_speed -= vsc.airflow_speed_decay
|
||||
if(airflow_speed > 7)
|
||||
@@ -120,9 +120,9 @@ obj/item/check_airflow_movable(n)
|
||||
if ((!( src.airflow_dest ) || src.loc == src.airflow_dest))
|
||||
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
|
||||
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
|
||||
return
|
||||
break
|
||||
if(!istype(loc, /turf))
|
||||
return
|
||||
break
|
||||
step_towards(src, src.airflow_dest)
|
||||
if(ismob(src) && src:client)
|
||||
src:client:move_delay = world.time + vsc.airflow_mob_slowdown
|
||||
|
||||
@@ -90,6 +90,14 @@
|
||||
//turfs += centerturf
|
||||
return atoms
|
||||
|
||||
/proc/trange(rad = 0, turf/centre = null) //alternative to range (ONLY processes turfs and thus less intensive)
|
||||
if(!centre)
|
||||
return
|
||||
|
||||
var/turf/x1y1 = locate(((centre.x-rad)<1 ? 1 : centre.x-rad),((centre.y-rad)<1 ? 1 : centre.y-rad),centre.z)
|
||||
var/turf/x2y2 = locate(((centre.x+rad)>world.maxx ? world.maxx : centre.x+rad),((centre.y+rad)>world.maxy ? world.maxy : centre.y+rad),centre.z)
|
||||
return block(x1y1,x2y2)
|
||||
|
||||
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
|
||||
var/dx = Loc1.x - Loc2.x
|
||||
var/dy = Loc1.y - Loc2.y
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(user))
|
||||
sparks.start()
|
||||
//
|
||||
user.loc = pick(orange(get_turf(holder), 50))
|
||||
|
||||
user.Move(pick(trange(50, get_turf(holder))))
|
||||
|
||||
sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(user))
|
||||
sparks.set_up(3, 0, user.loc)
|
||||
sparks.start()
|
||||
|
||||
/datum/artifact_effect/teleport/DoEffectAura()
|
||||
|
||||
@@ -58,11 +58,10 @@
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
user << "\The [src] shatters!"
|
||||
user << "<span class='danger'>\The [src] shatters!</span>"
|
||||
if(virus2.infectionchance > 0)
|
||||
for(var/mob/living/carbon/target in view(1, get_turf(src)))
|
||||
if(airborne_can_reach(get_turf(src), get_turf(target)))
|
||||
if(get_infection_chance(target))
|
||||
infect_virus2(target, src.virus2)
|
||||
del src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user