diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 2dcba3ed484..1574d4c22fa 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -1160,6 +1160,9 @@ var/list/admin_verbs_mod = list( z_coord = input(usr, "Input the Z coordinate. If it's higher than [world.maxz], a new Z-level will be created (X = [x_coord], Y = [y_coord]): ", "Map element loading") as null|num if(z_coord == null) return + x_coord = Clamp(x_coord, 1, world.maxx) + y_coord = Clamp(y_coord, 1, world.maxy) + if("Cancel") return diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm index 53e1a5ac415..5cbf8fa82c7 100644 --- a/code/modules/awaymissions/maploader/reader.dm +++ b/code/modules/awaymissions/maploader/reader.dm @@ -36,6 +36,7 @@ var/global/dmm_suite/preloader/_preloader = null /////////////////////////////////////////////////////////////////////////////////////// var/list/grid_models = list() var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))//the length of the model key (e.g "aa" or "aba") + if(!key_len) key_len = 1 //proceed line by line for(lpos=1; lpos