2
0
Эх сурвалжийг харах

Merge branch 'master' into 3.2

Rémi Verschelde 4 жил өмнө
parent
commit
973cf89f94

+ 1 - 1
.github/workflows/ci.yml

@@ -19,7 +19,7 @@ jobs:
       - name: Linter checks
         run: |
           bash _tools/format.sh
-          codespell -I _tools/codespell-ignore.txt {about,community,development,getting_started,tutorials}/**/*.rst
+          codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt {about,community,development,getting_started,tutorials}/**/*.rst
 
       - name: Sphinx build
         run: |

+ 1 - 0
_tools/codespell-ignore-lines.txt

@@ -0,0 +1 @@
+| te           | Telugu                             |

+ 1 - 1
about/list_of_features.rst

@@ -398,7 +398,7 @@ Input
    - When captured, raw input will be used on Windows and Linux to
      sidestep the OS' mouse acceleration settings.
 
-- Gamepad input (up to 8 simulatenous controllers).
+- Gamepad input (up to 8 simultaneous controllers).
 - Pen/tablet input with pressure support.
 
 Navigation

+ 22 - 1
conf.py

@@ -48,10 +48,15 @@ author = "Juan Linietsky, Ariel Manzur and the Godot community"
 
 # Version info for the project, acts as replacement for |version| and |release|
 # The short X.Y version
-version = os.getenv("READTHEDOCS_VERSION", "latest")
+version = os.getenv("READTHEDOCS_VERSION", "3.2")
 # The full version, including alpha/beta/rc tags
 release = version
 
+# Set this True when the `latest` branch is significantly incompatible with the
+# current `stable` branch, which can lead to confusion for users that land on
+# `latest` instead of `stable`.
+in_dev = False
+
 # Parse Sphinx tags passed from RTD via environment
 env_tags = os.getenv("SPHINX_TAGS")
 if env_tags is not None:
@@ -230,6 +235,22 @@ def godot_get_image_filename_for_language(filename, env):
 
 sphinx.util.i18n.get_image_filename_for_language = godot_get_image_filename_for_language
 
+# Read the Docs adds a note at the top of the page when reading documentation
+# for an old stable version, but not when reading the latest unstable version.
+# We want to add a warning note as the `latest` documentation may not always
+# apply to the current `stable` version.
+if in_dev:
+    rst_prolog = """
+.. attention::
+    You are reading the ``latest`` (unstable) version of this documentation,
+    which may document features not available or compatible with Godot 3.2.x.
+
+    See `this page <https://docs.godotengine.org/{locale}/stable/>`__
+    for the stable version of this documentation.
+""".format(
+        locale=language,
+    )
+
 # Couldn't find a way to retrieve variables nor do advanced string
 # concat from reST, so had to hardcode this in the "epilog" added to
 # all pages. This is used in index.rst to display the Weblate badge.

+ 2 - 1
development/compiling/compiling_for_web.rst

@@ -39,7 +39,8 @@ either ``release`` for a release build or ``release_debug`` for a debug build::
     scons platform=javascript tools=no target=release_debug
 
 By default, the :ref:`JavaScript singleton <doc_javascript_eval>` will be built
-into the engine. Since ``eval()`` calls can be a security concern, the
+into the engine. Official export templates also have the JavaScript singleton
+enabled. Since ``eval()`` calls can be a security concern, the
 ``javascript_eval`` option can be used to build without the singleton::
 
     scons platform=javascript tools=no target=release javascript_eval=no

+ 2 - 0
getting_started/editor/command_line_tutorial.rst

@@ -317,6 +317,7 @@ it allows you to run the script as follows in modern Linux
 distributions, as well as macOS:
 
 ::
+
     # Mark script as executable.
     chmod +x sayhello.gd
     # Prints "Hello!" to standard output.
@@ -326,4 +327,5 @@ If the above doesn't work in your current version of Linux or macOS, you can
 always have the shebang run Godot straight from where it is located as follows:
 
 ::
+
     #!/usr/bin/godot -s

+ 6 - 2
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -654,8 +654,12 @@ the scene tree::
 Constants
 ~~~~~~~~~
 
-Constants are similar to variables, but must be constants or constant
-expressions and must be assigned on initialization.
+Constants are values you cannot change when the game is running.
+Their value must be known at compile-time. Using the
+``const`` keyword allows you to give a constant value a name. Trying to assign a
+value to a constant after it's declared will give you an error.
+
+We recommend using constants whenever a value is not meant to change.
 
 ::
 

+ 10 - 0
getting_started/workflow/assets/importing_scenes.rst

@@ -172,6 +172,16 @@ most 3D DCCs don't have the same material options as those present in Godot.
 When materials are built-in, they will be lost each time the source scene
 is modified and re-imported.
 
+.. note::
+
+    Godot will not reimport materials that are stored in external files unless
+    you remove the associated ``.material`` file before reimporting.
+
+    To force reimporting materials every time the 3D scene is reimported, change
+    the material storage mode in the 3D scene by selecting it in the FileSystem
+    dock, going to the Import dock then setting **Material > Storage** to
+    **Built-In** instead of **Files**.
+
 Keep On Reimport
 ^^^^^^^^^^^^^^^^
 

+ 5 - 3
getting_started/workflow/export/exporting_for_web.rst

@@ -19,6 +19,7 @@ in the user's browser.
                .. tip:: Python offers an easy method to start a local server.
                         Use ``python -m http.server 8000 --bind 127.0.0.1`` with Python 3 to serve the
                         current working directory at ``http://localhost:8000``.
+                        `Refer to MDN for additional information <https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server>`__.
 
 .. attention:: `There are significant bugs when running HTML5 projects on iOS <https://github.com/godotengine/godot/issues/26554>`__
                (regardless of the browser). We recommend using
@@ -213,9 +214,10 @@ returned by ``eval()`` under certain circumstances:
 
 Any other JavaScript value is returned as ``null``.
 
-HTML5 export templates may be built without support for the singleton. With such
-templates, and on platforms other than HTML5, calling ``JavaScript.eval`` will
-also return ``null``.  The availability of the singleton can be checked with the
+HTML5 export templates may be :ref:`built <doc_compiling_for_web>` without
+support for the singleton to improve security. With such templates, and on
+platforms other than HTML5, calling ``JavaScript.eval`` will also return
+``null``.  The availability of the singleton can be checked with the
 ``JavaScript`` :ref:`feature tag <doc_feature_tags>`::
 
     func my_func3():

+ 22 - 12
tutorials/i18n/locales.rst

@@ -3,6 +3,8 @@
 Locales
 =======
 
+.. Note: This list is synced with core/translation.cpp in the engine.
+
 This is the list of supported locales and variants in the engine. It's
 based on the Unix standard locale strings:
 
@@ -61,6 +63,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | ar_SD        | Arabic (Sudan)                     |
 +--------------+------------------------------------+
+| ar_SS        | Arabic (South Sudan)               |
++--------------+------------------------------------+
 | ar_SY        | Arabic (Syria)                     |
 +--------------+------------------------------------+
 | ar_TN        | Arabic (Tunisia)                   |
@@ -199,8 +203,6 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | en_NG        | English (Nigeria)                  |
 +--------------+------------------------------------+
-| en_MT        | English (Malta)                    |
-+--------------+------------------------------------+
 | en_NZ        | English (New Zealand)              |
 +--------------+------------------------------------+
 | en_PH        | English (Philippines)              |
@@ -279,6 +281,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | fi_FI        | Finnish (Finland)                  |
 +--------------+------------------------------------+
+| fil          | Filipino                           |
++--------------+------------------------------------+
 | fil_PH       | Filipino (Philippines)             |
 +--------------+------------------------------------+
 | fo_FO        | Faroese (Faroe Islands)            |
@@ -375,6 +379,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | kab_DZ       | Kabyle (Algeria)                   |
 +--------------+------------------------------------+
+| ka           | Georgian                           |
++--------------+------------------------------------+
 | ka_GE        | Georgian (Georgia)                 |
 +--------------+------------------------------------+
 | kk_KZ        | Kazakh (Kazakhstan)                |
@@ -435,14 +441,18 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | mhr_RU       | Eastern Mari (Russia)              |
 +--------------+------------------------------------+
+| mi           | Maori                              |
++--------------+------------------------------------+
 | mi_NZ        | Maori (New Zealand)                |
 +--------------+------------------------------------+
-| miq_NI       | Mískito  (Nicaragua)               |
+| miq_NI       | Mískito (Nicaragua)                |
 +--------------+------------------------------------+
 | mk           | Macedonian                         |
 +--------------+------------------------------------+
 | mk_MK        | Macedonian (Macedonia)             |
 +--------------+------------------------------------+
+| ml           | Malayalam                          |
++--------------+------------------------------------+
 | ml_IN        | Malayalam (India)                  |
 +--------------+------------------------------------+
 | mni_IN       | Manipuri (India)                   |
@@ -461,7 +471,7 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | my_MM        | Burmese (Myanmar)                  |
 +--------------+------------------------------------+
-| myv_RU       | Erzya  (Russia)                    |
+| myv_RU       | Erzya (Russia)                     |
 +--------------+------------------------------------+
 | nah_MX       | Nahuatl languages (Mexico)         |
 +--------------+------------------------------------+
@@ -495,10 +505,6 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | nn_NO        | Norwegian Nynorsk (Norway)         |
 +--------------+------------------------------------+
-| no           | Norwegian                          |
-+--------------+------------------------------------+
-| no_NO        | Norwegian (Norway)                 |
-+--------------+------------------------------------+
 | nr_ZA        | South Ndebele (South Africa)       |
 +--------------+------------------------------------+
 | nso_ZA       | Pedi (South Africa)                |
@@ -577,6 +583,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | sid_ET       | Sidamo (Ethiopia)                  |
 +--------------+------------------------------------+
+| si           | Sinhala                            |
++--------------+------------------------------------+
 | si_LK        | Sinhala (Sri Lanka)                |
 +--------------+------------------------------------+
 | sk           | Slovak                             |
@@ -585,6 +593,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | sl           | Slovenian                          |
 +--------------+------------------------------------+
+| sl_SI        | Slovenian (Slovenia)               |
++--------------+------------------------------------+
 | so           | Somali                             |
 +--------------+------------------------------------+
 | so_DJ        | Somali (Djibouti)                  |
@@ -607,9 +617,9 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | sr           | Serbian                            |
 +--------------+------------------------------------+
-| sr_BA        | Serbian (Bosnia and Herzegovina)   |
+| sr_Cyrl      | Serbian (Cyrillic)                 |
 +--------------+------------------------------------+
-| sr_CS        | Serbian (Serbia and Montenegro)    |
+| sr_Latn      | Serbian (Latin)                    |
 +--------------+------------------------------------+
 | sr_ME        | Serbian (Montenegro)               |
 +--------------+------------------------------------+
@@ -639,6 +649,8 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | tcy_IN       | Tulu (India)                       |
 +--------------+------------------------------------+
+| te           | Telugu                             |
++--------------+------------------------------------+
 | te_IN        | Telugu (India)                     |
 +--------------+------------------------------------+
 | tg_TJ        | Tajik (Tajikistan)                 |
@@ -649,8 +661,6 @@ based on the Unix standard locale strings:
 +--------------+------------------------------------+
 | th_TH        | Thai (Thailand)                    |
 +--------------+------------------------------------+
-| th_TH_TH     | Thai (Thailand, TH)                |
-+--------------+------------------------------------+
 | ti           | Tigrinya                           |
 +--------------+------------------------------------+
 | ti_ER        | Tigrinya (Eritrea)                 |

+ 1 - 1
tutorials/plugins/editor/visual_shader_plugins.rst

@@ -188,7 +188,7 @@ all you need to initialize your plugin.
 
 
     func _get_code(input_vars, output_vars, mode, type):
-        return output_vars[0] + " = cnoise(vec3((%s.xy + %s.xy) * %s, %s)) * 0.5 + 0.5" % [input_vars[0], input_vars[1], input_vars[2], input_vars[3]]
+        return output_vars[0] + " = cnoise(vec3((%s.xy + %s.xy) * %s, %s)) * 0.5 + 0.5;" % [input_vars[0], input_vars[1], input_vars[2], input_vars[3]]
 
 Save it and open the Visual Shader. You should see your new node type within the member's dialog (if you can't see your new node, try restarting the editor):
 

+ 21 - 0
tutorials/viewports/multiple_resolutions.rst

@@ -67,6 +67,23 @@ that are different from this base size. Godot offers many ways to
 control how the viewport will be resized and stretched to different
 screen sizes.
 
+.. note::
+
+   Godot follows a modern approach to multiple resolutions. The engine will
+   never change the monitor's resolution on its own. While changing the
+   monitor's resolution is the most efficient approach, it's also the least
+   reliable approach as it can leave the monitor stuck on a low resolution if
+   the game crashes. This is especially common on macOS or Linux which don't
+   handle resolution changes as well as Windows.
+
+   Changing the monitor's resolution also removes any control from the game
+   developer over filtering and aspect ratio stretching, which can be important
+   to ensure correct display for pixel art games.
+
+   On top of that, changing the monitor's resolution makes alt-tabbing in and
+   out of a game much slower since the monitor has to change resolutions every
+   time this is done.
+
 Resizing
 --------
 
@@ -245,6 +262,10 @@ the game data is loaded::
 
     VisualServer.texture_set_shrink_all_x2_on_set_data(true)
 
+Alternatively, you can also enable mipmaps on all your 2D textures. However,
+enabling mipmaps will increase memory usage which may be problematic on low-end
+mobile devices.
+
 Handling aspect ratios
 ----------------------