Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/scripts/gitignore_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set -uo pipefail
shopt -s globstar

echo -e ".gitignore validation..."

# Get a list of files that exist in the repo but are ignored.

# The --verbose flag also includes files un-ignored via ! prefixes.
# We filter those out with a somewhat awkward `awk` directive.
# (Explanation: Split each line by : delimiters,
# see if the actual gitignore line shown in the third field starts with !,
# if it doesn't, print it.)

# ignorecase for the sake of Windows users.

output=$(git -c core.ignorecase=true check-ignore --verbose --no-index **/* | \
awk -F ':' '{ if ($3 !~ /^!/) print $0 }')

# Then we take this result and return success if it's empty.
if [ -z "$output" ]; then
exit 0
else
# And print the result if it isn't.
echo "$output"
exit 1
fi
23 changes: 18 additions & 5 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
# This needs to happen before Python and npm execution; it must happen before any extra files are written.
- name: .gitignore checks (gitignore_check.sh)
run: |
sudo apt-get update -qq
sudo apt-get install -qq dos2unix recode
bash ./.github/scripts/gitignore_check.sh

- name: File formatting checks (file_format.sh)
- name: Get changed files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bash ./file_format.sh
if [ "${{ github.event_name }}" == "pull_request" ]; then
files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
fi
files=$(echo "$files" | xargs -I {} sh -c 'echo "\"./{}\""' | tr '\n' ' ')
echo "CHANGED_FILES=$files" >> $GITHUB_ENV

- name: Style checks via pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --files ${{ env.CHANGED_FILES }}
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
default_language_version:
python: python3

repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [tomli]

- repo: local
hooks:
- id: file-format
name: file-format
language: python
entry: python file_format.py
types_or: [text]
exclude: |
(?x)^(
.*\.test\.txt|
.*\.svg|
.*\.patch|
.*\.out|
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd|
tests/data/.*\.bin
)$

- id: dotnet-format
name: dotnet-format
language: python
entry: python dotnet_format.py
types_or: [c#]
#
# End of upstream Godot pre-commit hooks.
#
# Keep this separation to let downstream forks add their own hooks to this file,
# without running into merge conflicts when rebasing on latest upstream.
#
# Start of downstream pre-commit hooks.
#
# This is still the "repo: local" scope, so new local hooks can be defined directly at this indentation:
# - id: new-local-hook
# To add external repo hooks, bring the indentation back to:
# - repo: my-remote-hook
2 changes: 1 addition & 1 deletion 2d/bullet_shower/bullets.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends Node2D
# This demo is an example of controling a high number of 2D objects with logic
# This demo is an example of controlling a high number of 2D objects with logic
# and collision without using nodes in the scene. This technique is a lot more
# efficient than using instancing and nodes, but requires more programming and
# is less visual. Bullets are managed together in the `bullets.gd` script.
Expand Down
2 changes: 1 addition & 1 deletion 2d/bullet_shower/player.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends Node2D
# This demo is an example of controling a high number of 2D objects with logic
# This demo is an example of controlling a high number of 2D objects with logic
# and collision without using nodes in the scene. This technique is a lot more
# efficient than using instancing and nodes, but requires more programming and
# is less visual. Bullets are managed together in the `bullets.gd` script.
Expand Down
1 change: 0 additions & 1 deletion 2d/particles/point_normal_texture_image_outline.tres
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ data = {
flags = 0
image = SubResource( 1 )
size = Vector2( 2048, 1 )

1 change: 0 additions & 1 deletion 2d/particles/point_texture_emit.tres
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ image = SubResource( 1 )
size = Vector2( 2048, 6 )
storage = 0
lossy_quality = 0.7

1 change: 0 additions & 1 deletion 2d/particles/point_texture_image_outline.tres
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ data = {
flags = 0
image = SubResource( 1 )
size = Vector2( 2048, 1 )

2 changes: 1 addition & 1 deletion 2d/physics_platformer/stage.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ size_flags_vertical = 0
text = "This is a simple demo on how to make a platformer game with Godot.
This version uses physics and the 2D physics engine for motion and collision.
The demo also shows the benefits of using the scene system, where coins,
enemies and the player are edited separatedly and instanced in the stage.
enemies and the player are edited separately and instanced in the stage.
To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow
instructions."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
0/occluder_offset = Vector2( 32, 32 )
0/navigation_offset = Vector2( 32, 32 )
0/shapes = [ ]

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Settings" ]

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Settings" ]

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Settings" ]

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
_sections_unfolded = [ "Settings" ]

2 changes: 1 addition & 1 deletion 3d/graphics_settings/settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func _on_shadow_size_option_button_item_selected(index):
if index == 0: # Minimum
RenderingServer.directional_shadow_atlas_set_size(512, true)
# Adjust shadow bias according to shadow resolution.
# Higher resultions can use a lower bias without suffering from shadow acne.
# Higher resolutions can use a lower bias without suffering from shadow acne.
directional_light.shadow_bias = 0.06

# Disable positional (omni/spot) light shadows entirely to further improve performance.
Expand Down
10 changes: 5 additions & 5 deletions 3d/ik/addons/sade/ik_fabrik.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extends Node3D

# The delta/tolerance for the bone chain (how do the bones need to be before it is considered satisfactory)
const CHAIN_TOLERANCE = 0.01
# The amount of interations the bone chain will go through in an attempt to get to the target position
# The amount of iterations the bone chain will go through in an attempt to get to the target position
const CHAIN_MAX_ITER = 10

@export var skeleton_path: NodePath:
Expand Down Expand Up @@ -87,7 +87,7 @@ var chain_origin = Vector3()
# The combined length of every bone in the bone chain
var total_length = INF
# The amount of iterations we've been through, and whether or not we want to limit our solver to CHAIN_MAX_ITER
# amounts of interations.
# amounts of iterations.
@export var chain_iterations: int = 0
@export var limit_chain_iterations: bool = true
# Should we reset chain_iterations on movement during our update method?
Expand Down Expand Up @@ -151,7 +151,7 @@ func _ready():
update_mode = update_mode


# Various upate methods
# Various update methods
func _process(_delta):
if reset_iterations_on_update:
chain_iterations = 0
Expand Down Expand Up @@ -206,7 +206,7 @@ func update_skeleton():
for bone_name in bones_in_chain:
bone_IDs[bone_name] = skeleton.find_bone(bone_name)

# Set the bone node to the currect bone position
# Set the bone node to the current bone position
bone_nodes[i].global_transform = get_bone_transform(i)
# If this is not the last bone in the bone chain, make it look at the next bone in the bone chain
if i < bone_IDs.size()-1:
Expand Down Expand Up @@ -423,7 +423,7 @@ func _make_editor_sphere_at_node(node, color):
indicator_mesh.radial_segments = 8
indicator_mesh.rings = 4

# The mesh needs a material (unless we want to use the defualt one).
# The mesh needs a material (unless we want to use the default one).
# Let's create a material and use the EditorGizmoTexture to texture it.
var indicator_material = StandardMaterial3D.new()
indicator_material.flags_unshaded = true
Expand Down
2 changes: 1 addition & 1 deletion 3d/ik/fps/example_player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const norm_grav = -38.8
const MAX_SPEED = 22
const JUMP_SPEED = 26
const ACCEL = 8.5
# Sprinting variables. Similar to the varibles above, just allowing for quicker movement
# Sprinting variables. Similar to the variables above, just allowing for quicker movement
const MAX_SPRINT_SPEED = 34
const SPRINT_ACCEL = 18
# How fast we slow down, and the steepest angle we can climb.
Expand Down
1 change: 0 additions & 1 deletion 3d/ik/model/battle_bot_emission.tres
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ uv2_triplanar_sharpness = 1.0
proximity_fade_enable = false
distance_fade_enable = false
_sections_unfolded = [ "Albedo" ]

2 changes: 1 addition & 1 deletion 3d/labels_and_texts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PrimitiveMesh resource you use within a MeshsInstance3D node. Therefore, you
won't see TextMesh in the Create New Node dialog.

Icons can also be displayed in Label3D and TextMesh using icon fonts, which can
be generated from SVG files using serivces like
be generated from SVG files using services like
[Fontello](https://fontello.com/). Note that while Label3D supports colored
rasterized fonts (such as emoji), only monochrome fonts can be generated from
Fontello. TextMesh and Label3D with MSDF fonts are limited to monochrome fonts
Expand Down
8 changes: 4 additions & 4 deletions 3d/material_testers/material_tester.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[ext_resource type="Material" uid="uid://ca5id5w12cprn" path="res://test_materials/stones.tres" id="11"]
[ext_resource type="Material" uid="uid://dfsu6vtygh0tc" path="res://test_materials/brick.tres" id="12"]
[ext_resource type="Material" uid="uid://dtui5o3potpen" path="res://test_materials/wool.tres" id="13"]
[ext_resource type="Material" uid="uid://cg7l6w2h0aq22" path="res://test_materials/aluminium.tres" id="14"]
[ext_resource type="Material" uid="uid://cg7l6w2h0aq22" path="res://test_materials/aluminum.tres" id="14"]
[ext_resource type="Material" uid="uid://c5oxndmf0jbu3" path="res://test_materials/marble.tres" id="15"]
[ext_resource type="Material" uid="uid://dv76cxap5uj7y" path="res://test_materials/cheese.tres" id="16"]
[ext_resource type="Material" uid="uid://bx0jnmhhr8qwh" path="res://test_materials/wet_sand.tres" id="17"]
Expand Down Expand Up @@ -181,10 +181,10 @@ enable_shadows = true
cull_mask = 2147483519
reflection_mask = 128

[node name="Aluminium" parent="Testers" instance=ExtResource("3")]
[node name="Aluminum" parent="Testers" instance=ExtResource("3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0)

[node name="GodotBall" type="MeshInstance3D" parent="Testers/Aluminium"]
[node name="GodotBall" type="MeshInstance3D" parent="Testers/Aluminum"]
transform = Transform3D(0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0.5, -4)
layers = 256
mesh = ExtResource("4_7al4s")
Expand All @@ -193,7 +193,7 @@ surface_material_override/1 = ExtResource("6")
surface_material_override/2 = ExtResource("5")
surface_material_override/3 = ExtResource("7")

[node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Aluminium/GodotBall" groups=["reflection_probe"]]
[node name="ReflectionProbe" type="ReflectionProbe" parent="Testers/Aluminum/GodotBall" groups=["reflection_probe"]]
transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 3, 0)
size = Vector3(256, 256, 256)
enable_shadows = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dsb01xyn6yui5"
path="res://.godot/imported/aluminium_albedo.png-a68e22c8a951430ab431b2a7307e8bc7.ctex"
path="res://.godot/imported/aluminum_albedo.png-081eadc1db150ab14ee333ec7c5a42e4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://test_materials/aluminium_albedo.png"
dest_files=["res://.godot/imported/aluminium_albedo.png-a68e22c8a951430ab431b2a7307e8bc7.ctex"]
source_file="res://test_materials/aluminum_albedo.png"
dest_files=["res://.godot/imported/aluminum_albedo.png-081eadc1db150ab14ee333ec7c5a42e4.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cqlianda7xhoy"
path="res://.godot/imported/aluminium_flow.png-93fdac7ed0fa884674e32e5ec0c6d690.ctex"
path="res://.godot/imported/aluminum_flow.png-33fc2e7d59813577c085f138a7f09d7e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://test_materials/aluminium_flow.png"
dest_files=["res://.godot/imported/aluminium_flow.png-93fdac7ed0fa884674e32e5ec0c6d690.ctex"]
source_file="res://test_materials/aluminum_flow.png"
dest_files=["res://.godot/imported/aluminum_flow.png-33fc2e7d59813577c085f138a7f09d7e.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ds1h5kb3sbtqq"
path="res://.godot/imported/aluminium_normal.png-ff9bf84211f307b1d9e8bf86ebea04b1.ctex"
path="res://.godot/imported/aluminum_normal.png-c3d4ddf3eca393ad1ee11941483c8807.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://test_materials/aluminium_normal.png"
dest_files=["res://.godot/imported/aluminium_normal.png-ff9bf84211f307b1d9e8bf86ebea04b1.ctex"]
source_file="res://test_materials/aluminum_normal.png"
dest_files=["res://.godot/imported/aluminum_normal.png-c3d4ddf3eca393ad1ee11941483c8807.ctex"]

[params]

Expand Down
Loading