tgstation/-tg-station — pull request #6537 by RemieRichards (2014-12-23 19:02:58+00:00)
Title: get_turf_pixel()

The documentation speaks for itself

//Gets the turf this atom's *ICON* appears to inhabit
//Uses half the width/height respectively to work out
//A minimum pixel amt this icon needs to be pixel'd by
//to be considered to be in another turf

//division = world.icon_size - icon-width/2; DX = pixel_x/division
//division = world.icon_size - icon-height/2; DY = pixel_y/division

//Eg: Humans
//32 - 16; 16/16 = 1, DX = 1
//32 - 16; 15/16 = 0.9375 = 0 when round()'d, DX = 0

tl;dr: find where something LOOKS to be instead of where it actually is (eg APC's and other wall mounts)
replaces get_wall_mounted_turf() as it fulfill's its job more accurately (if a tiny bit more costly)
I made this for something I was testing but scrapped (it didn't work out) and realised it still has it's uses as a general proc.