Preparation for 513 (#7677)

* Preparation for 513

* lentext replacement
This commit is contained in:
Matt Atlas
2019-12-18 08:10:16 +01:00
committed by Werner
parent 8ad9e76bed
commit decc0b14a7
26 changed files with 86 additions and 73 deletions

View File

@@ -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

View File

@@ -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