Also, what would be a good way to limit the size of the selection box? As it is now, it is possible for players to attempt to select large areas of tiles, which slows down the creation of the box.
Thanks! :)
client
var/list/selectionImages = list()
var/turf/selectionStart
MouseDown(object, location, control, params)
src.clearSelectionImages()
src.selectionStart = object:getTurf()
MouseDrag(src_object, over_object, src_location, over_location, src_control, over_control, params)
if(src.selectionStart)
src.clearSelectionImages()
for(var/turf/t in block(src.selectionStart, over_location))
var/image/i = new('icons/other/effects.dmi', t, "selection", EFFECT_LAYER + 1)
src.selectionImages += i
src.mob << i
MouseUp(object, location, control, params)
src.clearSelectionImages()
src.selectionStart = null
proc/clearSelectionImages()
for(var/image/i in src.selectionImages)
del(i)