diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..e6f15059 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# THIS FILE WAS AUTOGENERATED; DO NOT EDIT. +# Source: config/toolconfigsrc/editorconfig. + +# Common config file for supported editors; see editorconfig.org. +# If you are using an editor that doesn't support editorconfig, try to +# conform to these settings manually. + +# Note: while we autogenerate this file, we also check it into git +# because it affects how source is displayed on github. + +# This is the top-most EditorConfig file. +root = true + +# Defaults for all files. +[*] +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +# Python overrides. +[*.py] +indent_style = space +indent_size = 4 +max_line_length = 79 +charset = utf-8 + +# Makefile overrides. +[Makefile] +indent_style = tab +indent_size = 2 +max_line_length = 80 + +# C/C++ overrides. +[*.{c,cc,h,cpp,hpp}] +indent_style = space +indent_size = 2 +max_line_length = 80 diff --git a/.gitignore b/.gitignore index 3bb3ed9c..ae948644 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ local.properties .flycheck-dir-locals.el .pylintrc .projectile -.editorconfig .clang-format .style.yapf .irony diff --git a/.idea/ballisticacore.iml b/.idea/ballisticacore.iml index 7bcaed50..a385081f 100644 --- a/.idea/ballisticacore.iml +++ b/.idea/ballisticacore.iml @@ -62,6 +62,7 @@ + diff --git a/config/toolconfigsrc/editorconfig b/config/toolconfigsrc/editorconfig index e87af068..8d9056d4 100644 --- a/config/toolconfigsrc/editorconfig +++ b/config/toolconfigsrc/editorconfig @@ -1,22 +1,35 @@ -# For configuring supported editors +# Common config file for supported editors; see editorconfig.org. +# If you are using an editor that doesn't support editorconfig, try to +# conform to these settings manually. -# This is the top-most EditorConfig file +# Note: while we autogenerate this file, we also check it into git +# because it affects how source is displayed on github. + +# This is the top-most EditorConfig file. root = true -# Defaults for all files +# Defaults for all files. [*] end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true -# Python overrides +# Python overrides. [*.py] indent_style = space indent_size = 4 max_line_length = 79 charset = utf-8 -# Makefile overrides +# Makefile overrides. [Makefile] indent_style = tab +indent_size = 2 max_line_length = 80 + +# C/C++ overrides. +[*.{c,cc,h,cpp,hpp}] +indent_style = space +indent_size = 2 +max_line_length = 80 + diff --git a/docs/ba_module.md b/docs/ba_module.md index 042ef6fe..4a81f312 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2020-12-22 for Ballistica version 1.5.30 build 20264

+

last updated on 2021-01-04 for Ballistica version 1.5.30 build 20265

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/bacommon/__init__.py b/tools/bacommon/__init__.py index 946ec27f..26ce7062 100644 --- a/tools/bacommon/__init__.py +++ b/tools/bacommon/__init__.py @@ -1,3 +1,3 @@ # Released under the MIT License. See LICENSE for details. # -"""Bits of functionality common to ballistica client and server components.""" +"""Functionality and data common to ballistica client and server components.""" diff --git a/tools/efrotools/pcommand.py b/tools/efrotools/pcommand.py index 6fa6ddc7..a76e495d 100644 --- a/tools/efrotools/pcommand.py +++ b/tools/efrotools/pcommand.py @@ -116,6 +116,7 @@ def _trim_docstring(docstring: str) -> str: def _spelling(words: List[str]) -> None: import os + num_modded_dictionaries = 0 for fname in [ '.idea/dictionaries/ericf.xml', 'ballisticacore-cmake/.idea/dictionaries/ericf.xml' @@ -145,6 +146,8 @@ def _spelling(words: List[str]) -> None: sorted(lines[3:-3], key=lambda x: x.replace('', '')) + lines[-3:])) print(f'Added {added_count} words to {fname}.') + num_modded_dictionaries += 1 + print(f'Modified {num_modded_dictionaries} dictionaries.') def spelling_all() -> None: @@ -347,7 +350,7 @@ def tool_config_install() -> None: comment = ';;' elif dst.name in [ '.mypy.ini', '.pycheckers', '.pylintrc', '.style.yapf', - '.clang-format' + '.clang-format', '.editorconfig' ]: comment = '#' if comment is not None: