Merge pull request #13642 from Very-Soft/disciplinebuildmode

Make build mode not crash your client
This commit is contained in:
Casey
2022-09-03 16:52:00 +00:00
committed by CHOMPStation2
parent 740a487eb0
commit 3e9f7878e2
+4 -1
View File
@@ -627,6 +627,9 @@
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
var/desired_path = tgui_input_text(usr, "Enter full or partial typepath.","Typepath","[default_path]")
if(!desired_path) //VOREStation Add - If you don't give it anything it builds a list of every possible thing in the game and crashes your client.
return //VOREStation Add - And the main way for it to do that is to push the cancel button, which should just do nothing. :U
var/list/types = typesof(/atom)
var/list/matches = list()
@@ -705,4 +708,4 @@
#undef BUILDMODE_CONTENTS
#undef BUILDMODE_LIGHTS
#undef BUILDMODE_AI
#undef LAST_BUILDMODE
#undef LAST_BUILDMODE