mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 20:22:42 +00:00
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
var/global/create_object_html = null
|
|
|
|
/datum/admins/proc/create_object(var/mob/user)
|
|
if (!create_object_html)
|
|
var/objectjs = null
|
|
objectjs = jointext(typesof(/obj), ";")
|
|
create_object_html = file2text('html/create_object.html')
|
|
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
|
|
|
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=680x600")
|
|
|
|
|
|
/datum/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") as null|anything in list("/obj",
|
|
"/obj/structure",
|
|
"/obj/item",
|
|
"/obj/item/gun",
|
|
"/obj/item/reagent_containers",
|
|
"/obj/item/reagent_containers/food",
|
|
"/obj/item/clothing",
|
|
"/obj/machinery",
|
|
"/obj/mecha",
|
|
"/obj/item/mecha_parts",
|
|
"/obj/item/mecha_parts/mecha_equipment")
|
|
|
|
if(!pathtext)
|
|
return
|
|
var path = text2path(pathtext)
|
|
|
|
if (!quick_create_object_html)
|
|
var/objectjs = null
|
|
objectjs = jointext(typesof(path), ";")
|
|
quick_create_object_html = file2text('html/create_object.html')
|
|
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
|
|
|
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=680x600")
|