Files
CHOMPStation2/code/_helpers/view.dm
Novacat 6af8ca393b Merge pull request #9900 from VOREStation/upstream-merge-7958
[MIRROR] Fixes context-menu examine expanding incorrect target
2021-03-10 19:46:45 +00:00

16 lines
519 B
Plaintext

/proc/getviewsize(view)
var/viewX
var/viewY
if(isnum(view))
var/totalviewrange = 1 + 2 * view
viewX = totalviewrange
viewY = totalviewrange
else
var/list/viewrangelist = splittext(view,"x")
viewX = text2num(viewrangelist[1])
viewY = text2num(viewrangelist[2])
return list(viewX, viewY)
// Used to get `atom/O as obj|mob|turf in view()` to match against strings containing apostrophes immediately after substrings that match to other objects. Somehow. - Ater
/proc/_validate_atom(atom/A)
return view()