create_map_license_summary.cfg 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // - batch-update map license information
  2. // - generate maps_readme.txt (map license summary file)
  3. // (requires debug binary of game client, because of loadmap and debugline)
  4. 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
  5. 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
  6. dev_swamp dev_terros dev_toxic dev_urban dev_venison dev_wasteland dev_werk]
  7. tempalias lfn maps_license.txt
  8. 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"
  9. 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"
  10. if 0 [ looplist [
  11. new_content cc-by-nc-sa-3.0 "by foo, email: foo@bar.org"
  12. ] [ m l cc ] [
  13. loadmap $m
  14. if (strlen $l) [ mapinfo_license $l ]
  15. if (strlen $cc) [ mapinfo_comment $cc ]
  16. if (+ (strlen $l) (strlen $cc)) [ savemap $m ]
  17. ] ]
  18. looplist $maplist m [
  19. loadmap $m
  20. debugline $lfn (concatword $mapmsg " (" $m ".cgz, size " (mapsize) ", revision " $curmaprevision ")")
  21. if (< (findlist $__maplicense_list $mapinfo_license) 0) [
  22. debugline $lfn (concatword "map license tag: \"" $mapinfo_license "\"")
  23. ] [
  24. debugline $lfn (getalias (concatword __maplicense_fullname_ $mapinfo_license))
  25. ]
  26. if (strlen $mapinfo_comment) [
  27. debugline $lfn $mapinfo_comment
  28. ]
  29. debugline $lfn ""
  30. ]