Skip to content

Commit 0bb7e47

Browse files
committed
pushing some local changes
1 parent cdea53c commit 0bb7e47

9 files changed

Lines changed: 736 additions & 696 deletions

File tree

data/1098/grounds.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@
943943
<item id="9042" chance="1"/>
944944

945945
<border align="outer" id="22">
946-
<!-- Handles for the 8 different specific cases which might occur with icy earth/stone earth borders -->
946+
-- Handles for the 8 different specific cases which might occur with icy earth/stone earth borders --
947947
<specific>
948948
<conditions>
949949
<match_border id="21" edge="s"/>
@@ -953,7 +953,7 @@
953953
<replace_border id="22" edge="cse" with="5638"/>
954954
</actions>
955955
</specific>
956-
956+
957957
<specific>
958958
<conditions>
959959
<match_border id="21" edge="n"/>
@@ -963,7 +963,7 @@
963963
<replace_border id="22" edge="cne" with="5684"/>
964964
</actions>
965965
</specific>
966-
966+
967967
<specific>
968968
<conditions>
969969
<match_border id="21" edge="s"/>
@@ -973,7 +973,7 @@
973973
<replace_border id="22" edge="csw" with="5638"/>
974974
</actions>
975975
</specific>
976-
976+
977977
<specific>
978978
<conditions>
979979
<match_border id="21" edge="n"/>
@@ -983,7 +983,7 @@
983983
<replace_border id="22" edge="cnw" with="5683"/>
984984
</actions>
985985
</specific>
986-
986+
987987
<specific>
988988
<conditions>
989989
<match_border id="21" edge="e"/>
@@ -993,7 +993,7 @@
993993
<replace_border id="22" edge="cse" with="5637"/>
994994
</actions>
995995
</specific>
996-
996+
997997
<specific>
998998
<conditions>
999999
<match_border id="21" edge="w"/>
@@ -1003,7 +1003,7 @@
10031003
<replace_border id="22" edge="csw" with="5686"/>
10041004
</actions>
10051005
</specific>
1006-
1006+
10071007
<specific>
10081008
<conditions>
10091009
<match_border id="21" edge="e"/>
@@ -1013,7 +1013,7 @@
10131013
<replace_border id="22" edge="cne" with="5637"/>
10141014
</actions>
10151015
</specific>
1016-
1016+
10171017
<specific>
10181018
<conditions>
10191019
<match_border id="21" edge="w"/>
@@ -1025,7 +1025,7 @@
10251025
</specific>
10261026
</border>
10271027
<border align="outer" to="none" id="22">
1028-
<!-- Handles for the 8 different specific cases which might occur with icy earth/stone earth borders -->
1028+
-- Handles for the 8 different specific cases which might occur with icy earth/stone earth borders --
10291029
<specific>
10301030
<conditions>
10311031
<match_border id="21" edge="s"/>
@@ -1035,7 +1035,7 @@
10351035
<replace_border id="22" edge="cse" with="5638"/>
10361036
</actions>
10371037
</specific>
1038-
1038+
10391039
<specific>
10401040
<conditions>
10411041
<match_border id="21" edge="n"/>
@@ -1045,7 +1045,7 @@
10451045
<replace_border id="22" edge="cne" with="5684"/>
10461046
</actions>
10471047
</specific>
1048-
1048+
10491049
<specific>
10501050
<conditions>
10511051
<match_border id="21" edge="s"/>
@@ -1055,7 +1055,7 @@
10551055
<replace_border id="22" edge="csw" with="5638"/>
10561056
</actions>
10571057
</specific>
1058-
1058+
10591059
<specific>
10601060
<conditions>
10611061
<match_border id="21" edge="n"/>
@@ -1065,7 +1065,7 @@
10651065
<replace_border id="22" edge="cnw" with="5683"/>
10661066
</actions>
10671067
</specific>
1068-
1068+
10691069
<specific>
10701070
<conditions>
10711071
<match_border id="21" edge="e"/>
@@ -1075,7 +1075,7 @@
10751075
<replace_border id="22" edge="cse" with="5637"/>
10761076
</actions>
10771077
</specific>
1078-
1078+
10791079
<specific>
10801080
<conditions>
10811081
<match_border id="21" edge="w"/>
@@ -1085,7 +1085,7 @@
10851085
<replace_border id="22" edge="csw" with="5686"/>
10861086
</actions>
10871087
</specific>
1088-
1088+
10891089
<specific>
10901090
<conditions>
10911091
<match_border id="21" edge="e"/>
@@ -1095,7 +1095,7 @@
10951095
<replace_border id="22" edge="cne" with="5637"/>
10961096
</actions>
10971097
</specific>
1098-
1098+
10991099
<specific>
11001100
<conditions>
11011101
<match_border id="21" edge="w"/>

data/1310/creatures.xml

Lines changed: 568 additions & 671 deletions
Large diffs are not rendered by default.

data/clients.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330

331331
<client name="13.10" otb="13.10" visible="true" default="true" data_directory="1310">
332332
<otbm version="3"/>
333-
<extensions from="8.20 - 8.31" to="12.90"/>
333+
<extensions from="8.40" to="13.10"/>
334334
<data format="10.57" dat="0x4A10" spr="0x59E48E02"/>
335335
</client>
336336
</clients>

source/editor.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Editor::Editor(CopyBuffer& copybuffer) :
8282
map.name = sname + ".otbm";
8383
map.spawnfile = sname + "-spawn.xml";
8484
map.housefile = sname + "-house.xml";
85+
map.waypointfile = sname + "-waypoint.xml";
8586
map.description = "No map description available.";
8687
map.unnamed = true;
8788

@@ -199,6 +200,8 @@ void Editor::saveMap(FileName filename, bool showdialog)
199200
map.spawnfile = nstr(_name.GetFullName());
200201
_name.SetName(filename.GetName() + "-house");
201202
map.housefile = nstr(_name.GetFullName());
203+
_name.SetName(filename.GetName() + "-waypoint");
204+
map.waypointfile = nstr(_name.GetFullName());
202205

203206
map.unnamed = false;
204207
}
@@ -210,7 +213,7 @@ void Editor::saveMap(FileName filename, bool showdialog)
210213

211214
// Make temporary backups
212215
//converter.Assign(wxstr(savefile));
213-
std::string backup_otbm, backup_house, backup_spawn;
216+
std::string backup_otbm, backup_house, backup_spawn, backup_waypoint;
214217

215218
if(converter.GetExt() == "otgz") {
216219
save_otgz = true;
@@ -239,6 +242,13 @@ void Editor::saveMap(FileName filename, bool showdialog)
239242
std::remove(backup_spawn.c_str());
240243
std::rename((map_path + map.spawnfile).c_str(), backup_spawn.c_str());
241244
}
245+
246+
converter.SetFullName(wxstr(map.waypointfile));
247+
if (converter.FileExists()) {
248+
backup_waypoint = map_path + nstr(converter.GetName()) + ".xml~";
249+
std::remove(backup_waypoint.c_str());
250+
std::rename((map_path + map.waypointfile).c_str(), backup_waypoint.c_str());
251+
}
242252
}
243253

244254
// Save the map
@@ -289,6 +299,12 @@ void Editor::saveMap(FileName filename, bool showdialog)
289299
std::rename(backup_spawn.c_str(), std::string(spawn_filename + ".xml").c_str());
290300
}
291301

302+
if (!backup_waypoint.empty()) {
303+
converter.SetFullName(wxstr(map.waypointfile));
304+
std::string waypoint_filename = map_path + nstr(converter.GetName());
305+
std::rename(backup_waypoint.c_str(), std::string(waypoint_filename + ".xml").c_str());
306+
}
307+
292308
// Display the error
293309
g_gui.PopupDialog("Error", "Could not save, unable to open target for writing.", wxOK);
294310
}
@@ -340,6 +356,12 @@ void Editor::saveMap(FileName filename, bool showdialog)
340356
std::string spawn_filename = map_path + nstr(converter.GetName());
341357
std::rename(backup_spawn.c_str(), std::string(spawn_filename + "." + date.str() + ".xml").c_str());
342358
}
359+
360+
if (!backup_waypoint.empty()) {
361+
converter.SetFullName(wxstr(map.spawnfile));
362+
std::string waypoint_filename = map_path + nstr(converter.GetName());
363+
std::rename(backup_waypoint.c_str(), std::string(waypoint_filename + "." + date.str() + ".xml").c_str());
364+
}
343365
} else {
344366
// Delete the temporary files
345367
std::remove(backup_otbm.c_str());

0 commit comments

Comments
 (0)