mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport
This commit is contained in:
@@ -420,6 +420,8 @@
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
|
||||
@@ -327,6 +327,31 @@ var/list/slot_equipment_priority = list( \
|
||||
if (popup)
|
||||
memory()
|
||||
|
||||
/mob/proc/update_flavor_text()
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
src << "<h2 class='alert'>OOC Warning:</h2>"
|
||||
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if (flavor_text && flavor_text != "")
|
||||
var/msg = dd_replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
return "\blue [msg]"
|
||||
else
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
/*
|
||||
/mob/verb/help()
|
||||
set name = "Help"
|
||||
@@ -535,6 +560,12 @@ var/list/slot_equipment_priority = list( \
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, dd_replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
|
||||
onclose(usr, "[name]")
|
||||
if(href_list["flavor_change"])
|
||||
update_flavor_text()
|
||||
// ..()
|
||||
return
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
var/slurring = null //Carbon
|
||||
var/real_name = null
|
||||
// var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb
|
||||
var/flavor_text = ""
|
||||
var/blinded = null
|
||||
var/bhunger = 0 //Carbon
|
||||
var/ajourn = 0
|
||||
|
||||
@@ -1062,6 +1062,8 @@ datum/preferences
|
||||
if(character.dna)
|
||||
character.dna.real_name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
|
||||
character.gender = gender
|
||||
|
||||
character.age = age
|
||||
|
||||
Reference in New Issue
Block a user