mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 11:58:39 +01:00
Preparation for 513 (#7677)
* Preparation for 513 * lentext replacement
This commit is contained in:
@@ -411,13 +411,13 @@
|
||||
cidsearch = "AND computerid = '[playercid]' "
|
||||
mirror_cid = "AND mirrors.computerid = '[playercid]'"
|
||||
else
|
||||
if(adminckey && lentext(adminckey) >= 3)
|
||||
if(adminckey && length(adminckey) >= 3)
|
||||
adminsearch = "AND a_ckey LIKE '[adminckey]%' "
|
||||
if(playerckey && lentext(playerckey) >= 3)
|
||||
if(playerckey && length(playerckey) >= 3)
|
||||
playersearch = "AND ckey LIKE '[playerckey]%' "
|
||||
if(playerip && lentext(playerip) >= 3)
|
||||
if(playerip && length(playerip) >= 3)
|
||||
ipsearch = "AND ip LIKE '[playerip]%' "
|
||||
if(playercid && lentext(playercid) >= 7)
|
||||
if(playercid && length(playercid) >= 7)
|
||||
cidsearch = "AND computerid LIKE '[playercid]%' "
|
||||
|
||||
if(dbbantype)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
proc/Intoxicated(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)
|
||||
@@ -48,7 +48,7 @@ proc/stutter(phrase, str = 1)
|
||||
if(!R.Find(word))
|
||||
continue
|
||||
|
||||
if (lentext(word) > 1)
|
||||
if (length(word) > 1)
|
||||
if((prob(20) && str > 1) || (prob(30) && str > 4)) // stutter word instead
|
||||
var/stuttered = R.group[2] + R.group[3]
|
||||
if(upper.Find(stuttered) && !upper.Find(stuttered, 2)) // if they're screaming (all caps) or saying something like 'AI', keep the letter capitalized - else don't
|
||||
@@ -56,7 +56,7 @@ proc/stutter(phrase, str = 1)
|
||||
word = R.Replace(word, "$1$2$3-[stuttered]$4")
|
||||
else if(prob(25) && str > 1) // prolong word
|
||||
var/prolonged = ""
|
||||
var/prolong_amt = min(lentext(word), 5)
|
||||
var/prolong_amt = min(length(word), 5)
|
||||
prolong_amt = rand(1, prolong_amt)
|
||||
for(var/j = 0, j < prolong_amt, j++)
|
||||
prolonged += R.group[2]
|
||||
|
||||
@@ -249,7 +249,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'>...You hear something about...[heardword]</span>"
|
||||
|
||||
else
|
||||
|
||||
@@ -366,7 +366,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[T.He] [pose]"
|
||||
|
||||
|
||||
@@ -12,7 +12,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 [pose]"
|
||||
|
||||
|
||||
@@ -39,7 +39,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 [pose]"
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
/mob/proc/print_flavor_text()
|
||||
if (flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
if(length(msg) <= 40)
|
||||
return "<span class='notice'>[msg]</span>"
|
||||
else
|
||||
return "<span class='notice'>[copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a></span>"
|
||||
|
||||
@@ -334,8 +334,8 @@ var/list/global/organ_rel_size = list(
|
||||
|
||||
proc/slur(phrase, strength = 100)
|
||||
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)
|
||||
|
||||
@@ -248,8 +248,8 @@ proc/blood_incompatible(donor,receiver,donor_species,receiver_species)
|
||||
if(donor_species != receiver_species)
|
||||
return 1
|
||||
|
||||
var/donor_antigen = copytext(donor,1,lentext(donor))
|
||||
var/receiver_antigen = copytext(receiver,1,lentext(receiver))
|
||||
var/donor_antigen = copytext(donor,1,length(donor))
|
||||
var/receiver_antigen = copytext(receiver,1,length(receiver))
|
||||
var/donor_rh = (findtext(donor,"+")>0)
|
||||
var/receiver_rh = (findtext(receiver,"+")>0)
|
||||
|
||||
|
||||
@@ -998,7 +998,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
W.germ_level = 0
|
||||
return rval
|
||||
|
||||
/obj/item/organ/external/proc/clamp()
|
||||
/obj/item/organ/external/proc/clamp_organ()
|
||||
var/rval = 0
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
for(var/datum/wound/W in wounds)
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
var/spawn_type = pop(spawning_types)
|
||||
var/obj/spawned_obj = new spawn_type(src.loc)
|
||||
if(source_material)
|
||||
if(lentext(source_material.name) < MAX_MESSAGE_LEN)
|
||||
if(length(source_material.name) < MAX_MESSAGE_LEN)
|
||||
spawned_obj.name = "[source_material] " + spawned_obj.name
|
||||
if(lentext(source_material.desc) < MAX_MESSAGE_LEN * 2)
|
||||
if(length(source_material.desc) < MAX_MESSAGE_LEN * 2)
|
||||
if(spawned_obj.desc)
|
||||
spawned_obj.desc += " It is made of [source_material]."
|
||||
else
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
else if(findtext(msg," ")==0)
|
||||
return
|
||||
else
|
||||
/*var/l = lentext(msg)
|
||||
/*var/l = length(msg)
|
||||
if(findtext(msg," ",l,l+1)==0)
|
||||
msg+=" "*/
|
||||
seperate = text2list(msg, " ")
|
||||
@@ -77,12 +77,12 @@
|
||||
text = "[pick(heard_words)]"
|
||||
else
|
||||
text = pick(text2list(word, " "))
|
||||
if(lentext(text)==1)
|
||||
if(length(text)==1)
|
||||
text=uppertext(text)
|
||||
else
|
||||
var/cap = copytext(text,1,2)
|
||||
cap = uppertext(cap)
|
||||
cap += copytext(text,2,lentext(text)+1)
|
||||
cap += copytext(text,2,length(text)+1)
|
||||
text=cap
|
||||
var/q = 0
|
||||
msg+=text
|
||||
|
||||
@@ -141,7 +141,7 @@ proc/string_tolist(var/string)
|
||||
var/list/L = new/list()
|
||||
|
||||
var/i
|
||||
for(i=1, i<=lentext(string), i++)
|
||||
for(i=1, i<=length(string), i++)
|
||||
L.Add(copytext(string, i, i))
|
||||
|
||||
return L
|
||||
@@ -154,12 +154,12 @@ proc/string_explode(var/string, var/separator)
|
||||
var/lasti = 1
|
||||
var/list/L = new/list()
|
||||
|
||||
for(i=1, i<=lentext(string)+1, i++)
|
||||
for(i=1, i<=length(string)+1, i++)
|
||||
if(copytext(string, i, i+1) == separator) // We found a separator
|
||||
L.Add(copytext(string, lasti, i))
|
||||
lasti = i+1
|
||||
|
||||
L.Add(copytext(string, lasti, lentext(string)+1)) // Adds the last segment
|
||||
L.Add(copytext(string, lasti, length(string)+1)) // Adds the last segment
|
||||
|
||||
return L
|
||||
|
||||
@@ -186,7 +186,7 @@ proc/n_reverse(var/string)
|
||||
if(istext(string))
|
||||
var/newstring = ""
|
||||
var/i
|
||||
for(i=lentext(string), i>0, i--)
|
||||
for(i=length(string), i>0, i--)
|
||||
if(i>=1000)
|
||||
break
|
||||
newstring = newstring + copytext(string, i, i+1)
|
||||
@@ -250,9 +250,9 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
|
||||
/proc/string_replacetext(var/haystack,var/a,var/b)
|
||||
if(istext(haystack)&&istext(a)&&istext(b))
|
||||
var/i = 1
|
||||
var/lenh=lentext(haystack)
|
||||
var/lena=lentext(a)
|
||||
//var/lenb=lentext(b)
|
||||
var/lenh=length(haystack)
|
||||
var/lena=length(a)
|
||||
//var/lenb=length(b)
|
||||
var/count = 0
|
||||
var/list/dat = list()
|
||||
while (i < lenh)
|
||||
|
||||
@@ -31,8 +31,8 @@ n_scriptOptions
|
||||
IsValidID(id) //returns true if all the characters in the string are okay to be in an identifier name
|
||||
if(!CanStartID(id)) //don't need to grab first char in id, since text2ascii does it automatically
|
||||
return 0
|
||||
if(lentext(id)==1) return 1
|
||||
for(var/i=2 to lentext(id))
|
||||
if(length(id)==1) return 1
|
||||
for(var/i=2 to length(id))
|
||||
if(!IsValidIDChar(copytext(id, i, i+1)))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
Scan() //Creates a list of tokens from source code
|
||||
var/list/tokens=new
|
||||
for(, src.codepos<=lentext(code), src.codepos++)
|
||||
for(, src.codepos<=length(code), src.codepos++)
|
||||
|
||||
var/char=copytext(code, codepos, codepos+1)
|
||||
if(char=="\n")
|
||||
@@ -154,7 +154,7 @@
|
||||
*/
|
||||
ReadString(start)
|
||||
var/buf
|
||||
for(, codepos <= lentext(code), codepos++)//codepos to lentext(code))
|
||||
for(, codepos <= length(code), codepos++)//codepos to length(code))
|
||||
var/char=copytext(code, codepos, codepos+1)
|
||||
switch(char)
|
||||
if("\\") //Backslash (\) encountered in string
|
||||
@@ -190,7 +190,7 @@
|
||||
ReadWord()
|
||||
var/char=copytext(code, codepos, codepos+1)
|
||||
var/buf
|
||||
while(!delim.Find(char) && codepos<=lentext(code))
|
||||
while(!delim.Find(char) && codepos<=length(code))
|
||||
buf+=char
|
||||
char=copytext(code, ++codepos, codepos+1)
|
||||
codepos-- //allow main Scan() proc to read the delimiter
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
while(options.symbols.Find(buf+char))
|
||||
buf+=char
|
||||
if(++codepos>lentext(code)) break
|
||||
if(++codepos>length(code)) break
|
||||
char=copytext(code, codepos, codepos+1)
|
||||
|
||||
codepos-- //allow main Scan() proc to read the next character
|
||||
@@ -255,7 +255,7 @@
|
||||
comm = 2 // starts a multi-line comment
|
||||
|
||||
while(comm)
|
||||
if(++codepos>lentext(code)) break
|
||||
if(++codepos>length(code)) break
|
||||
|
||||
if(expectedend) // ending statement expected...
|
||||
char = copytext(code, codepos, codepos+1)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
playsound(target.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
|
||||
target.apply_damage(1, BRUTE, target_zone, 0)
|
||||
affected.clamp()
|
||||
affected.clamp_organ()
|
||||
spread_germs_to_organ(affected, user)
|
||||
|
||||
/datum/surgery_step/generic/cut_with_laser/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -95,7 +95,7 @@
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
|
||||
target.apply_damage(1, BRUTE, target_zone, 0)
|
||||
affected.clamp()
|
||||
affected.clamp_organ()
|
||||
affected.open = 2
|
||||
|
||||
/datum/surgery_step/generic/incision_manager/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -216,7 +216,7 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("<span class='notice'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</span>", \
|
||||
"<span class='notice'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</span>")
|
||||
affected.clamp()
|
||||
affected.clamp_organ()
|
||||
spread_germs_to_organ(affected, user)
|
||||
playsound(target.loc, 'sound/items/Welder.ogg', 15, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user