CHORE: setup
All checks were successful
Quality Check / Linting (push) Successful in 7s
Build Application / build (tower_defence_web, build/*, build, build/index.html, Web) (push) Successful in 16s
Build Application / build (tower_defence.exe, tower_defence.exe, tower_defence.exe, Windows) (push) Successful in 38s
Build Application / build (tower_defence.elf, tower_defence.elf, tower_defence.elf, Linux) (push) Successful in 16s
Build Application / build-docker (push) Successful in 10s
Build Application / release (push) Successful in 12s

This commit is contained in:
Snoweuph 2025-01-29 13:43:42 +01:00
commit a1a363cd85
Signed by: snoweuph
GPG key ID: BEFC41DA223CEC55
29 changed files with 2648 additions and 0 deletions

View file

@ -0,0 +1,29 @@
name: Feature
title: '[Feature]: '
about: 'Vorlage Für ein Feature Ticket'
ref: 'trunk'
body:
- type: input
id: ticket
attributes:
label: Ticket
description: Für Welches Ticket ist diese Pull Request?
placeholder: TD-1
validations:
required: true
- type: textarea
id: beschreibung
attributes:
label: Beschreibung
description: Was hast du genau gemacht in diesem Ticket?
placeholder: ...
validations:
required: true
- type: textarea
id: more
attributes:
label: Weitere Infos
description: Gibt es noch etwas das ich wissen muss um das Ticket zu Reviewn?
placeholder: ...
validations:
required: false

View file

@ -0,0 +1,3 @@
FROM httpd:2.4
ADD web /usr/local/apache2/htdocs/

117
.forgejo/workflows/build.yml Executable file
View file

@ -0,0 +1,117 @@
name: Build Application
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?'
- 'v*'
jobs:
build:
runs-on: docker
container:
image: git.euph.dev/actions/runner-redot-4.3:latest
strategy:
matrix:
include:
- platform: Linux
out: tower_defence.elf
artifact-name: tower_defence.elf
artifact-path: tower_defence.elf
#- platform: OSX
# build-dir: build
# out: build/tower_defence.app
# artifact-name: tower_defence.app
# artifact-path: build
- platform: Windows
out: tower_defence.exe
artifact-name: tower_defence.exe
artifact-path: tower_defence.exe
- platform: Web
build-dir: build
out: build/index.html
artifact-name: tower_defence_web
artifact-path: build/*
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: Build Binary
run: |
if [ "${{ matrix.build-dir }}" != "" ]; then
mkdir -p ${{ matrix.build-dir}}
fi
redot --headless --export-release ${{ matrix.platform }} ${{ matrix.out }}
- name: Upload Binary as Artifact
uses: "https://git.euph.dev/actions/upload-artifact@v3"
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}
build-docker:
runs-on: docker
needs:
- build
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: Download artifact from previous job
uses: "https://git.euph.dev/actions/download-artifact@v3"
with:
name: tower_defence_web
path: .forgejo/workflows/web
- name: Login to Registry
uses: "https://git.euph.dev/actions/docker-login@v3"
with:
registry: git.euph.dev
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SECRET }}
- name: Build and push Web Image
uses: "https://git.euph.dev/actions/docker-build-push@v5"
with:
context: ".forgejo/workflows/"
push: true
tags: |
git.euph.dev/towerdefence/web-client:${{ github.ref_name }}
${{ contains(github.ref_name, 'rc') == false && 'git.euph.dev/towerdefence/web-client:latest' || '' }}
release:
runs-on: stable
container:
image: git.euph.dev/actions/runner-basic:latest
needs:
- build
- build-docker
steps:
- name: Download Linux Release Binaries
uses: "https://git.euph.dev/actions/download-artifact@v3"
with:
name: tower_defence.elf
path: release
- name: Download Windows release Binaries
uses: "https://git.euph.dev/actions/download-artifact@v3"
with:
name: tower_defence.exe
path: release
- name: Debug
run: |
echo LS && ls -a
echo PWD && pwd
echo release && ls -a release
- name: Create Release
uses: "https://git.euph.dev/actions/release@v2"
with:
direction: upload
tag: ${{ github.ref_name }}
token: ${{ secrets.DEPLOY_TOKEN }}
prerelease: ${{ contains( github.ref_name, "rc") }}
release-dir: release
release-notes: |
# Tower Defence ${{ github.ref_name }}
Run this release with docker like this:
\`\`\`sh
docker run --rm -p 8080:80 git.euph.dev/towerdefence/web-client:${{ github.ref_name }}
\`\`\`
It will be available under [\`localhost:8080\`](localhost:8080)

20
.forgejo/workflows/qs.yml Normal file
View file

@ -0,0 +1,20 @@
name: "Quality Check"
on:
- push
- pull_request
jobs:
lint:
name: "Linting"
runs-on: stable
container:
image: "git.euph.dev/actions/runner-redot-4.3:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: "Check Linting"
run: gdlint .
- name: "Check Formatting"
run: gdformat -c -d .

2
.gitattributes vendored Executable file
View file

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored Executable file
View file

@ -0,0 +1,3 @@
# Redot 4+ specific ignores
.godot/
/android/

1
License.md Executable file
View file

@ -0,0 +1 @@
See License [here](https://git.euph.dev/TowerDefence/.profile/src/branch/main/License.md)

3
Readme.md Executable file
View file

@ -0,0 +1,3 @@
[![QS Badge](https://git.euph.dev/TowerDefence/Client/actions/workflows/qs.yml/badge.svg?branch=trunk&style=for-the-badge&label=QS)](https://git.euph.dev/TowerDefence/Client/actions?workflow=qs.yml)
[![Build Badge](https://git.euph.dev/TowerDefence/Client/actions/workflows/build.yml/badge.svg?style=for-the-badge&label=Build)](https://git.euph.dev/TowerDefence/Client/actions?workflow=qs.yml)
# Tower Defence - Client

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Ryan Haskell-Glatz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,70 @@
@tool
class_name FormatOnSave extends EditorPlugin
const SUCCESS: int = 0
const AUTO_RELOAD_SETTING: String = "text_editor/behavior/files/auto_reload_scripts_on_external_change"
var original_auto_reload_setting: bool
# LIFECYCLE EVENTS
func _enter_tree():
activate_auto_reload_setting()
resource_saved.connect(on_resource_saved)
func _exit_tree():
resource_saved.disconnect(on_resource_saved)
restore_original_auto_reload_setting()
# CALLED WHEN A SCRIPT IS SAVED
func on_resource_saved(resource: Resource):
if resource is Script:
var script: Script = resource
var current_script = get_editor_interface().get_script_editor().get_current_script()
var text_edit: CodeEdit = (
get_editor_interface().get_script_editor().get_current_editor().get_base_editor()
)
# Prevents other unsaved scripts from overwriting the active one
if current_script == script:
var filepath: String = ProjectSettings.globalize_path(resource.resource_path)
# Run gdformat
var exit_code = OS.execute("gdformat", [filepath])
# Replace source_code with formatted source_code
if exit_code == SUCCESS:
var formatted_source = FileAccess.get_file_as_string(resource.resource_path)
FormatOnSave.reload_script(text_edit, formatted_source)
# Workaround until this PR is merged:
# https://github.com/godotengine/godot/pull/83267
# Thanks, @KANAjetzt 💖
static func reload_script(text_edit: TextEdit, source_code: String) -> void:
var column := text_edit.get_caret_column()
var row := text_edit.get_caret_line()
var scroll_position_h := text_edit.get_h_scroll_bar().value
var scroll_position_v := text_edit.get_v_scroll_bar().value
text_edit.text = source_code
text_edit.set_caret_column(column)
text_edit.set_caret_line(row)
text_edit.scroll_horizontal = scroll_position_h
text_edit.scroll_vertical = scroll_position_v
text_edit.tag_saved_version()
# For this workaround to work, we need to disable the "Reload/Resave" pop-up
func activate_auto_reload_setting():
var settings := get_editor_interface().get_editor_settings()
original_auto_reload_setting = settings.get(AUTO_RELOAD_SETTING)
settings.set(AUTO_RELOAD_SETTING, true)
# If the plugin is disabled, let's attempt to restore the original editor setting
func restore_original_auto_reload_setting():
var settings := get_editor_interface().get_editor_settings()
settings.set(AUTO_RELOAD_SETTING, original_auto_reload_setting)

View file

@ -0,0 +1,6 @@
[plugin]
name="Format on Save"
description="Runs `gdformat` on save to automatically format your GD script as you code."
author="Ryan Haskell-Glatz"
version="1.2.0"
script="format_on_save.gd"

396
export_presets.cfg Normal file
View file

@ -0,0 +1,396 @@
[preset.0]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.1]
name="Windows"
platform="Windows Desktop"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask redot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName redot_remote_debug
while (Get-ScheduledTask -TaskName redot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName redot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName redot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName redot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
[preset.2]
name="OSX"
platform="macOS"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.2.options]
export/distribution_type=1
binary_format/architecture="universal"
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
application/icon=""
application/icon_interpolation=4
application/bundle_identifier="de.szut.tower-defence"
application/signature=""
application/app_category="Games"
application/short_version=""
application/version=""
application/copyright="tower defence group"
application/copyright_localized={}
application/min_macos_version="10.12"
application/export_angle=0
display/high_res=true
application/additional_plist_content=""
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
xcode/sdk_build="22C55"
xcode/sdk_name="macosx13.1"
xcode/xcode_version="1420"
xcode/xcode_build="14C18"
codesign/codesign=1
codesign/installer_identity=""
codesign/apple_team_id=""
codesign/identity=""
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/files_user_selected=0
codesign/entitlements/app_sandbox/helper_executables=[]
codesign/custom_options=PackedStringArray()
notarization/notarization=0
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/location_usage_description=""
privacy/location_usage_description_localized={}
privacy/address_book_usage_description=""
privacy/address_book_usage_description_localized={}
privacy/calendar_usage_description=""
privacy/calendar_usage_description_localized={}
privacy/photos_library_usage_description=""
privacy/photos_library_usage_description_localized={}
privacy/desktop_folder_usage_description=""
privacy/desktop_folder_usage_description_localized={}
privacy/documents_folder_usage_description=""
privacy/documents_folder_usage_description_localized={}
privacy/downloads_folder_usage_description=""
privacy/downloads_folder_usage_description_localized={}
privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={}
privacy/tracking_enabled=false
privacy/tracking_domains=PackedStringArray()
privacy/collected_data/name/collected=false
privacy/collected_data/name/linked_to_user=false
privacy/collected_data/name/used_for_tracking=false
privacy/collected_data/name/collection_purposes=0
privacy/collected_data/email_address/collected=false
privacy/collected_data/email_address/linked_to_user=false
privacy/collected_data/email_address/used_for_tracking=false
privacy/collected_data/email_address/collection_purposes=0
privacy/collected_data/phone_number/collected=false
privacy/collected_data/phone_number/linked_to_user=false
privacy/collected_data/phone_number/used_for_tracking=false
privacy/collected_data/phone_number/collection_purposes=0
privacy/collected_data/physical_address/collected=false
privacy/collected_data/physical_address/linked_to_user=false
privacy/collected_data/physical_address/used_for_tracking=false
privacy/collected_data/physical_address/collection_purposes=0
privacy/collected_data/other_contact_info/collected=false
privacy/collected_data/other_contact_info/linked_to_user=false
privacy/collected_data/other_contact_info/used_for_tracking=false
privacy/collected_data/other_contact_info/collection_purposes=0
privacy/collected_data/health/collected=false
privacy/collected_data/health/linked_to_user=false
privacy/collected_data/health/used_for_tracking=false
privacy/collected_data/health/collection_purposes=0
privacy/collected_data/fitness/collected=false
privacy/collected_data/fitness/linked_to_user=false
privacy/collected_data/fitness/used_for_tracking=false
privacy/collected_data/fitness/collection_purposes=0
privacy/collected_data/payment_info/collected=false
privacy/collected_data/payment_info/linked_to_user=false
privacy/collected_data/payment_info/used_for_tracking=false
privacy/collected_data/payment_info/collection_purposes=0
privacy/collected_data/credit_info/collected=false
privacy/collected_data/credit_info/linked_to_user=false
privacy/collected_data/credit_info/used_for_tracking=false
privacy/collected_data/credit_info/collection_purposes=0
privacy/collected_data/other_financial_info/collected=false
privacy/collected_data/other_financial_info/linked_to_user=false
privacy/collected_data/other_financial_info/used_for_tracking=false
privacy/collected_data/other_financial_info/collection_purposes=0
privacy/collected_data/precise_location/collected=false
privacy/collected_data/precise_location/linked_to_user=false
privacy/collected_data/precise_location/used_for_tracking=false
privacy/collected_data/precise_location/collection_purposes=0
privacy/collected_data/coarse_location/collected=false
privacy/collected_data/coarse_location/linked_to_user=false
privacy/collected_data/coarse_location/used_for_tracking=false
privacy/collected_data/coarse_location/collection_purposes=0
privacy/collected_data/sensitive_info/collected=false
privacy/collected_data/sensitive_info/linked_to_user=false
privacy/collected_data/sensitive_info/used_for_tracking=false
privacy/collected_data/sensitive_info/collection_purposes=0
privacy/collected_data/contacts/collected=false
privacy/collected_data/contacts/linked_to_user=false
privacy/collected_data/contacts/used_for_tracking=false
privacy/collected_data/contacts/collection_purposes=0
privacy/collected_data/emails_or_text_messages/collected=false
privacy/collected_data/emails_or_text_messages/linked_to_user=false
privacy/collected_data/emails_or_text_messages/used_for_tracking=false
privacy/collected_data/emails_or_text_messages/collection_purposes=0
privacy/collected_data/photos_or_videos/collected=false
privacy/collected_data/photos_or_videos/linked_to_user=false
privacy/collected_data/photos_or_videos/used_for_tracking=false
privacy/collected_data/photos_or_videos/collection_purposes=0
privacy/collected_data/audio_data/collected=false
privacy/collected_data/audio_data/linked_to_user=false
privacy/collected_data/audio_data/used_for_tracking=false
privacy/collected_data/audio_data/collection_purposes=0
privacy/collected_data/gameplay_content/collected=false
privacy/collected_data/gameplay_content/linked_to_user=false
privacy/collected_data/gameplay_content/used_for_tracking=false
privacy/collected_data/gameplay_content/collection_purposes=0
privacy/collected_data/customer_support/collected=false
privacy/collected_data/customer_support/linked_to_user=false
privacy/collected_data/customer_support/used_for_tracking=false
privacy/collected_data/customer_support/collection_purposes=0
privacy/collected_data/other_user_content/collected=false
privacy/collected_data/other_user_content/linked_to_user=false
privacy/collected_data/other_user_content/used_for_tracking=false
privacy/collected_data/other_user_content/collection_purposes=0
privacy/collected_data/browsing_history/collected=false
privacy/collected_data/browsing_history/linked_to_user=false
privacy/collected_data/browsing_history/used_for_tracking=false
privacy/collected_data/browsing_history/collection_purposes=0
privacy/collected_data/search_hhistory/collected=false
privacy/collected_data/search_hhistory/linked_to_user=false
privacy/collected_data/search_hhistory/used_for_tracking=false
privacy/collected_data/search_hhistory/collection_purposes=0
privacy/collected_data/user_id/collected=false
privacy/collected_data/user_id/linked_to_user=false
privacy/collected_data/user_id/used_for_tracking=false
privacy/collected_data/user_id/collection_purposes=0
privacy/collected_data/device_id/collected=false
privacy/collected_data/device_id/linked_to_user=false
privacy/collected_data/device_id/used_for_tracking=false
privacy/collected_data/device_id/collection_purposes=0
privacy/collected_data/purchase_history/collected=false
privacy/collected_data/purchase_history/linked_to_user=false
privacy/collected_data/purchase_history/used_for_tracking=false
privacy/collected_data/purchase_history/collection_purposes=0
privacy/collected_data/product_interaction/collected=false
privacy/collected_data/product_interaction/linked_to_user=false
privacy/collected_data/product_interaction/used_for_tracking=false
privacy/collected_data/product_interaction/collection_purposes=0
privacy/collected_data/advertising_data/collected=false
privacy/collected_data/advertising_data/linked_to_user=false
privacy/collected_data/advertising_data/used_for_tracking=false
privacy/collected_data/advertising_data/collection_purposes=0
privacy/collected_data/other_usage_data/collected=false
privacy/collected_data/other_usage_data/linked_to_user=false
privacy/collected_data/other_usage_data/used_for_tracking=false
privacy/collected_data/other_usage_data/collection_purposes=0
privacy/collected_data/crash_data/collected=false
privacy/collected_data/crash_data/linked_to_user=false
privacy/collected_data/crash_data/used_for_tracking=false
privacy/collected_data/crash_data/collection_purposes=0
privacy/collected_data/performance_data/collected=false
privacy/collected_data/performance_data/linked_to_user=false
privacy/collected_data/performance_data/used_for_tracking=false
privacy/collected_data/performance_data/collection_purposes=0
privacy/collected_data/other_diagnostic_data/collected=false
privacy/collected_data/other_diagnostic_data/linked_to_user=false
privacy/collected_data/other_diagnostic_data/used_for_tracking=false
privacy/collected_data/other_diagnostic_data/collection_purposes=0
privacy/collected_data/environment_scanning/collected=false
privacy/collected_data/environment_scanning/linked_to_user=false
privacy/collected_data/environment_scanning/used_for_tracking=false
privacy/collected_data/environment_scanning/collection_purposes=0
privacy/collected_data/hands/collected=false
privacy/collected_data/hands/linked_to_user=false
privacy/collected_data/hands/used_for_tracking=false
privacy/collected_data/hands/collection_purposes=0
privacy/collected_data/head/collected=false
privacy/collected_data/head/linked_to_user=false
privacy/collected_data/head/used_for_tracking=false
privacy/collected_data/head/collection_purposes=0
privacy/collected_data/other_data_types/collected=false
privacy/collected_data/other_data_types/linked_to_user=false
privacy/collected_data/other_data_types/used_for_tracking=false
privacy/collected_data/other_data_types/collection_purposes=0
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.3]
name="Web"
platform="Web"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
variant/thread_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/ensure_cross_origin_isolation_headers=true
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)

4
gdformatrc Normal file
View file

@ -0,0 +1,4 @@
excluded_directories: !!set
.git: null
addons: null

48
gdlintrc Normal file
View file

@ -0,0 +1,48 @@
class-definitions-order:
- tools
- classnames
- extends
- docstrings
- signals
- enums
- consts
- staticvars
- exports
- pubvars
- prvvars
- onreadypubvars
- onreadyprvvars
- others
class-load-variable-name: (([A-Z][a-z0-9]*)+|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
class-name: ([A-Z][a-z0-9]*)+
class-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
comparison-with-itself: null
constant-name: _?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*
disable: []
duplicated-load: null
enum-element-name: '[A-Z][A-Z0-9]*(_[A-Z0-9]+)*'
enum-name: ([A-Z][a-z0-9]*)+
excluded_directories: !!set
.git: null
addons: null
expression-not-assigned: null
function-argument-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
function-arguments-number: 10
function-name: (_on_([A-Z][a-z0-9]*)+(_[a-z0-9]+)*|_?[a-z][a-z0-9]*(_[a-z0-9]+)*)
function-preload-variable-name: ([A-Z][a-z0-9]*)+
function-variable-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
load-constant-name: (([A-Z][a-z0-9]*)+|_?[A-Z][A-Z0-9]*(_[A-Z0-9]+)*)
loop-variable-name: _?[a-z][a-z0-9]*(_[a-z0-9]+)*
max-file-lines: 1000
max-line-length: 80
max-public-methods: 20
max-returns: 6
mixed-tabs-and-spaces: null
no-elif-return: null
no-else-return: null
signal-name: '[a-z][a-z0-9]*(_[a-z0-9]+)*'
sub-class-name: _?([A-Z][a-z0-9]*)+
tab-characters: 1
trailing-whitespace: null
unnecessary-pass: null
unused-argument: null

30
project.godot Normal file
View file

@ -0,0 +1,30 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="TowerDefence"
run/main_scene="res://scenes/main_menu.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
config/icon="res://textures/icon.svg"
[editor_plugins]
enabled=PackedStringArray("res://addons/format_on_save/plugin.cfg")
[gui]
theme/custom="res://ui/theme.tres"
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
textures/vram_compression/import_etc2_astc=true

43
scenes/main_menu.tscn Normal file
View file

@ -0,0 +1,43 @@
[gd_scene load_steps=4 format=3 uid="uid://bqfijb7bk2g7j"]
[ext_resource type="Theme" uid="uid://bt4hxdwromnxs" path="res://ui/theme.tres" id="1_6qgep"]
[ext_resource type="Script" path="res://scripts/ui/switch_to_scene.gd" id="2_c477a"]
[ext_resource type="PackedScene" uid="uid://ctqxikky2g0nj" path="res://scenes/theme_test.tscn" id="3_j7pbg"]
[node name="Root" type="Panel"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_6qgep")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -180.5
offset_top = -44.0
offset_right = 180.5
offset_bottom = 44.0
grow_horizontal = 2
grow_vertical = 2
[node name="Text" type="RichTextLabel" parent="VBoxContainer"]
clip_contents = false
layout_mode = 2
size_flags_stretch_ratio = 7.45
theme_override_font_sizes/normal_font_size = 64
text = "Hello World"
fit_content = true
scroll_active = false
autowrap_mode = 0
[node name="Button" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = "Theme Test Scene"
script = ExtResource("2_c477a")
scene = ExtResource("3_j7pbg")

1616
scenes/theme_test.tscn Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
extends Button
@export var scene: PackedScene
func _ready() -> void:
connect("pressed", _on_Button_pressed)
func _on_Button_pressed() -> void:
if not scene:
push_error("Scene to switch to is not configured")
get_tree().change_scene_to_packed(scene)

View file

@ -0,0 +1,28 @@
extends RichTextLabel
# docs.redotengine.org/en/stable/tutorials/networking/websocket.html
@export var fallpack_websocket_url = "ws://localhost:8080/ws/server"
var websocket_url = OS.get_environment("TD_SERVER_WS")
var socket = WebSocketPeer.new()
func _ready() -> void:
if websocket_url.is_empty():
websocket_url = fallpack_websocket_url
var err = socket.connect_to_url(websocket_url)
if err != OK:
error_string(err)
set_process(false)
func _process(_delta: float) -> void:
socket.poll()
var state = socket.get_ready_state()
if state == WebSocketPeer.STATE_CLOSED:
self.text = "Disconnected"
return
if state == WebSocketPeer.STATE_OPEN:
while socket.get_available_packet_count():
self.text = "Current Unixtime: " + socket.get_packet().get_string_from_utf8()

1
textures/icon.svg Executable file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><linearGradient xlink:href="#a" id="b" x1="455.851" x2="528.307" y1="527.88" y2="598.77" gradientTransform="translate(-524.666 -618.75)scale(1.20576)" gradientUnits="userSpaceOnUse"/><linearGradient id="a"><stop offset="0" stop-color="#ff1300"/><stop offset="1" stop-color="#ff6e01"/></linearGradient></defs><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><path fill="url(#b)" d="m 49.343336,8.763033 -2.732199,8.633617 c -2.976144,1.287341 -5.95231,2.574493 -8.928084,3.862688 -3.157579,-0.665132 -6.323276,-1.435407 -9.522965,-1.821397 -0.505117,0.56853 -13.285372,20.227391 -13.281751,20.430507 0.588806,1.442081 1.600027,2.682517 2.364862,4.032006 l 46.484535,16.33115 46.484546,-16.33115 c 0.76484,-1.349489 1.77606,-2.589925 2.36487,-4.032006 0.004,-0.203116 -12.776861,-19.861977 -13.281981,-20.430507 -3.199687,0.38599 -6.365167,1.156265 -9.522745,1.821397 C 86.796635,19.971143 83.820492,18.683991 80.84434,17.39665 L 78.111931,8.763033 Z M 20.783364,49.840114 c -0.05754,-0.01861 -0.17345,0.06795 -0.177611,0.0971 C 20.045844,54.5034 18.951565,63.63878 18.951565,63.63878 l 2.832268,12.246879 21.428205,9.736905 20.515696,-7.673313 20.515496,7.673313 21.4282,-9.736905 2.83249,-12.246879 c 0,0 -1.09429,-9.13538 -1.6542,-13.701566 -0.006,-0.03887 -0.20948,-0.179799 -0.20948,-0.03741 -14.027781,4.987347 -28.660362,9.817308 -42.912506,14.73666 -14.252113,-4.919352 -28.884912,-9.749313 -42.912712,-14.736656 0,-0.03552 -0.01259,-0.05328 -0.03167,-0.05971 z m 10.070472,10.400839 20.059344,7.406892 a 10.924949,10.924949 0 0 1 -0.523072,2.12839 10.924949,10.924949 0 0 1 -14.033212,6.464433 10.924949,10.924949 0 0 1 -6.464433,-14.033213 10.924949,10.924949 0 0 1 0.961373,-1.966502 z m 65.747806,0 a 10.924949,10.924949 0 0 1 0.961367,1.966502 10.924949,10.924949 0 0 1 -6.464428,14.033213 10.924949,10.924949 0 0 1 -14.033212,-6.464433 10.924949,10.924949 0 0 1 -0.523072,-2.12839 z m -81.35682,8.265008 -5.145707,5.098969 7.708791,27.03134 24.364365,9.99397 L 40.86141,89.602306 17.755645,78.849853 Z m 96.965618,0 -2.51061,10.343892 -23.105764,10.752453 -1.31086,21.027934 24.364354,-9.99397 7.70881,-27.03134 z m -48.482706,13.92337 -18.27045,7.230976 1.109023,22.715693 17.161427,6.99175 17.161436,-6.99175 1.109023,-22.715693 z" style="font-variation-settings:normal;-inkscape-stroke:none"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

37
textures/icon.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://csnlvhau8eqvp"
path="res://.godot/imported/icon.svg-3540dd99eafb6c4e602e8c59cee418fa.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://textures/icon.svg"
dest_files=["res://.godot/imported/icon.svg-3540dd99eafb6c4e602e8c59cee418fa.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bc7dmx1v5l0x"
path="res://.godot/imported/focus_indicator.png-df7eca49e62439d12e493a185b0ef82c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://textures/icons/focus_indicator.png"
dest_files=["res://.godot/imported/focus_indicator.png-df7eca49e62439d12e493a185b0ef82c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

3
ui/panel/focus.tres Normal file
View file

@ -0,0 +1,3 @@
[gd_resource type="StyleBoxEmpty" format=3 uid="uid://b32nqsdbngkvm"]
[resource]

19
ui/panel/hover.tres Normal file
View file

@ -0,0 +1,19 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://cdxpd1sbtknsp"]
[resource]
content_margin_left = 8.0
content_margin_top = 0.0
content_margin_right = 20.0
content_margin_bottom = 2.0
bg_color = Color(0.346194, 0.629777, 0.84138, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 4
border_color = Color(0.162643, 0.387402, 0.546384, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 2.0
expand_margin_bottom = 4.0

View file

@ -0,0 +1,19 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://cbrw8qgaxtfpr"]
[resource]
content_margin_left = 8.0
content_margin_top = 2.0
content_margin_right = 20.0
content_margin_bottom = 0.0
bg_color = Color(0.113491, 0.289986, 0.415524, 1)
border_width_left = 1
border_width_top = 4
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.160784, 0.388235, 0.545098, 0)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 4.0
expand_margin_bottom = 2.0

19
ui/panel/normal.tres Normal file
View file

@ -0,0 +1,19 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://dvj7j3j2xg3af"]
[resource]
content_margin_left = 8.0
content_margin_top = 0.0
content_margin_right = 20.0
content_margin_bottom = 2.0
bg_color = Color(0.346194, 0.629777, 0.84138, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 4
border_color = Color(0.162643, 0.387402, 0.546384, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 2.0
expand_margin_bottom = 4.0

19
ui/panel/pressed.tres Normal file
View file

@ -0,0 +1,19 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bcur80wbc3i3h"]
[resource]
content_margin_left = 8.0
content_margin_top = 2.0
content_margin_right = 20.0
content_margin_bottom = 0.0
bg_color = Color(0.0626976, 0.18778, 0.276572, 1)
border_width_left = 1
border_width_top = 4
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.160784, 0.388235, 0.545098, 0)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 4.0
expand_margin_bottom = 2.0

44
ui/theme.tres Normal file
View file

@ -0,0 +1,44 @@
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://bt4hxdwromnxs"]
[ext_resource type="Texture2D" uid="uid://bc7dmx1v5l0x" path="res://textures/icons/focus_indicator.png" id="1_2gn16"]
[ext_resource type="StyleBox" uid="uid://b32nqsdbngkvm" path="res://ui/panel/focus.tres" id="2_deyos"]
[ext_resource type="StyleBox" uid="uid://cdxpd1sbtknsp" path="res://ui/panel/hover.tres" id="3_nfsuc"]
[ext_resource type="StyleBox" uid="uid://dvj7j3j2xg3af" path="res://ui/panel/normal.tres" id="4_wi0tw"]
[ext_resource type="StyleBox" uid="uid://bcur80wbc3i3h" path="res://ui/panel/pressed.tres" id="5_kgc35"]
[ext_resource type="StyleBox" uid="uid://cbrw8qgaxtfpr" path="res://ui/panel/hover_pressed.tres" id="6_vlfw3"]
[resource]
Button/colors/icon_disabled_color = Color(1, 1, 1, 0)
Button/colors/icon_focus_color = Color(1, 1, 1, 1)
Button/colors/icon_hover_color = Color(1, 1, 1, 1)
Button/colors/icon_hover_pressed_color = Color(1, 1, 1, 0)
Button/colors/icon_normal_color = Color(1, 1, 1, 0)
Button/colors/icon_pressed_color = Color(1, 1, 1, 1)
Button/constants/h_separation = 4
Button/constants/icon_max_width = 8
Button/icons/icon = ExtResource("1_2gn16")
Button/styles/focus = ExtResource("2_deyos")
Button/styles/hover = ExtResource("3_nfsuc")
Button/styles/normal = ExtResource("4_wi0tw")
Button/styles/pressed = ExtResource("5_kgc35")
CheckBox/colors/icon_hover_color = Color(1, 1, 1, 1)
CheckBox/colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
CheckBox/colors/icon_pressed_color = Color(1, 1, 1, 0)
CheckBox/styles/focus = ExtResource("2_deyos")
CheckBox/styles/hover = ExtResource("3_nfsuc")
CheckBox/styles/hover_pressed = ExtResource("6_vlfw3")
CheckBox/styles/normal = ExtResource("4_wi0tw")
CheckBox/styles/pressed = ExtResource("5_kgc35")
CheckButton/colors/icon_focus_color = Color(1, 1, 1, 1)
CheckButton/colors/icon_hover_color = Color(1, 1, 1, 1)
CheckButton/colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
CheckButton/colors/icon_normal_color = Color(0, 0, 0, 0)
CheckButton/colors/icon_pressed_color = Color(0, 0, 0, 0)
CheckButton/styles/hover = ExtResource("3_nfsuc")
CheckButton/styles/hover_pressed = ExtResource("6_vlfw3")
CheckButton/styles/pressed = ExtResource("5_kgc35")
ColorPickerButton/styles/focus = ExtResource("2_deyos")
ColorPickerButton/styles/hover = ExtResource("3_nfsuc")
ColorPickerButton/styles/hover_pressed = ExtResource("6_vlfw3")
ColorPickerButton/styles/normal = ExtResource("4_wi0tw")
ColorPickerButton/styles/pressed = ExtResource("5_kgc35")