mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
All credits to the author for this handy little script. I Committed the modified python script to tool directory. Although it needs to be in the root folder of your repo to work. To notice the improved compile times, in dreammaker go to Build > Preferences > and untick "automatically set file_dir for subfolders" If this commit inteferes with any large projects just revert it, do your thing, then rerun the script. Easy-peasy. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4488 316c924e-a436-60f5-8080-3fe189b3f50e
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
/var/create_object_html = null
|
|
|
|
/obj/admins/proc/create_object(var/mob/user)
|
|
if (!create_object_html)
|
|
var/objectjs = null
|
|
objectjs = dd_list2text(typesof(/obj), ";")
|
|
create_object_html = file2text('html/create_object.html')
|
|
create_object_html = dd_replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
|
|
|
user << browse(dd_replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
|
|
|
|
|
|
/obj/admins/proc/quick_create_object(var/mob/user)
|
|
|
|
var/quick_create_object_html = null
|
|
var/pathtext = null
|
|
|
|
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/item","/obj/item/weapon","/obj/machinery")
|
|
|
|
var path = text2path(pathtext)
|
|
|
|
if (!quick_create_object_html)
|
|
var/objectjs = null
|
|
objectjs = dd_list2text(typesof(path), ";")
|
|
quick_create_object_html = file2text('html/create_object.html')
|
|
quick_create_object_html = dd_replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
|
|
|
user << browse(dd_replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475") |