mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
unicode support port wip
This commit is contained in:
@@ -241,7 +241,8 @@
|
||||
var/variables_start = findtext(full_def, "{")
|
||||
var/path_text = trim_text(copytext(full_def, 1, variables_start))
|
||||
var/atom_def = text2path(path_text) //path definition, e.g /obj/foo/bar
|
||||
old_position = dpos + 1
|
||||
if(dpos)
|
||||
old_position = dpos + length(model[dpos])
|
||||
|
||||
if(!ispath(atom_def, /atom)) // Skip the item if the path does not exist. Fix your crap, mappers!
|
||||
if(bad_paths)
|
||||
@@ -253,7 +254,7 @@
|
||||
var/list/fields = list()
|
||||
|
||||
if(variables_start)//if there's any variable
|
||||
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
|
||||
full_def = copytext(full_def, variables_start + length(full_def[variables_start]), -length(copytext_char(full_def, -1))) //removing the last '}'
|
||||
fields = readlist(full_def, ";")
|
||||
if(fields.len)
|
||||
if(!trim(fields[fields.len]))
|
||||
@@ -423,12 +424,13 @@
|
||||
|
||||
var/trim_left = trim_text(copytext(text,old_position,(equal_position ? equal_position : position)))
|
||||
var/left_constant = delimiter == ";" ? trim_left : parse_constant(trim_left)
|
||||
old_position = position + 1
|
||||
if(position)
|
||||
old_position = position + length(text[position])
|
||||
|
||||
if(equal_position && !isnum(left_constant))
|
||||
// Associative var, so do the association.
|
||||
// Note that numbers cannot be keys - the RHS is dropped if so.
|
||||
var/trim_right = trim_text(copytext(text,equal_position+1,position))
|
||||
var/trim_right = trim_text(copytext(text, equal_position + length(text[equal_position]), position))
|
||||
var/right_constant = parse_constant(trim_right)
|
||||
.[left_constant] = right_constant
|
||||
|
||||
@@ -442,12 +444,12 @@
|
||||
return num
|
||||
|
||||
// string
|
||||
if(findtext(text,"\"",1,2))
|
||||
return copytext(text,2,findtext(text,"\"",3,0))
|
||||
if(text[1] == "\"")
|
||||
return copytext(text, length(text[1]) + 1, findtext(text, "\"", length(text[1]) + 1))
|
||||
|
||||
// list
|
||||
if(copytext(text,1,6) == "list(")
|
||||
return readlist(copytext(text,6,length(text)))
|
||||
if(copytext(text, 1, 6) == "list(")//6 == length("list(") + 1
|
||||
return readlist(copytext(text, 6, -1))
|
||||
|
||||
// typepath
|
||||
var/path = text2path(text)
|
||||
@@ -455,8 +457,8 @@
|
||||
return path
|
||||
|
||||
// file
|
||||
if(copytext(text,1,2) == "'")
|
||||
return file(copytext(text,2,length(text)))
|
||||
if(text[1] == "'")
|
||||
return file(copytext_char(text, 2, -1))
|
||||
|
||||
// null
|
||||
if(text == "null")
|
||||
|
||||
@@ -60,8 +60,9 @@
|
||||
// build_cache will check bad paths for us
|
||||
var/list/modelCache = build_cache(TRUE, report.bad_paths)
|
||||
|
||||
var/static/regex/area_or_turf = regex(@"/(turf|area)/")
|
||||
for(var/path in report.bad_paths)
|
||||
if(copytext(path, 1, 7) == "/turf/" || copytext(path, 1, 7) == "/area/")
|
||||
if(area_or_turf.Find("[path]", 1, 1))
|
||||
report.loadable = FALSE
|
||||
|
||||
// check for tiles with the wrong number of turfs or areas
|
||||
|
||||
Reference in New Issue
Block a user