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

View File

@@ -1042,4 +1042,4 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
/obj/mecha/update_remote_sight(mob/living/user)
if(occupant_sight_flags)
if(user == occupant)
user.sight |= occupant_sight_flags
user.sight |= occupant_sight_flags

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

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)

View File

@@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
A.density = FALSE
var/obj/effect/extraction_holder/holder_obj = new(A.loc)
holder_obj.appearance = A.appearance
A.loc = holder_obj
A.forceMove(holder_obj)
balloon2 = mutable_appearance('icons/obj/fulton_balloon.dmi', "fulton_expand")
balloon2.pixel_y = 10
balloon2.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
@@ -113,7 +113,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/list/flooring_near_beacon = list()
for(var/turf/open/floor in orange(1, beacon))
flooring_near_beacon += floor
holder_obj.loc = pick(flooring_near_beacon)
holder_obj.forceMove(pick(flooring_near_beacon))
animate(holder_obj, pixel_z = 10, time = 50)
sleep(50)
animate(holder_obj, pixel_z = 15, time = 10)
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
A.density = initial(A.density)
animate(holder_obj, pixel_z = 0, time = 5)
sleep(5)
A.loc = holder_obj.loc
A.forceMove(holder_obj.loc)
qdel(holder_obj)
if(uses_left <= 0)
qdel(src)

View File

@@ -160,7 +160,7 @@
return
if(!B)
return
src.loc = B.loc
forceMove(B.loc)
src.client.eye = src
src.visible_message("<span class='warning'><B>[src] rises out of the pool of blood!</B></span>")
exit_blood_effect(B)

View File

@@ -1022,4 +1022,4 @@
/mob/living/proc/add_abilities_to_panel()
for(var/obj/effect/proc_holder/A in abilities)
statpanel("[A.panel]",A.get_panel_text(),A)
statpanel("[A.panel]",A.get_panel_text(),A)

View File

@@ -78,4 +78,4 @@
var/last_words //used for database logging
var/list/obj/effect/proc_holder/abilities = list()
var/list/obj/effect/proc_holder/abilities = list()