Author: esr
Date: Sat Oct 18 07:36:11 2008
New Revision: 30243
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30243&view=rev
Log:
trackplacer: a feature turned out to be excessively dangerous.
Modified:
trunk/data/tools/trackplacer
Modified: trunk/data/tools/trackplacer
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/trackplacer?rev=30243&r1=30242&r2=30243&view=diff
==============================================================================
--- trunk/data/tools/trackplacer (original)
+++ trunk/data/tools/trackplacer Sat Oct 18 07:36:11 2008
@@ -140,6 +140,8 @@
self.selected_id = name
def write(self, fp):
"Record a set of named journey tracks."
+ #if os.stat(fp.name).st_mtime > self.time_last_read:
+ # raise IOException("File was modified since last read.", fp.name)
if fp.name.endswith(".cfg"):
fp.write(self.before)
fp.write("# trackplacer: tracks begin\n#\n")
@@ -244,6 +246,7 @@
else:
raise IOException("Missing map declaration.", fp.name)
fp.close()
+ #self.time_last_read = time.time()
self.modified = 0
def __getitem__(self, n):
return self.tracks[self.selected_id][n]
@@ -294,6 +297,7 @@
# If the neighbors are adjacent, insert between them
if abs(closest[0] - next_closest[0]) == 1:
self.selected_track().insert(max(closest[0], next_closest[0]),
(action, x, y))
+ self.modified += 1
return
# Otherwise, append
self.selected_track().append((action, x, y))
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits