Przeglądaj źródła

Fix internal links to use proper :ref: syntax

Rémi Verschelde 6 lat temu
rodzic
commit
8a49da6da5

+ 2 - 0
getting_started/editor/command_line_tutorial.rst

@@ -124,6 +124,8 @@ just fly by. For this, a command line debugger is provided by adding
 
     user@host:~/newgame$ godot -d scene.tscn
 
+.. _doc_command_line_tutorial_exporting:
+
 Exporting
 ---------
 

+ 2 - 4
getting_started/scripting/gdscript/static_typing.rst

@@ -103,12 +103,10 @@ type:
 
 Currently you can use three types of… types:
 
-1. `Built-in
-   types <http://docs.godotengine.org/en/3.0/getting_started/scripting/gdscript/gdscript_basics.html#built-in-types>`__
+1. :ref:`Built-in<gdscript_basics.html#built-in-types>`
 2. Core classes and nodes (``Object``, ``Node``, ``Area2D``,
    ``Camera2D``, etc.)
-3. Your own, custom classes. Look at the new
-   `class_name <https://godot.readthedocs.io/en/latest/getting_started/step_by_step/scripting_continued.html#register-scripts-as-classes>`__
+3. Your own, custom classes. Look at the new :ref:`class_name <doc_scripting_continued_class_name>`
    feature to register types in the editor.
 
 .. note::

+ 1 - 1
getting_started/step_by_step/resources.rst

@@ -222,7 +222,7 @@ those values and saves the resource, the Inspector serializes the custom propert
 too! To save a resource from the Inspector, click the Inspector's tools menu (top right),
 and select "Save" or "Save As...".
 
-If the script's language supports `script classes <https://godot.readthedocs.io/en/latest/getting_started/step_by_step/scripting_continued.html#register-scripts-as-classes>`__,
+If the script's language supports :ref:`script classes <doc_scripting_continued_class_name>`,
 then it streamlines the process. Defining a name for your script alone will add it to
 the Inspector's creation dialog. This will auto-add your script to the Resource
 object you create.

+ 2 - 0
getting_started/step_by_step/scripting_continued.rst

@@ -383,6 +383,8 @@ kept loaded and ready to use so that you can create as many
 instances as desired. This is especially useful to quickly instance
 several enemies, bullets, and other entities in the active scene.
 
+.. _doc_scripting_continued_class_name:
+
 Register scripts as classes
 ---------------------------
 

+ 45 - 44
getting_started/workflow/export/exporting_pcks.rst

@@ -18,11 +18,11 @@ Examples of this include...
 These tools help developers to extend their development beyond the initial
 release.
 
-Overview of \*.pck files
-------------------------
+Overview of PCK files
+---------------------
 
-Godot enables this via a feature called **resource packs**
-(\*.pck files).
+Godot enables this via a feature called **resource packs** (PCK files,
+with extension ``.pck``).
 
 **Advantages:**
 
@@ -35,9 +35,9 @@ Godot enables this via a feature called **resource packs**
 
 The first part of using them involves exporting and delivering the project to
 players. Then, when one wants to add functionality or content later on, they
-just deliver the updates via \*.pck file to the users.
+just deliver the updates via PCK files to the users.
 
-\*.pck files usually contain, but are not limited to:
+PCK files usually contain, but are not limited to:
 
 - scripts
 - scenes
@@ -48,51 +48,51 @@ just deliver the updates via \*.pck file to the users.
 - music
 - any other asset suitable for import into the game
 
-The \*.pck files can even be an entirely different Godot project, which the
+The PCK files can even be an entirely different Godot project, which the
 original game loads in at runtime.
 
-Generating \*.pck files
------------------------
+Generating PCK files
+--------------------
 
-In order to pack all resources of a project into a \*.pck file open the project
+In order to pack all resources of a project into a PCK file open the project
 and go to Project/Export and click on “Export PCK/Zip”. Also make sure to have
 an export template selected while doing so.
 
 .. image:: img/export_pck.png
 
-Another method would be to `export from the command line
-<https://docs.godotengine.org/en/latest/getting_started/editor/command_line_tutorial.html#exporting>`_.
-If the output file ends with a \*.pck or \*.zip file extension, then the export
+Another method would be to :ref:`export from the command line <doc_command_line_tutorial_exporting>`.
+If the output file ends with a PCK or ZIP file extension, then the export
 process will build that type of file for the chosen platform.
 
 .. note::
-   If one wishes to support mods for their game, they will need their users to
-   create similarly exported files. Assuming the original game expects a
-   certain structure for the \*.pck's resources and/or a certain interface for
-   its scripts, then either...
-
-   1. The developer must publicize documentation of these expected structures/
-      interfaces, expect modders to install Godot Engine, and then also expect
-      those modders to conform to the documentation's defined API when building
-      mod content for the game (so that it will work). Users would then use
-      Godot's built in exporting tools to create a \*.pck file, as detailed
-      above.
-   2. The developer uses Godot to build a GUI tool for adding their exact API
-      content to a project. This Godot tool must either run on a tools-enabled
-      build of the engine or have access to one (distributed alongside or
-      perhaps in the original game's files). The tool can then use the Godot
-      executable to export a \*.pck file from the command line with
-      :ref:`OS.execute <class_OS_execute>`. It makes the most sense for the
-      game to not use a tool-build though (for security) and for the modding
-      tools to *do* use a tool-enabled engine build.
-
-Opening \*.pck files at runtime
--------------------------------
-
-To import a \*.pck file, one uses a one-liner. Keep in mind, there is no
+
+    If one wishes to support mods for their game, they will need their users to
+    create similarly exported files. Assuming the original game expects a
+    certain structure for the PCK's resources and/or a certain interface for
+    its scripts, then either...
+
+    1. The developer must publicize documentation of these expected structures/
+       interfaces, expect modders to install Godot Engine, and then also expect
+       those modders to conform to the documentation's defined API when building
+       mod content for the game (so that it will work). Users would then use
+       Godot's built in exporting tools to create a PCK file, as detailed
+       above.
+    2. The developer uses Godot to build a GUI tool for adding their exact API
+       content to a project. This Godot tool must either run on a tools-enabled
+       build of the engine or have access to one (distributed alongside or
+       perhaps in the original game's files). The tool can then use the Godot
+       executable to export a PCK file from the command line with
+       :ref:`OS.execute <class_OS_execute>`. It makes the most sense for the
+       game to not use a tool-build though (for security) and for the modding
+       tools to *do* use a tool-enabled engine build.
+
+Opening PCK files at runtime
+----------------------------
+
+To import a PCK file, one uses a one-liner. Keep in mind, there is no
 error or exception if the import fails. Instead, one might have to create some
 validation code as a layer on top. The following example expects a “mod.pck”
-file in the directory of the games executable. The \*.pck file contains a
+file in the directory of the games executable. The PCK file contains a
 “mod_scene.tscn” test scene in its root.
 
 .. tabs::
@@ -113,11 +113,12 @@ file in the directory of the games executable. The \*.pck file contains a
     }
 
 .. warning::
-  If you import a file with the same file path/name as one you already have in your
-  project, the imported one will replace it. This is something to watch out for when
-  creating DLC or mods (solved easily with a tool isolating mods to a specific mods
-  subfolder). However, it is also a way of creating patches for one's own game. A
-  \*.pck file of this kind can fix the content of a previously loaded \*.pck.
+
+    If you import a file with the same file path/name as one you already have in your
+    project, the imported one will replace it. This is something to watch out for when
+    creating DLC or mods (solved easily with a tool isolating mods to a specific mods
+    subfolder). However, it is also a way of creating patches for one's own game. A
+    PCK file of this kind can fix the content of a previously loaded PCK.
 
 Summary
 -------
@@ -126,4 +127,4 @@ This tutorial should illustrate how easy adding mods, patches or DLC to a game
 is. The most important thing is to identify how one plans to distribute future
 content for their game and develop a workflow that is customized for that
 purpose. Godot should make that process smooth regardless of which route a
-developer pursues.
+developer pursues.