Warning check before sorting long lists in vv

This commit is contained in:
Jordie0608
2015-02-21 21:46:42 +11:00
parent 92f4134cfe
commit 5a3d9d883f
@@ -136,6 +136,12 @@ var/list/VVckey_edit = list("key", "ckey")
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
if(!check_rights(R_VAREDIT)) return
if(!istype(L,/list)) src << "Not a List."
if(L.len > 1000)
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
if(confirm != "Continue")
return
var/list/names = sortList(L)
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"