diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml index 96f5078e..893516a5 100644 --- a/.idea/dictionaries/ericf.xml +++ b/.idea/dictionaries/ericf.xml @@ -1394,6 +1394,7 @@ rcfile rdict rdir + readlines realpath realsies recache diff --git a/assets/src/ba_data/python/ba/_meta.py b/assets/src/ba_data/python/ba/_meta.py index c09177ee..d36a848b 100644 --- a/assets/src/ba_data/python/ba/_meta.py +++ b/assets/src/ba_data/python/ba/_meta.py @@ -34,10 +34,10 @@ if TYPE_CHECKING: from typing import Dict, List, Tuple, Union, Optional, Type, Set import ba -# The API version of this build of the game. +# The meta api version of this build of the game. # Only packages and modules requiring this exact api version # will be considered when scanning directories. -# See bombsquadgame.com/apichanges for differences between api versions. +# See https://github.com/efroemling/ballistica/wiki/Using-ba_meta-Tags CURRENT_API_VERSION = 6 diff --git a/docs/ba_module.md b/docs/ba_module.md index 90c37bc8..846f8329 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,4 @@ -

last updated on 2020-03-22 for Ballistica version 1.5.0 build 20001

This page documents the Python classes and functions in the 'ba' module, which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please let me know. Happy modding!

diff --git a/tools/snippets b/tools/snippets index 1c000d14..c0a0b6a5 100755 --- a/tools/snippets +++ b/tools/snippets @@ -665,6 +665,11 @@ def update_docs_md() -> None: docs_path = 'docs/ba_module.md' + # We store the hash in a separate file that only exists on private + # so public isn't full of constant hash change commits. + # (don't care so much on private) + docs_hash_path = 'docs/ba_module_hash' + # Generate a hash from all c/c++ sources under the python subdir # as well as all python scripts. pysources = [] @@ -683,11 +688,13 @@ def update_docs_md() -> None: curhash = get_files_hash(pysources) # Extract the current embedded hash. - with open(docs_path) as infile: - lines = infile.readlines() - hashlines = [l for l in lines if '\n' - f'\n') + docs + docs = ( + '\n' + # f'\n' + ) + docs with open(docs_path, 'w') as outfile: outfile.write(docs) + with open(docs_hash_path, 'w') as outfile: + outfile.write(curhash) print(f'{docs_path} is up to date.')