Make_Multitile()
set src in view(usr)
var/list/states = icon_states(src.icon)
for(var/i=1, i<=states.len, i++)
var/j = states[i]
var/list/j2 = dd_text2list(j,",") // This is a proc in Deadron's TextHandling library.
var/j3 = text2num(j2[1])
var/j4 = text2num(j2[2])
if(j3 && j4 == 0)
src.icon_state = "0,0"
else
var/turf/turf/T = new(locate(src.x+j3,src.y+j4,src.z))
T.icon = src.icon
T.icon_state = j
Problem description:
This is a verb on a turf. I'm trying to make it so if you choose a big non-DMI image for the turf's icon, you can automatically make a multitile turf out of it. When I use this verb on a turf, however, all it does is replace the turf with the blank default turf. Any help?
Where I am not using a "src." or "usr." command in front of variable, it is because DM automatically makes it into "src." when it compiles.
For example
is the same as
If this doesn't help you figure it out, just reply again, and I will help out in a more direct manner. I am just trying to help you figure it out on your own, and not tell you exactly how to fix it :D Good luck.