Skip to content

Commit

Permalink
Upgrade to v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 authored Jun 5, 2022
2 parents bcc82e6 + 3825eae commit 751d1e9
Show file tree
Hide file tree
Showing 111 changed files with 5,553 additions and 1,182 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/gut.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: GUT

on:
push:
branches-ignore:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
GUT_Tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Check out personal godot-tester repository
uses: actions/checkout@v3
with:
repository: db0/godot-tester
path: ./.github/actions/godot-tester
# Runs a single command using the runners shell
- name: Godot Tester
uses: ./.github/actions/godot-tester
with:
version: 3.4.4
# should be long enough for asset import files to get generated
import-time: 10
assert-check: true
max-fails: 0
# How long the test should be run before it's timed out and fails
test-timeout: 900
# Directory containing Gut tests
direct-scene: tests/cli/tests.tscn
84 changes: 59 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,67 @@
name: GUT
name: Prepare New Release

on:
push: {}
pull_request: {}
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
GUT_Tests:
# The type of runner that the job will run on
GUT:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
name: Unit & Integration Tests
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: "✔️ Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check out personal godot-tester repository
uses: actions/checkout@v3
with:
repository: db0/godot-tester
path: ./.github/actions/godot-tester
# Runs a single command using the runners shell
- name: Godot Tester
uses: croconut/[email protected]
with:
version: 3.4
# should be long enough for asset import files to get generated
import-time: 10
assert-check: true
max-fails: 0
# How long the test should be run before it's timed out and fails
test-timeout: 900
# Directory containing Gut tests
direct-scene: tests/cli/tests.tscn
- name: ⚙ Run Tests
uses: ./.github/actions/godot-tester
with:
version: 3.4.4
# should be long enough for asset import files to get generated
import-time: 300
assert-check: true
# 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
max-fails: 0
# How long the test should be run before it's timed out and fails
test-timeout: 3600
# Directory containing Gut tests
direct-scene: tests/cli/tests.tscn
version_and_release:
runs-on: ubuntu-latest
name: Export Game
needs: ["GUT"]
steps:
- name: "✔️ Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "🤖 Export game"
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_export_templates.tpz
relative_project_path: ./
base_version: Demo
create_release: false
archive_export_output: true
- name: "🛠 Prepare files for publishing"
shell: bash
run: |
cp -v /home/runner/.local/share/godot/dist/* .
- name: "🚀 Upload HTML5 version to itch.io"
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}"
CHANNEL: HTML5
ITCH_GAME: card-game-framework
ITCH_USER: dbzer0
PACKAGE: HTML5.zip
VERSION: Demo
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.import/
*.import
export.cfg
export_presets.cfg
*.TMP

# Mono-specific ignores
Expand Down
40 changes: 40 additions & 0 deletions .gut_editor_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"background_color": "ff343434",
"config_file": "res://.gutconfig.json",
"dirs": [
"res://tests/unit",
"res://tests/integration"
],
"disable_colors": false,
"double_strategy": "partial",
"font_color": "ffc1bfce",
"font_name": "CourierPrime",
"font_size": 15,
"hide_orphans": false,
"ignore_pause": true,
"include_subdirs": false,
"inner_class": "TestModifyProperties",
"junit_xml_file": "",
"junit_xml_timestamp": false,
"log_level": 3,
"opacity": 70,
"post_run_script": "",
"pre_run_script": "",
"prefix": "test_",
"selected": "test_scripting_engine_tasks_modify_properties.gd",
"should_exit": false,
"should_exit_on_success": false,
"should_maximize": true,
"compact_mode": false,
"show_help": false,
"suffix": ".gd",
"tests": [

],
"unit_test_name": "test_modify_properties",
"gut_on_top": true,
"panel_options": {
"font_name": "CourierPrime",
"font_size": 30
}
}
17 changes: 17 additions & 0 deletions .gut_editor_shortcuts.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[main]

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

8 changes: 8 additions & 0 deletions BigFont.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[sub_resource type="DynamicFontData" id=9]
font_path = "res://addons/gut/fonts/LobsterTwo-BoldItalic.ttf"

[resource]
size = 40
font_data = SubResource( 9 )
6 changes: 6 additions & 0 deletions BigFontTheme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=2]

[ext_resource path="res://BigFont.tres" type="DynamicFont" id=1]

[resource]
default_font = ExtResource( 1 )
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,38 @@

* `CardFilter` class can now call `custom_check()`. This allows any game to extend it with extra functionality
* `CardFilter` class can now filter against array/dictionary size
* Added option to specify if a pile should have sorted popups

### Tweaks

* Removed unnecessary use of seed rng during visual rng
* Prevents info panels moving outside viewport
* SelectionWindow now uses SignalPropagator
* SelectWindow can select direct cards
* Selection Window will now properly turn cards face-up
* Made the rich text card front the default card front
* Changed the Cost/Power values to use icons and no-text.
* Preview Popups will now tween their position when changing it
* Details Panels can now multiple columns, so that they don't grow infinitely long, pushing the card out of the viewport.

### Bugfixes

* Avoids card becoming unplayable randomly.
* Avoids crash when Scripting Engine is used on non-card objects
* CardViewer now works with "scale" resizing properly

#### ScriptingEngine

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

## 2.1

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Godot Card Game Framework [2.1](CHANGELOG.md)
# Godot Card Game Framework [2.2](CHANGELOG.md)

[![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)

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

### Scripting Engine Features

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

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

## Easy Customization

Expand Down
Loading

0 comments on commit 751d1e9

Please sign in to comment.