7 world_prefix =
"/world/world_"
8 world_prefix_len = len(world_prefix)
9 world_len = len(world_prefix) + len(
'xxx_xxx')
17 if ((cfmap.Path.find(world_prefix) != 0)
or (len(cfmap.Path) != world_len)):
19 strloc = cfmap.Path[world_prefix_len:].
split(world_sep)
20 x = (
int(strloc[0]) * bigmapxsize) + ob.X
21 y = (
int(strloc[1]) * bigmapysize) + ob.Y
25 return (loc1[0]-loc2[0], loc1[1]-loc2[1])
30 rt = round(t / (math.pi/4))
31 directions = [
"north",
"northwest",
"west",
"southwest",
"south",
"southeast",
"east",
"northeast"]
32 dir_str = directions[(rt + 4)%8]
37 return int(math.sqrt((loc[0]*loc[0])+(loc[1]*loc[1])))