Skip to content

Commit 751d1e9

Browse files
authored
Upgrade to v2.2
2 parents bcc82e6 + 3825eae commit 751d1e9

File tree

111 files changed

+5553
-1182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+5553
-1182
lines changed

.github/workflows/gut.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: GUT
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
GUT_Tests:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v3
21+
- name: Check out personal godot-tester repository
22+
uses: actions/checkout@v3
23+
with:
24+
repository: db0/godot-tester
25+
path: ./.github/actions/godot-tester
26+
# Runs a single command using the runners shell
27+
- name: Godot Tester
28+
uses: ./.github/actions/godot-tester
29+
with:
30+
version: 3.4.4
31+
# should be long enough for asset import files to get generated
32+
import-time: 10
33+
assert-check: true
34+
max-fails: 0
35+
# How long the test should be run before it's timed out and fails
36+
test-timeout: 900
37+
# Directory containing Gut tests
38+
direct-scene: tests/cli/tests.tscn

.github/workflows/main.yml

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,67 @@
1-
name: GUT
1+
name: Prepare New Release
22

33
on:
4-
push: {}
5-
pull_request: {}
4+
push:
5+
branches:
6+
- main
67

7-
# Allows you to run this workflow manually from the Actions tab
8-
workflow_dispatch:
98

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
119
jobs:
12-
GUT_Tests:
13-
# The type of runner that the job will run on
10+
GUT:
1411
runs-on: ubuntu-latest
15-
16-
# Steps represent a sequence of tasks that will be executed as part of the job
12+
name: Unit & Integration Tests
1713
steps:
18-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19-
- uses: actions/checkout@v2
20-
14+
- name: "✔️ Checkout"
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: Check out personal godot-tester repository
19+
uses: actions/checkout@v3
20+
with:
21+
repository: db0/godot-tester
22+
path: ./.github/actions/godot-tester
2123
# Runs a single command using the runners shell
22-
- name: Godot Tester
23-
uses: croconut/[email protected]
24-
with:
25-
version: 3.4
26-
# should be long enough for asset import files to get generated
27-
import-time: 10
28-
assert-check: true
29-
max-fails: 0
30-
# How long the test should be run before it's timed out and fails
31-
test-timeout: 900
32-
# Directory containing Gut tests
33-
direct-scene: tests/cli/tests.tscn
24+
- name: ⚙ Run Tests
25+
uses: ./.github/actions/godot-tester
26+
with:
27+
version: 3.4.4
28+
# should be long enough for asset import files to get generated
29+
import-time: 300
30+
assert-check: true
31+
# Allowing some fails on push, as sometimes randomly some asserts might false negative and I haven't yet located the precice reason for this inconsistency
32+
max-fails: 0
33+
# How long the test should be run before it's timed out and fails
34+
test-timeout: 3600
35+
# Directory containing Gut tests
36+
direct-scene: tests/cli/tests.tscn
37+
version_and_release:
38+
runs-on: ubuntu-latest
39+
name: Export Game
40+
needs: ["GUT"]
41+
steps:
42+
- name: "✔️ Checkout"
43+
uses: actions/checkout@v2
44+
with:
45+
fetch-depth: 0
46+
- name: "🤖 Export game"
47+
uses: firebelley/[email protected]
48+
with:
49+
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_linux_headless.64.zip
50+
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_export_templates.tpz
51+
relative_project_path: ./
52+
base_version: Demo
53+
create_release: false
54+
archive_export_output: true
55+
- name: "🛠 Prepare files for publishing"
56+
shell: bash
57+
run: |
58+
cp -v /home/runner/.local/share/godot/dist/* .
59+
- name: "🚀 Upload HTML5 version to itch.io"
60+
uses: josephbmanley/butler-publish-itchio-action@master
61+
env:
62+
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}"
63+
CHANNEL: HTML5
64+
ITCH_GAME: card-game-framework
65+
ITCH_USER: dbzer0
66+
PACKAGE: HTML5.zip
67+
VERSION: Demo

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.import/
44
*.import
55
export.cfg
6-
export_presets.cfg
76
*.TMP
87

98
# Mono-specific ignores

.gut_editor_config.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"background_color": "ff343434",
3+
"config_file": "res://.gutconfig.json",
4+
"dirs": [
5+
"res://tests/unit",
6+
"res://tests/integration"
7+
],
8+
"disable_colors": false,
9+
"double_strategy": "partial",
10+
"font_color": "ffc1bfce",
11+
"font_name": "CourierPrime",
12+
"font_size": 15,
13+
"hide_orphans": false,
14+
"ignore_pause": true,
15+
"include_subdirs": false,
16+
"inner_class": "TestModifyProperties",
17+
"junit_xml_file": "",
18+
"junit_xml_timestamp": false,
19+
"log_level": 3,
20+
"opacity": 70,
21+
"post_run_script": "",
22+
"pre_run_script": "",
23+
"prefix": "test_",
24+
"selected": "test_scripting_engine_tasks_modify_properties.gd",
25+
"should_exit": false,
26+
"should_exit_on_success": false,
27+
"should_maximize": true,
28+
"compact_mode": false,
29+
"show_help": false,
30+
"suffix": ".gd",
31+
"tests": [
32+
33+
],
34+
"unit_test_name": "test_modify_properties",
35+
"gut_on_top": true,
36+
"panel_options": {
37+
"font_name": "CourierPrime",
38+
"font_size": 30
39+
}
40+
}

.gut_editor_shortcuts.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[main]
2+
3+
run_all=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":49,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
4+
,"script":null)
5+
6+
run_current_script=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":50,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
7+
,"script":null)
8+
9+
run_current_inner=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":51,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
10+
,"script":null)
11+
12+
run_current_test=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":52,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
13+
,"script":null)
14+
15+
panel_button=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":48,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
16+
,"script":null)
17+

BigFont.tres

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[gd_resource type="DynamicFont" load_steps=2 format=2]
2+
3+
[sub_resource type="DynamicFontData" id=9]
4+
font_path = "res://addons/gut/fonts/LobsterTwo-BoldItalic.ttf"
5+
6+
[resource]
7+
size = 40
8+
font_data = SubResource( 9 )

BigFontTheme.tres

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[gd_resource type="Theme" load_steps=2 format=2]
2+
3+
[ext_resource path="res://BigFont.tres" type="DynamicFont" id=1]
4+
5+
[resource]
6+
default_font = ExtResource( 1 )

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,38 @@
66

77
* `CardFilter` class can now call `custom_check()`. This allows any game to extend it with extra functionality
88
* `CardFilter` class can now filter against array/dictionary size
9+
* Added option to specify if a pile should have sorted popups
10+
11+
### Tweaks
12+
13+
* Removed unnecessary use of seed rng during visual rng
14+
* Prevents info panels moving outside viewport
15+
* SelectionWindow now uses SignalPropagator
16+
* SelectWindow can select direct cards
17+
* Selection Window will now properly turn cards face-up
18+
* Made the rich text card front the default card front
19+
* Changed the Cost/Power values to use icons and no-text.
20+
* Preview Popups will now tween their position when changing it
21+
* Details Panels can now multiple columns, so that they don't grow infinitely long, pushing the card out of the viewport.
22+
23+
### Bugfixes
24+
25+
* Avoids card becoming unplayable randomly.
26+
* Avoids crash when Scripting Engine is used on non-card objects
27+
* CardViewer now works with "scale" resizing properly
928

1029
#### ScriptingEngine
1130

1231
* Can now set a card state to be "any" and the script will trigger
1332
Regardless of where the card is.
1433
* ScriptingEngine filters can now filter using CardFilter objects
1534
* Added KEY_FILTER_EACH_REVIOUS_SUBJECT to use in tasks utilizing KEY_SUBJECT_V_PREVIOUS.
35+
* Added KEY_UP_TO to use with KEY_SUBJECT_V_TUTOR
36+
* Added `_pre_task_exec()` in ScriptingEngine
37+
* Alterant Engine can now take into account script subject
38+
* Added signal when card scripts finish
39+
* Fixed per_ in alterant engine not working
40+
* Prevents crash when card container empty while looking for card index.
1641

1742
## 2.1
1843

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Godot Card Game Framework [2.1](CHANGELOG.md)
2+
# Godot Card Game Framework [2.2](CHANGELOG.md)
33

44
[![GUT](https://github.com/db0/godot-card-game-framework/actions/workflows/main.yml/badge.svg)](https://github.com/db0/godot-card-game-framework/actions/workflows/main.yml)
55

@@ -29,7 +29,7 @@ Pull requests are more than welcome ;)
2929
* Cards can target other cards with a draggable arrow
3030
* Can flip cards face-down and view them while in that state
3131
* Can add tokens on cards. Tokens expand in the own drawer for more info.
32-
* Ability to define cards in standard json
32+
* Ability to define cards in standard dictionaries
3333
* Ability to split card definitions into sets
3434
* Automatically resizing text inside cards to fit the card size.
3535
* Supports resizing the window, in all stretch modes (including disabled stretch)
@@ -50,7 +50,7 @@ Pull requests are more than welcome ;)
5050

5151
### Scripting Engine Features
5252

53-
* Can define card scripts in plain text, using simple json.
53+
* Can define card scripts in plain text, using dictionaries.
5454
* Can set cards to trigger off of any board manipulation.
5555
* Can filter the triggers based on card properties, or a special subset.
5656
* Can define optional abilities.
@@ -61,7 +61,7 @@ Pull requests are more than welcome ;)
6161
* Can store results from one script to use in another.
6262
* Can be plugged into by any object, not just cards.
6363

64-
All of the above while being very easily extensible to your own game's special requirements through simple json dictionaries.
64+
All of the above while being very easily extensible to your own game's special requirements through simple dictionaries.
6565

6666
## Easy Customization
6767

0 commit comments

Comments
 (0)