Browse Source

Misc style fixes

Rémi Verschelde 6 years ago
parent
commit
c344f8d801

+ 3 - 3
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -167,15 +167,15 @@ in case you want to take a look under the hood.
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
 | for        | See for_.                                                                                                     |
 | for        | See for_.                                                                                                     |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
-| do         | Reserved for future implementation of do...while loops.                                                       |
+| do         | Reserved for future implementation of ``do... while`` loops.                                                  |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
 | while      | See while_.                                                                                                   |
 | while      | See while_.                                                                                                   |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
 | match      | See match_.                                                                                                   |
 | match      | See match_.                                                                                                   |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
-| switch     | Reserved for future implementation.                                                                           |
+| switch     | Reserved for future implementation. See match_.                                                               |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
-| case       | Reserved for future implementation.                                                                           |
+| case       | Reserved for future implementation. See match_.                                                               |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+
 | break      | Exits the execution of the current ``for`` or ``while`` loop.                                                 |
 | break      | Exits the execution of the current ``for`` or ``while`` loop.                                                 |
 +------------+---------------------------------------------------------------------------------------------------------------+
 +------------+---------------------------------------------------------------------------------------------------------------+

+ 8 - 8
getting_started/workflow/best_practices/data_preferences.rst

@@ -18,9 +18,9 @@ Y or Z? This article covers a variety of topics related to these dilemmas.
   "As the size of a problem domain increases, the runtime length of the
   "As the size of a problem domain increases, the runtime length of the
   algorithm..."
   algorithm..."
   
   
-  - Constant-time, O(1): "...does not increase."
-  - Logarithmic-time, O(log n): "...increases at a slow rate."
-  - Linear-time, O(n): "...increases at the same rate."
+  - Constant-time, ``O(1)``: "...does not increase."
+  - Logarithmic-time, ``O(log n)``: "...increases at a slow rate."
+  - Linear-time, ``O(n)``: "...increases at the same rate."
   - Etc.
   - Etc.
 
 
   Imagine if one had to process 3 million data points within a single frame. It
   Imagine if one had to process 3 million data points within a single frame. It
@@ -45,7 +45,7 @@ class. Variants can store Variant-compatible data structures such as
 :ref:`Array <class_Array>` and :ref:`Dictionary <class_Dictionary>` as well as
 :ref:`Array <class_Array>` and :ref:`Dictionary <class_Dictionary>` as well as
 :ref:`Object <class_Object>` s.
 :ref:`Object <class_Object>` s.
 
 
-Godot implements Array as a Vector<Variant>. The engine stores the Array
+Godot implements Array as a ``Vector<Variant>``. The engine stores the Array
 contents in a contiguous section of memory, i.e. they are in a row adjacent
 contents in a contiguous section of memory, i.e. they are in a row adjacent
 to each other.
 to each other.
 
 
@@ -55,7 +55,7 @@ to each other.
   type, meaning that its records can only contain a particular type (denoted
   type, meaning that its records can only contain a particular type (denoted
   by angled brackets). So, for example, a
   by angled brackets). So, for example, a
   :ref:`PoolStringArray <class_PoolStringArray>` would be something like
   :ref:`PoolStringArray <class_PoolStringArray>` would be something like
-  a Vector<String>.
+  a ``Vector<String>``.
 
 
 Contiguous memory stores imply the following operation performance:
 Contiguous memory stores imply the following operation performance:
 
 
@@ -102,7 +102,7 @@ Contiguous memory stores imply the following operation performance:
       though. Done by re-sorting the Array after every edit and writing an
       though. Done by re-sorting the Array after every edit and writing an
       ordered-aware search algorithm.
       ordered-aware search algorithm.
 
 
-Godot implements Dictionary as an OrderedHashMap<Variant, Variant>. The engine
+Godot implements Dictionary as an ``OrderedHashMap<Variant, Variant>``. The engine
 stores a giant array (initialized to 1000 records) of key-value pairs. When
 stores a giant array (initialized to 1000 records) of key-value pairs. When
 one attempts to access a value, they provide it a key. It then *hashes* the
 one attempts to access a value, they provide it a key. It then *hashes* the
 key, i.e. converts it into a number. The "hash" becomes the index into the
 key, i.e. converts it into a number. The "hash" becomes the index into the
@@ -167,7 +167,7 @@ Objects query data sources when posed questions. For example, to answer
 the question, "do you have a property called, 'position'?", it might ask
 the question, "do you have a property called, 'position'?", it might ask
 its :ref:`script <class_Script>` or the :ref:`ClassDB <class_ClassDB>`.
 its :ref:`script <class_Script>` or the :ref:`ClassDB <class_ClassDB>`.
 One can find more information about what objects are and how they work in
 One can find more information about what objects are and how they work in
-the :ref:`what are godot classes <doc_what_are_godot_classes>` documentation.
+the :ref:`doc_what_are_godot_classes` article.
 
 
 The important detail here is the complexity of the Object's task. Every time
 The important detail here is the complexity of the Object's task. Every time
 it performs one of these multi-source queries, it runs through *several*
 it performs one of these multi-source queries, it runs through *several*
@@ -351,4 +351,4 @@ for blending, i.e. enabling smooth transitions between these animations. There
 may also be a hierarchical structure between animations that one plans out for
 may also be a hierarchical structure between animations that one plans out for
 their object. These are the cases where the :ref:`AnimationTree <class_AnimationTree>`
 their object. These are the cases where the :ref:`AnimationTree <class_AnimationTree>`
 shines. One can find an in-depth guide on using the AnimationTree
 shines. One can find an in-depth guide on using the AnimationTree
-:ref:`here <doc_animation_tree>`.
+:ref:`here <doc_animation_tree>`.

+ 2 - 2
getting_started/workflow/best_practices/godot_interfaces.rst

@@ -1,6 +1,6 @@
 .. _doc_godot_interfaces:
 .. _doc_godot_interfaces:
 
 
-Godot Interfaces
+Godot interfaces
 ================
 ================
 
 
 Often one needs scripts that rely on other objects for features. There
 Often one needs scripts that rely on other objects for features. There
@@ -500,4 +500,4 @@ accesses:
     }
     }
 
 
 These strategies contribute to Godot's flexible design. Between them, users
 These strategies contribute to Godot's flexible design. Between them, users
-have a breadth of tools to meet their specific needs.
+have a breadth of tools to meet their specific needs.

+ 3 - 3
getting_started/workflow/best_practices/index.rst

@@ -1,5 +1,5 @@
-Scene workflow
-===============
+Best practices
+==============
 
 
 .. toctree::
 .. toctree::
    :maxdepth: 1
    :maxdepth: 1
@@ -14,4 +14,4 @@ Scene workflow
    godot_interfaces
    godot_interfaces
    godot_notifications
    godot_notifications
    data_preferences
    data_preferences
-   logic_preferences
+   logic_preferences

+ 2 - 2
getting_started/workflow/best_practices/introduction_best_practices.rst

@@ -19,6 +19,6 @@ of each option, and then highlights the best course of action depending on the
 circumstances.
 circumstances.
 
 
 While the articles in this series are largely topic-directed, it is
 While the articles in this series are largely topic-directed, it is
-recommended that users begin with the "What are godot classes" article.
+recommended that users begin with the :ref:`doc_what_are_godot_classes` article.
 It is from there that the "best practices" for the rest of the engine
 It is from there that the "best practices" for the rest of the engine
-become more clear, based on established OOP practices.
+become more clear, based on established OOP practices.

+ 1 - 5
getting_started/workflow/best_practices/scene_organization.rst

@@ -239,11 +239,8 @@ Scripts and scenes, as extensions of engine classes should abide
 by *all* OOP principles. Examples include...
 by *all* OOP principles. Examples include...
 
 
 - `SOLID <https://en.wikipedia.org/wiki/SOLID>`_
 - `SOLID <https://en.wikipedia.org/wiki/SOLID>`_
-
 - `DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`_
 - `DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`_
-
 - `KISS <https://en.wikipedia.org/wiki/KISS_principle>`_
 - `KISS <https://en.wikipedia.org/wiki/KISS_principle>`_
-
 - `YAGNI <https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it>`_
 - `YAGNI <https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it>`_
 
 
 Choosing a node tree structure
 Choosing a node tree structure
@@ -286,8 +283,7 @@ If one has a system that...
 2. should be globally accessible
 2. should be globally accessible
 3. should exist in isolation
 3. should exist in isolation
 
 
-...then one should create an
-:ref:`autoload 'singleton' node <doc_singletons_autoload>`.
+... then one should create an :ref:`autoload 'singleton' node <doc_singletons_autoload>`.
 
 
 .. note::
 .. note::
 
 

+ 1 - 1
tutorials/io/background_loading.rst

@@ -181,7 +181,7 @@ loader.
         # Update your progress bar?
         # Update your progress bar?
         get_node("progress").set_progress(progress)
         get_node("progress").set_progress(progress)
 
 
-        # ...or update a progress animation?
+        # ... or update a progress animation?
         var length = get_node("animation").get_current_animation_length()
         var length = get_node("animation").get_current_animation_length()
 
 
         # Call this on a paused animation. Use "true" as the second argument to force the animation to update.
         # Call this on a paused animation. Use "true" as the second argument to force the animation to update.

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

@@ -216,4 +216,4 @@ This way all the gizmo logic and drawing methods can be implemented in a new cla
 
 
 Note that we just added some handles in the redraw method, but we still need to implement
 Note that we just added some handles in the redraw method, but we still need to implement
 the rest of handle-related callbacks in :ref:`EditorSpatialGizmo<class_EditorSpatialGizmo>`
 the rest of handle-related callbacks in :ref:`EditorSpatialGizmo<class_EditorSpatialGizmo>`
- to get properly working handles.
+to get properly working handles.