Skip to content

Commit

Permalink
Merge branch 'godotengine:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansekela authored Nov 19, 2024
2 parents eda4c99 + e081912 commit 3a82882
Show file tree
Hide file tree
Showing 421 changed files with 7,347 additions and 2,195 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_offline_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

jobs:
build:
# Don't run scheduled runs on forks unless the CI_OFFLINE_DOCS_CRON variable is set to 'true'.
# Manual runs can still be triggered as normal.
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_OFFLINE_DOCS_CRON == 'true' }}
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
# Install tools used by `_tools/format.sh`.
sudo apt-get -qq update
sudo apt-get -qq install dos2unix recode
sudo pip3 install -r requirements.txt
sudo pip3 install codespell
- name: Style checks via pre-commit
uses: pre-commit/[email protected]

- name: Linter checks
run: |
bash _tools/format.sh
codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/**/*.rst
- name: Install dependencies
run: sudo pip3 install -r requirements.txt

# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
- name: Sphinx build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sync_class_ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ concurrency:

jobs:
build:
# Don't run scheduled runs on forks unless the CI_SYNC_CLASS_REF_CRON variable is set to 'true'.
# Manual runs can still be triggered as normal.
if: ${{ github.repository_owner == 'godotengine' || github.event_name != 'schedule' || vars.CI_SYNC_CLASS_REF_CRON == 'true' }}
name: Update class reference files based on the engine revision
runs-on: ubuntu-latest
env:
Expand Down
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
default_language_version:
python: python3

repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
files: ^(about|community|contributing|getting_started|tutorials)/.*\.rst$
additional_dependencies: [tomli]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ['--fix=lf']
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ add-on.

All contributors are welcome to help on the Godot documentation.

To get started, head to the [Contributing section](https://docs.godotengine.org/en/latest/contributing/ways_to_contribute.html#contributing-to-the-documentation) of the online manual. There, you will find all the information you need to write and submit changes.
To get started, head to the [Contributing section](https://docs.godotengine.org/en/latest/contributing/how_to_contribute.html) of the online manual. There, you will find all the information you need to write and submit changes.

Here are some quick links to the areas you might be interested in:

Expand Down
74 changes: 51 additions & 23 deletions _extensions/gdscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def innerstring_rules(ttype):
(r"[]{}:(),;[]", Punctuation),
(r"(\\)(\n)", Whitespace),
(r"\\", Text),
(r"(in|and|or|not)\b", Operator.Word),
# modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
# Operators.
(r"(and|as|in|is|not|or)\b", Operator.Word),
(
r"!=|==|<<|>>|&&|\+=|-=|\*=|/=|%=|&=|\|=|\|\||[-~+/*%=<>&^.!|$]",
Operator,
Expand Down Expand Up @@ -138,26 +140,28 @@ def innerstring_rules(ttype):
(
words(
(
"and",
"await",
"in",
"get",
"set",
"not",
"or",
"as",
"breakpoint",
# modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
# Declarations.
"class",
"class_name",
"const",
"enum",
"extends",
"is",
"func",
"namespace", # Reserved for potential future use.
"signal",
"const",
"enum",
"static",
"trait", # Reserved for potential future use.
"var",
# Other keywords.
"await",
"breakpoint",
"self",
"super",
"yield", # Reserved for potential future use.
# Not really keywords, but used in property syntax.
"set",
"get",
),
suffix=r"\b",
),
Expand All @@ -168,12 +172,14 @@ def innerstring_rules(ttype):
(
words(
(
# modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
# Control flow.
"break",
"continue",
"elif",
"else",
"if",
"for",
"if",
"match",
"pass",
"return",
Expand All @@ -196,9 +202,13 @@ def innerstring_rules(ttype):
"absf",
"absi",
"acos",
"acosh",
"angle_difference",
"asin",
"asinh",
"atan",
"atan2",
"atanh",
"bezier_derivative",
"bezier_interpolate",
"bytes_to_var",
Expand Down Expand Up @@ -234,6 +244,7 @@ def innerstring_rules(ttype):
"is_instance_id_valid",
"is_instance_valid",
"is_nan",
"is_same",
"is_zero_approx",
"lerp",
"lerp_angle",
Expand Down Expand Up @@ -271,6 +282,7 @@ def innerstring_rules(ttype):
"remap",
"rid_allocate_id",
"rid_from_int64",
"rotate_toward",
"round",
"roundf",
"roundi",
Expand All @@ -290,6 +302,8 @@ def innerstring_rules(ttype):
"str_to_var",
"tan",
"tanh",
"type_convert",
"type_string",
"typeof",
"var_to_bytes",
"var_to_bytes_with_objects",
Expand All @@ -307,47 +321,54 @@ def innerstring_rules(ttype):
"dict_to_inst",
"get_stack",
"inst_to_dict",
"is_instance_of",
"len",
"load",
"preload",
"print_debug",
"print_stack",
"range",
"str",
"type_exists",
),
prefix=r"(?<!\.)",
suffix=r"\b",
),
Name.Builtin,
),
(r"((?<!\.)(self|super|false|true)|(PI|TAU|NAN|INF)" r")\b", Name.Builtin.Pseudo),
# modules/gdscript/gdscript.cpp - GDScriptLanguage::get_reserved_words()
# Special values. Constants.
(r"((?<!\.)(false|null|true)|(INF|NAN|PI|TAU))\b", Name.Builtin.Pseudo),
(
words(
(
# core/variant/variant.cpp - Variant::get_type_name()
# `Nil` is excluded because it is not allowed in GDScript.
"bool",
"int",
"float",
"String",
"StringName",
"NodePath",
"Vector2",
"Vector2i",
"Rect2",
"Rect2i",
"Transform2D",
"Vector3",
"Vector3i",
"AABB",
"Plane",
"Quaternion",
"Vector4",
"Vector4i",
"Plane",
"AABB",
"Quaternion",
"Basis",
"Transform3D",
"Projection",
"Color",
"RID",
"Object",
"Callable",
"Signal",
"StringName",
"NodePath",
"Dictionary",
"Array",
"PackedByteArray",
Expand All @@ -358,9 +379,10 @@ def innerstring_rules(ttype):
"PackedStringArray",
"PackedVector2Array",
"PackedVector3Array",
"PackedVector4Array",
"PackedColorArray",
"null",
"PackedVector4Array",
# The following are also considered types in GDScript.
"Variant",
"void",
),
prefix=r"(?<!\.)",
Expand All @@ -373,9 +395,11 @@ def innerstring_rules(ttype):
(
words(
(
# modules/gdscript/doc_classes/@GDScript.xml
"@export",
"@export_category",
"@export_color_no_alpha",
"@export_custom",
"@export_dir",
"@export_enum",
"@export_exp_easing",
Expand All @@ -387,17 +411,21 @@ def innerstring_rules(ttype):
"@export_flags_3d_navigation",
"@export_flags_3d_physics",
"@export_flags_3d_render",
"@export_flags_avoidance",
"@export_global_dir",
"@export_global_file",
"@export_group",
"@export_multiline",
"@export_node_path",
"@export_placeholder",
"@export_range",
"@export_storage",
"@export_subgroup",
"@export_tool_button",
"@icon",
"@onready",
"@rpc",
"@static_unload",
"@tool",
"@warning_ignore",
),
Expand Down
6 changes: 0 additions & 6 deletions _static/css/algolia.css

This file was deleted.

10 changes: 0 additions & 10 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@

{% block linktags -%}
<meta name="theme-color" content="#3d8fcc" />
{% if godot_inject_language_links -%}
{% for alternate_lang in godot_docs_supported_languages -%}
{# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#}
{% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%}
<link rel="alternate" hreflang="{{ alternate_lang_href }}" href="{{ godot_docs_basepath }}{{ alternate_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endfor -%}
<link rel="alternate" hreflang="x-default" href="{{ godot_docs_basepath }}{{ godot_default_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />

<link rel="canonical" href="{{ godot_docs_basepath }}{{ lang_attr }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endif -%}
{{ super() }}
{% endblock -%}

Expand Down
1 change: 1 addition & 0 deletions _tools/codespell-dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
anti-aliasing->antialiasing
42 changes: 0 additions & 42 deletions _tools/format.sh

This file was deleted.

12 changes: 6 additions & 6 deletions _tools/redirects/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ source,destination
/getting_started/step_by_step/resources.html,/tutorials/scripting/resources.html
/getting_started/step_by_step/scene_tree.html,/tutorials/scripting/scene_tree.html
/getting_started/step_by_step/singletons_autoload.html,/tutorials/scripting/singletons_autoload.html
/getting_started/workflow/assets/escn_exporter/animation.html,/tutorials/assets_pipeline/escn_exporter/animation.html
/getting_started/workflow/assets/escn_exporter/animation.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/index.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/lights.html,/tutorials/assets_pipeline/escn_exporter/lights.html
/getting_started/workflow/assets/escn_exporter/material.html,/tutorials/assets_pipeline/escn_exporter/material.html
/getting_started/workflow/assets/escn_exporter/mesh.html,/tutorials/assets_pipeline/escn_exporter/mesh.html
/getting_started/workflow/assets/escn_exporter/physics.html,/tutorials/assets_pipeline/escn_exporter/physics.html
/getting_started/workflow/assets/escn_exporter/skeleton.html,/tutorials/assets_pipeline/escn_exporter/skeleton.html
/getting_started/workflow/assets/escn_exporter/lights.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/material.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/mesh.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/physics.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/escn_exporter/skeleton.html,/tutorials/assets_pipeline/escn_exporter/index.html
/getting_started/workflow/assets/import_process.html,/tutorials/assets_pipeline/import_process.html
/getting_started/workflow/assets/importing_audio_samples.html,/tutorials/assets_pipeline/importing_audio_samples.html
/getting_started/workflow/assets/importing_images.html,/tutorials/assets_pipeline/importing_images.html
Expand Down
Loading

0 comments on commit 3a82882

Please sign in to comment.