mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
replaces lentext() with length()
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
if(copytext(heardword,1, 1) in punctuation)
|
||||
heardword = copytext(heardword,2)
|
||||
if(copytext(heardword,-1) in punctuation)
|
||||
heardword = copytext(heardword,1,lentext(heardword))
|
||||
heardword = copytext(heardword,1,length(heardword))
|
||||
heard = "<span class='game say'>...<i>You hear something about<i>... '[heardword]'...</span>"
|
||||
else
|
||||
heard = "<span class='game say'>...<i>You almost hear something...</i>...</span>"
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
|
||||
msg += "*---------*</span>"
|
||||
if(pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\n[p_they(TRUE)] [p_are()] [pose]"
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]"
|
||||
|
||||
if(pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\nIt is [pose]"
|
||||
msg += "\n*---------*</span>"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
|
||||
if(pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\nIt is [pose]"
|
||||
|
||||
|
||||
@@ -726,7 +726,7 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/print_flavor_text(var/shrink = 1)
|
||||
if(flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40 || !shrink)
|
||||
if(length(msg) <= 40 || !shrink)
|
||||
return "<span class='notice'>[html_encode(msg)]</span>" //Repeat after me, "I will not give players access to decoded HTML."
|
||||
else
|
||||
return "<span class='notice'>[copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=[UID()];flavor_more=1'>More...</a></span>"
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
|
||||
/proc/slur(phrase, var/list/slurletters = ("'"))//use a different list as an input if you want to make robots slur with $#@%! characters
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=lentext(phrase)
|
||||
var/counter=lentext(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
@@ -295,8 +295,8 @@
|
||||
|
||||
proc/muffledspeech(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=lentext(phrase)
|
||||
var/counter=lentext(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
@@ -571,7 +571,7 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
for(var/datum/objective/objective in GLOB.all_objectives)
|
||||
if(!mind || objective.target != mind)
|
||||
continue
|
||||
length = lentext(oldname)
|
||||
length = length(oldname)
|
||||
pos = findtextEx(objective.explanation_text, oldname)
|
||||
objective.explanation_text = copytext(objective.explanation_text, 1, pos)+newname+copytext(objective.explanation_text, pos+length)
|
||||
return 1
|
||||
@@ -610,8 +610,8 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
|
||||
/proc/cultslur(n) // Inflicted on victims of a stun talisman
|
||||
var/phrase = html_decode(n)
|
||||
var/leng = lentext(phrase)
|
||||
var/counter=lentext(phrase)
|
||||
var/leng = length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
|
||||
Reference in New Issue
Block a user