Missing href token adds

This commit is contained in:
Novacat
2022-12-15 15:24:36 -05:00
committed by CHOMPStation2
parent 02092ee913
commit 1e7cbec2e3
66 changed files with 2368 additions and 461 deletions

View File

@@ -1,13 +1,17 @@
/var/create_object_html = null
/datum/admins/proc/create_panel_helper(template)
var/final_html = replacetext(template, "/* ref src */", "\ref[src];[HrefToken()]")
final_html = replacetext(final_html,"/* hreftokenfield */","[HrefTokenFormField()]")
return final_html
/datum/admins/proc/create_object(var/mob/user)
var/static/create_object_html = null
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")
user << browse(create_panel_helper(create_object_html), "window=create_object;size=680x600")
/datum/admins/proc/quick_create_object(var/mob/user)
@@ -28,7 +32,7 @@
"/obj/mecha",
"/obj/item/mecha_parts",
"/obj/item/mecha_parts/mecha_equipment")
pathtext = tgui_input_list(usr, "Select the path of the object you wish to create.", "Path", choices, "/obj")
if(!pathtext)
@@ -41,4 +45,4 @@
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")
user << browse(create_panel_helper(quick_create_object_html), "window=quick_create_object;size=680x600")