mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-19 14:51:27 +00:00
* admin UI improvement * browser_ui_2 * OptimisAAtion * a Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> * AA fix 2 --------- Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
18 lines
787 B
Plaintext
18 lines
787 B
Plaintext
GLOBAL_VAR(create_turf_html)
|
|
|
|
/datum/admins/proc/create_turf(mob/user)
|
|
if(!GLOB.create_turf_html)
|
|
var/turfjs = null
|
|
turfjs = jointext(typesof(/turf), ";")
|
|
GLOB.create_turf_html = file2text('html/create_object.html')
|
|
GLOB.create_turf_html = replacetext(GLOB.create_turf_html, "$ATOM$", "Turf")
|
|
GLOB.create_turf_html = replacetext(GLOB.create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
|
|
|
var/datum/browser/popup = new(user, "create_turf", "<div align='center'>Create Turf</div>", 500, 550)
|
|
var/unique_content = GLOB.create_turf_html
|
|
unique_content = replacetext(unique_content, "/* ref src */", UID())
|
|
popup.set_content(unique_content)
|
|
popup.set_window_options("can_close=1;can_minimize=0;can_maximize=1;can_resize=1")
|
|
popup.open()
|
|
onclose(user, "create_turf")
|