diff --git a/packages/maps/dev_aqueous.cgz b/packages/maps/dev_aqueous.cgz index 690d7cc9..2c39ff6f 100644 Binary files a/packages/maps/dev_aqueous.cgz and b/packages/maps/dev_aqueous.cgz differ diff --git a/packages/maps/dev_arabian.cgz b/packages/maps/dev_arabian.cgz index 03dbdbf2..1d95d171 100644 Binary files a/packages/maps/dev_arabian.cgz and b/packages/maps/dev_arabian.cgz differ diff --git a/packages/maps/dev_arctic.cgz b/packages/maps/dev_arctic.cgz index 5efc64da..c20bf353 100644 Binary files a/packages/maps/dev_arctic.cgz and b/packages/maps/dev_arctic.cgz differ diff --git a/packages/maps/dev_arid.cgz b/packages/maps/dev_arid.cgz index 609ee3f9..8a47647d 100644 Binary files a/packages/maps/dev_arid.cgz and b/packages/maps/dev_arid.cgz differ diff --git a/packages/maps/dev_avenue.cgz b/packages/maps/dev_avenue.cgz index 4fe3972c..8311d47a 100644 Binary files a/packages/maps/dev_avenue.cgz and b/packages/maps/dev_avenue.cgz differ diff --git a/packages/maps/dev_cavern.cgz b/packages/maps/dev_cavern.cgz index 127416fa..41289df8 100644 Binary files a/packages/maps/dev_cavern.cgz and b/packages/maps/dev_cavern.cgz differ diff --git a/packages/maps/dev_complex.cgz b/packages/maps/dev_complex.cgz index 546dc33b..14111de4 100644 Binary files a/packages/maps/dev_complex.cgz and b/packages/maps/dev_complex.cgz differ diff --git a/packages/maps/dev_depot.cgz b/packages/maps/dev_depot.cgz index d60024bd..5ceae869 100644 Binary files a/packages/maps/dev_depot.cgz and b/packages/maps/dev_depot.cgz differ diff --git a/packages/maps/dev_desert.cgz b/packages/maps/dev_desert.cgz index 1e359151..5b1a75af 100644 Binary files a/packages/maps/dev_desert.cgz and b/packages/maps/dev_desert.cgz differ diff --git a/packages/maps/dev_desert2.cgz b/packages/maps/dev_desert2.cgz index 26b269a5..aac26f23 100644 Binary files a/packages/maps/dev_desert2.cgz and b/packages/maps/dev_desert2.cgz differ diff --git a/packages/maps/dev_desert3.cgz b/packages/maps/dev_desert3.cgz index 4f14c14f..59ed64fb 100644 Binary files a/packages/maps/dev_desert3.cgz and b/packages/maps/dev_desert3.cgz differ diff --git a/packages/maps/dev_douze.cgz b/packages/maps/dev_douze.cgz index 6286781a..ba82b047 100644 Binary files a/packages/maps/dev_douze.cgz and b/packages/maps/dev_douze.cgz differ diff --git a/packages/maps/dev_edifice.cgz b/packages/maps/dev_edifice.cgz index 148dde72..80c7c2a8 100644 Binary files a/packages/maps/dev_edifice.cgz and b/packages/maps/dev_edifice.cgz differ diff --git a/packages/maps/dev_elevation.cgz b/packages/maps/dev_elevation.cgz index b4a30024..3065ce96 100644 Binary files a/packages/maps/dev_elevation.cgz and b/packages/maps/dev_elevation.cgz differ diff --git a/packages/maps/dev_gothic.cgz b/packages/maps/dev_gothic.cgz index 1030d109..fec1658a 100644 Binary files a/packages/maps/dev_gothic.cgz and b/packages/maps/dev_gothic.cgz differ diff --git a/packages/maps/dev_iceroad.cgz b/packages/maps/dev_iceroad.cgz index 47aca4a2..972b5b19 100644 Binary files a/packages/maps/dev_iceroad.cgz and b/packages/maps/dev_iceroad.cgz differ diff --git a/packages/maps/dev_industrial.cgz b/packages/maps/dev_industrial.cgz index c495bade..4587858c 100644 Binary files a/packages/maps/dev_industrial.cgz and b/packages/maps/dev_industrial.cgz differ diff --git a/packages/maps/dev_ingress.cgz b/packages/maps/dev_ingress.cgz index e597ae6c..b8c6d531 100644 Binary files a/packages/maps/dev_ingress.cgz and b/packages/maps/dev_ingress.cgz differ diff --git a/packages/maps/dev_keller.cgz b/packages/maps/dev_keller.cgz index 28c9d4c7..e1a5019e 100644 Binary files a/packages/maps/dev_keller.cgz and b/packages/maps/dev_keller.cgz differ diff --git a/packages/maps/dev_lainio.cgz b/packages/maps/dev_lainio.cgz index 1b03665e..903c7a9d 100644 Binary files a/packages/maps/dev_lainio.cgz and b/packages/maps/dev_lainio.cgz differ diff --git a/packages/maps/dev_mines.cgz b/packages/maps/dev_mines.cgz index 33ef9fb1..be8470d1 100644 Binary files a/packages/maps/dev_mines.cgz and b/packages/maps/dev_mines.cgz differ diff --git a/packages/maps/dev_outpost.cgz b/packages/maps/dev_outpost.cgz index 7ca7db3f..047500f8 100644 Binary files a/packages/maps/dev_outpost.cgz and b/packages/maps/dev_outpost.cgz differ diff --git a/packages/maps/dev_power.cgz b/packages/maps/dev_power.cgz index 69e3d8ed..af750762 100644 Binary files a/packages/maps/dev_power.cgz and b/packages/maps/dev_power.cgz differ diff --git a/packages/maps/dev_rattrap.cgz b/packages/maps/dev_rattrap.cgz index e5b1da86..2f7ff692 100644 Binary files a/packages/maps/dev_rattrap.cgz and b/packages/maps/dev_rattrap.cgz differ diff --git a/packages/maps/dev_scaffold.cgz b/packages/maps/dev_scaffold.cgz index b60de7a2..59528da4 100644 Binary files a/packages/maps/dev_scaffold.cgz and b/packages/maps/dev_scaffold.cgz differ diff --git a/packages/maps/dev_shine.cgz b/packages/maps/dev_shine.cgz index 44c246a3..9e8a3344 100644 Binary files a/packages/maps/dev_shine.cgz and b/packages/maps/dev_shine.cgz differ diff --git a/packages/maps/dev_snow.cgz b/packages/maps/dev_snow.cgz index 4a51f63c..e6776733 100644 Binary files a/packages/maps/dev_snow.cgz and b/packages/maps/dev_snow.cgz differ diff --git a/packages/maps/dev_stellar.cgz b/packages/maps/dev_stellar.cgz index dc435ef5..55fc69e5 100644 Binary files a/packages/maps/dev_stellar.cgz and b/packages/maps/dev_stellar.cgz differ diff --git a/packages/maps/dev_sunset.cgz b/packages/maps/dev_sunset.cgz index af1342dc..2478b44e 100644 Binary files a/packages/maps/dev_sunset.cgz and b/packages/maps/dev_sunset.cgz differ diff --git a/packages/maps/dev_swamp.cgz b/packages/maps/dev_swamp.cgz index 383cd664..3fa28c4e 100644 Binary files a/packages/maps/dev_swamp.cgz and b/packages/maps/dev_swamp.cgz differ diff --git a/packages/maps/dev_terros.cgz b/packages/maps/dev_terros.cgz index 8c08f607..a942fbba 100644 Binary files a/packages/maps/dev_terros.cgz and b/packages/maps/dev_terros.cgz differ diff --git a/packages/maps/dev_toxic.cgz b/packages/maps/dev_toxic.cgz index c7337ad9..02d245cc 100644 Binary files a/packages/maps/dev_toxic.cgz and b/packages/maps/dev_toxic.cgz differ diff --git a/packages/maps/dev_urban.cgz b/packages/maps/dev_urban.cgz index 0ea43cd7..e6f50435 100644 Binary files a/packages/maps/dev_urban.cgz and b/packages/maps/dev_urban.cgz differ diff --git a/packages/maps/dev_venison.cgz b/packages/maps/dev_venison.cgz index ec531d2b..27474226 100644 Binary files a/packages/maps/dev_venison.cgz and b/packages/maps/dev_venison.cgz differ diff --git a/packages/maps/dev_wasteland.cgz b/packages/maps/dev_wasteland.cgz index e0238cc2..5bbff724 100644 Binary files a/packages/maps/dev_wasteland.cgz and b/packages/maps/dev_wasteland.cgz differ diff --git a/packages/maps/dev_werk.cgz b/packages/maps/dev_werk.cgz index 91247e11..fbc4340f 100644 Binary files a/packages/maps/dev_werk.cgz and b/packages/maps/dev_werk.cgz differ diff --git a/source/dev_tools/create_map_license_summary.cfg b/source/dev_tools/create_map_license_summary.cfg new file mode 100644 index 00000000..4675cce4 --- /dev/null +++ b/source/dev_tools/create_map_license_summary.cfg @@ -0,0 +1,34 @@ +// - batch-update map license information +// - generate maps_readme.txt (map license summary file) +// (requires debug binary of game client, because of loadmap and debugline) + +tempalias maplist [dev_aqueous dev_arabian dev_arctic dev_arid dev_avenue dev_cavern dev_complex dev_depot dev_desert dev_desert2 dev_desert3 dev_douze dev_edifice dev_elevation + dev_gothic dev_iceroad dev_industrial dev_ingress dev_keller dev_lainio dev_mines dev_outpost dev_power dev_rattrap dev_scaffold dev_shine dev_snow dev_stellar dev_sunset + dev_swamp dev_terros dev_toxic dev_urban dev_venison dev_wasteland dev_werk] + +tempalias lfn maps_license.txt +debugline $lfn "TO ENSURE YOU HAVE NO ERRORS WITH ASSAULTCUBE:\n\t* Don't edit, rename or delete ANY files in this directory.\n\t* Don't add files to this directory.\n" +debugline $lfn "This folder contains all builtin (a.k.a. \"official\") maps.\nEach map contains embedded information about author and license, accessible from within the game.\nHere's a summary:\n" + +if 0 [ looplist [ +new_content cc-by-nc-sa-3.0 "by foo, email: foo@bar.org" +] [ m l cc ] [ + loadmap $m + if (strlen $l) [ mapinfo_license $l ] + if (strlen $cc) [ mapinfo_comment $cc ] + if (+ (strlen $l) (strlen $cc)) [ savemap $m ] +] ] + +looplist $maplist m [ + loadmap $m + debugline $lfn (concatword $mapmsg " (" $m ".cgz, size " (mapsize) ", revision " $curmaprevision ")") + if (< (findlist $__maplicense_list $mapinfo_license) 0) [ + debugline $lfn (concatword "map license tag: \"" $mapinfo_license "\"") + ] [ + debugline $lfn (getalias (concatword __maplicense_fullname_ $mapinfo_license)) + ] + if (strlen $mapinfo_comment) [ + debugline $lfn $mapinfo_comment + ] + debugline $lfn "" +] diff --git a/source/src/command.cpp b/source/src/command.cpp index e2cdca66..df47376e 100644 --- a/source/src/command.cpp +++ b/source/src/command.cpp @@ -1875,3 +1875,18 @@ void debugargs(char **args, int numargs) } COMMAND(debugargs, "v"); + +#ifndef STANDALONE +#ifdef _DEBUG +void debugline(char *fname, char *line) // print one line to a logfile +{ + if(!multiplayer()) + { + stream *f = openfile(behindpath(fname), "a"); + if(f) f->printf("%s\n", line); + if(f) delete f; + } +} +COMMAND(debugline, "ss"); +#endif +#endif diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 7825154d..ca9e85f8 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -938,6 +938,13 @@ bool load_world(char *mname) // still supports all map formats that have return true; } +#ifdef _DEBUG +COMMANDF(loadmap, "s", (char *mapname) +{ + if(!multiplayer()) load_world(mapname); +}); +#endif + // support reading and writing binary data in config files static bool hexbinenabled = false;