diff options
author | wushin <pasekei@gmail.com> | 2015-02-16 21:32:33 -0600 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-02-17 00:11:28 -0600 |
commit | 7b35af2e20b7b6eb7fa6086f5b621e900131a583 (patch) | |
tree | bb759bc53e965660ce7c0aab88b7b1766b6a22e6 /hercules/code/server/tmw/npcs.py | |
parent | 3d47789c6a19655b0d46ab260f51d6d6c69d1bf2 (diff) | |
download | evol-tools-7b35af2e20b7b6eb7fa6086f5b621e900131a583.tar.gz evol-tools-7b35af2e20b7b6eb7fa6086f5b621e900131a583.tar.bz2 evol-tools-7b35af2e20b7b6eb7fa6086f5b621e900131a583.tar.xz evol-tools-7b35af2e20b7b6eb7fa6086f5b621e900131a583.zip |
Herceles: tmw convertor: fix removing existing files
Diffstat (limited to 'hercules/code/server/tmw/npcs.py')
-rw-r--r-- | hercules/code/server/tmw/npcs.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hercules/code/server/tmw/npcs.py b/hercules/code/server/tmw/npcs.py index c7edea2..8f26197 100644 --- a/hercules/code/server/tmw/npcs.py +++ b/hercules/code/server/tmw/npcs.py @@ -9,7 +9,11 @@ from code.fileutils import * from code.stringutils import * mapsConfFile = "newserverdata/conf/maps.conf" +if os.path.isfile(mapsConfFile): + os.remove(mapsConfFile) mapsIndexFile = "newserverdata/db/map_index.txt" +if os.path.isfile(mapsIndexFile): + os.remove(mapsIndexFile) npcMainScript = "newserverdata/npc/re/scripts_main.conf" mapsIndex = 1 scriptRe = re.compile("^(((?P<map>[^/](.+)),([ ]*)(?P<x>[\d]+),([ ]*)(?P<y>[\d]+),([ ]*)(?P<dir>[\d]+))|(?P<function>function)|-)" + |