Problem description:
When I convert a map that is using a icon larger then 32by32 it deletes commas in the icon state as well as icon tags.
The current version saves as this:
type = /turf/planetturf/desert
tag = "icon-4
9"; icon_state = "4
9"
What I need it to do(so swapmap can actually use the templete)
type = /turf/planetturf/desert
tag = "icon-4,9"; icon_state = "4,9"
Placing the commas there allows swapmaps to read it, otherwise it can't.
EDIT: Fixed: added a little bit to parsecomma proc it is now
proc/d2sm_ParseCommaList(txt)
var/list/L=new
var/i,ch
for(i=1,i<=length(txt),++i)
if(text2ascii(txt,i)>32) break
for(,i<=length(txt),++i)
ch=text2ascii(txt,i)
if(ch==44)// && (pch < 48 || pch > 57) && (ach < 48 && ach > 57))
var/ach=text2ascii(txt,i+1)//aftercharacters goes up too the 4rd character so ,100" would be seen but not ,1000"
var/aach=text2ascii(txt,i+2)
var/aaach=text2ascii(txt,i+3)
var/aaaach=text2ascii(txt,i+4)
if(ach == 34 || aach == 34 || aaach == 34 || aaaach == 34)
continue
L+=copytext(txt,1,i)
for(++i,i<=length(txt),++i) if(text2ascii(txt,i)>32) break
txt=copytext(txt,i)
i=0;continue
if(ch==40 || ch==91 || ch==123)
i=d2sm_MatchBrace(txt,i,ch)
if(!i) return "No matching brace found for [ascii2text(ch)]"
if(i>1) L+=copytext(txt,1,i)
return L