Skip to content

Commit 0e34e18

Browse files
TMHSDigitalclaude
andcommitted
Add the skeleton addon: enabling it adds an empty "Free Assets" dock
plugin.gd adds the dock on enter and removes and frees it on exit; the dock is built in code (dock.gd) so the same source loads in every 4.x. The repo root is now a dev project with the plugin enabled; project.godot is export-ignored like the README. Checked with Godot 4.7.1 headless: dock added, dock removed on unload, no script errors. Refs TMHSDigital/Free-Game-Dev-Assets#278 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LpkeXPtfg3jGzhfoGMshTE
1 parent fda41d6 commit 0e34e18

8 files changed

Lines changed: 73 additions & 0 deletions

File tree

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
/.gitignore export-ignore
99
/.github export-ignore
1010
/README.md export-ignore
11+
/project.godot export-ignore
1112
/tests export-ignore
1213
/project export-ignore

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ Godot 4.3 or later. GDScript only: no GDExtension and no C#.
3333

3434
From the Godot Asset Library, or by copying `addons/free_game_dev_assets/` into your project. Then turn it on under **Project → Project Settings → Plugins**.
3535

36+
## Develop
37+
38+
The repo root is a small Godot project with the plugin turned on. Open the folder in Godot 4.3 or later and the "Free Assets" dock appears on the right. To check from a terminal that it loads cleanly:
39+
40+
```
41+
godot --headless --editor --quit-after 120 --verbose --path .
42+
```
43+
44+
The output should include `free_game_dev_assets: dock added` and no `SCRIPT ERROR`. `project.godot` is left out of the Asset Library download.
45+
3646
## Licence
3747

3848
Plugin code: [MIT](LICENSE). Catalog data: [CC0 1.0](https://github.com/TMHSDigital/Free-Game-Dev-Assets/blob/main/LICENSE). The assets the catalog lists keep their own licences.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@tool
2+
extends VBoxContainer
3+
## The "Free Assets" dock. Built in code rather than a .tscn so one source
4+
## loads the same in every Godot 4.x the plugin supports.
5+
6+
7+
func _ready() -> void:
8+
var title := Label.new()
9+
title.text = "Free Game Dev Assets"
10+
title.add_theme_font_size_override("font_size", 16)
11+
add_child(title)
12+
13+
var note := Label.new()
14+
note.text = "The catalog browser is coming. See the plugin's README for progress."
15+
note.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
16+
note.size_flags_horizontal = Control.SIZE_EXPAND_FILL
17+
add_child(note)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://qtqwjqdtn852
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[plugin]
2+
3+
name="Free Game Dev Assets"
4+
description="Browse the Free Game Dev Assets catalog: filter by licence, copy credit lines and export CREDITS.md."
5+
author="TMHSDigital"
6+
version="0.1.0"
7+
script="plugin.gd"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@tool
2+
extends EditorPlugin
3+
## Adds the "Free Assets" dock. Everything the dock does lives in dock.gd;
4+
## this file only adds it and takes it away again, so turning the plugin off
5+
## and on leaves nothing behind.
6+
7+
const Dock := preload("dock.gd")
8+
9+
var _dock: Control
10+
11+
12+
func _enter_tree() -> void:
13+
_dock = Dock.new()
14+
_dock.name = "Free Assets"
15+
add_control_to_dock(DOCK_SLOT_RIGHT_UL, _dock)
16+
print_verbose("free_game_dev_assets: dock added")
17+
18+
19+
func _exit_tree() -> void:
20+
if is_instance_valid(_dock):
21+
remove_control_from_docks(_dock)
22+
_dock.queue_free()
23+
_dock = null
24+
print_verbose("free_game_dev_assets: dock removed")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://cke1v3hd6ulir

‎project.godot‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
; Development project: open this folder in Godot to work on the plugin.
2+
; Not part of the addon download (see .gitattributes).
3+
4+
config_version=5
5+
6+
[application]
7+
8+
config/name="Free Game Dev Assets (plugin dev)"
9+
10+
[editor_plugins]
11+
12+
enabled=PackedStringArray("res://addons/free_game_dev_assets/plugin.cfg")

0 commit comments

Comments
 (0)