Merge pull request #4186 from Citadel-Station-13/upstream-merge-33157

[MIRROR] Clean up some loc assignments
This commit is contained in:
LetterJay
2017-12-03 06:14:34 -06:00
committed by GitHub
7 changed files with 13 additions and 15 deletions
+1 -1
View File
@@ -228,7 +228,7 @@
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
A.loc = newloc
A.forceMove(newloc)
spawn()
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
+5 -7
View File
@@ -117,9 +117,8 @@
/obj/effect/step_trigger/teleporter/Trigger(atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
A.x = teleport_x
A.y = teleport_y
A.z = teleport_z
var/turf/T = locate(teleport_x, teleport_y, teleport_z)
A.forceMove(T)
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
@@ -132,9 +131,9 @@
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
if (T)
A.forceMove(T)
/* Fancy teleporter, creates sparks and smokes when used */
@@ -198,4 +197,3 @@
if(happens_once)
qdel(src)