/mob/living/proc/private_notes_window(mob/user)
if(user != src)
return
if(!private_notes)
private_notes = " "
return
var/notes = replacetext(html_decode(src.private_notes), "\n", "
")
var/dat = {"
| Save Character Preferences | "} dat += {"
| Edit |
[notes]
"} var/key = "private_notes[src.real_name]" //Generate a unique key so we can make unique clones of windows, that way we can have more than one if(src.ckey) key = "[key][src.ckey]" //Add a ckey if they have one, in case their name is the same winclone(user, "private_notes", key) //Allows us to have more than one OOC notes panel open winshow(user, key, TRUE) //Register our window var/datum/browser/popup = new(user, key, "Private Notes: [src.name]", 500, 600) //Create the window popup.set_content(dat) //Populate window contents popup.open(FALSE) // Skip registring onclose on the browser pane onclose(user, key, src) // We want to register on the window itself