Working on adding items and windows build
Build Godot Project (Linux & Windows) / build-linux (push) Successful in 29s
Build Godot Project (Linux & Windows) / build-windows (push) Successful in 5m27s

This commit is contained in:
2026-06-22 17:21:06 -06:00
parent 9d003b03d8
commit 8d8f8d1070
6 changed files with 355 additions and 7 deletions
+65 -2
View File
@@ -1,4 +1,4 @@
name: Build Godot Project (Linux) name: Build Godot Project (Linux & Windows)
on: [push] on: [push]
jobs: jobs:
@@ -43,7 +43,7 @@ jobs:
echo "📥 Cache Miss. Downloading Godot Engine ($VERSION_URL)..." echo "📥 Cache Miss. Downloading Godot Engine ($VERSION_URL)..."
curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_linux.x86_64.zip" -o godot.zip curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_linux.x86_64.zip" -o godot.zip
unzip godot.zip unzip godot.zip
move "Godot_v${VERSION_URL}_linux.x86_64" .godot-cache-storage/godot || mv "Godot_v${VERSION_URL}_linux.x86_64" .godot-cache-storage/godot mv "Godot_v${VERSION_URL}_linux.x86_64" .godot-cache-storage/godot
chmod +x .godot-cache-storage/godot chmod +x .godot-cache-storage/godot
echo "📥 Downloading Export Templates ($VERSION_URL)..." echo "📥 Downloading Export Templates ($VERSION_URL)..."
@@ -80,3 +80,66 @@ jobs:
with: with:
name: linux-build name: linux-build
path: build/linux/ path: build/linux/
build-windows:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Detect Godot Version
id: detect-version
run: |
VERSION_SHORT=$(grep "config/features" project.godot | sed -E 's/^[^\"]*\"([^\"]+)\".*/\1/' | xargs)
if [ -z "$VERSION_SHORT" ]; then VERSION_SHORT="4.7"; fi
echo "VERSION_SHORT=${VERSION_SHORT}" >> $GITHUB_OUTPUT
echo "VERSION_URL=${VERSION_SHORT}-stable" >> $GITHUB_OUTPUT
echo "VERSION_FILE=${VERSION_SHORT}.stable" >> $GITHUB_OUTPUT
- name: Cache Godot Engine and Windows Templates
id: godot-cache-windows
uses: actions/cache@v4
with:
path: .godot-cache-windows-storage
key: godot-${{ steps.detect-version.outputs.VERSION_FILE }}-windows-v1
- name: Download Godot Engine and Windows Templates (On Cache Miss)
if: steps.godot-cache-windows.outputs.cache-hit != 'true'
run: |
VERSION_URL="${{ steps.detect-version.outputs.VERSION_URL }}"
mkdir -p .godot-cache-windows-storage
# We still download the Linux engine binary because our runner environment is Linux
curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_linux.x86_64.zip" -o godot.zip
unzip godot.zip
mv "Godot_v${VERSION_URL}_linux.x86_64" .godot-cache-windows-storage/godot
chmod +x .godot-cache-windows-storage/godot
# Download the export templates, pulling the windows binary out of the compressed file
curl -L "https://github.com/godotengine/godot/releases/download/${VERSION_URL}/Godot_v${VERSION_URL}_export_templates.tpz" -o templates.zip
unzip templates.zip
mv templates/windows_release_x86_64.exe .godot-cache-windows-storage/windows_release_x86_64.exe
rm godot.zip templates.zip
rm -rf templates/
- name: Map Engine and Windows Templates
run: |
VERSION_FILE="${{ steps.detect-version.outputs.VERSION_FILE }}"
cp .godot-cache-windows-storage/godot ./godot
mkdir -p ~/.local/share/godot/export_templates/${VERSION_FILE}
cp .godot-cache-windows-storage/windows_release_x86_64.exe ~/.local/share/godot/export_templates/${VERSION_FILE}/windows_release_x86_64.exe
- name: Export Windows Binary
run: |
mkdir -p build/windows
# Ensure "Windows" matches the exact name of your export preset in Godot
./godot --headless --export-release "Windows" build/windows/godot_number_factory.exe
- name: Upload Windows Build Artifact
uses: actions/upload-artifact@v3
with:
name: windows-build
path: build/windows/
+7
View File
@@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://endas8uvab1e"]
[ext_resource type="Texture2D" uid="uid://j8q05ybgrs5q" path="res://assets/images/adder.png" id="1_h2g6e"]
[node name="Sprite2D" type="Sprite2D" unique_id=1222507853]
texture = ExtResource("1_h2g6e")
offset = Vector2(16, 16)
+6
View File
@@ -0,0 +1,6 @@
[gd_scene format=3 uid="uid://dptj0w0qraupg"]
[ext_resource type="Texture2D" uid="uid://bvss8ahosx14f" path="res://assets/images/delete.png" id="1_2h2ku"]
[node name="Sprite2D" type="Sprite2D" unique_id=1050071635]
texture = ExtResource("1_2h2ku")
+227 -1
View File
@@ -78,7 +78,7 @@ script_export_mode=2
custom_template/debug="" custom_template/debug=""
custom_template/release="" custom_template/release=""
debug/export_console_wrapper=1 debug/export_console_wrapper=1
binary_format/embed_pck=false binary_format/embed_pck=true
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true
texture_format/etc2_astc=false texture_format/etc2_astc=false
shader_baker/enabled=false shader_baker/enabled=false
@@ -120,3 +120,229 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'" Remove-Item -Recurse -Force '{temp_dir}'"
[preset.2]
name="Android"
platform="Android"
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
patch_delta_min_reduction=0.1
patch_delta_include_filters="*"
patch_delta_exclude_filters=""
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.2.options]
custom_template/debug=""
custom_template/release=""
gradle_build/use_gradle_build=false
gradle_build/gradle_build_directory=""
gradle_build/android_source_template=""
gradle_build/compress_native_libraries=false
gradle_build/export_format=0
gradle_build/min_sdk=""
gradle_build/target_sdk=""
gradle_build/custom_theme_attributes={}
architectures/armeabi-v7a=false
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
version/code=1
version/name=""
package/unique_name="com.example.$genname"
package/name=""
package/signed=true
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false
package/show_in_android_tv=false
package/show_in_app_library=true
package/show_as_launcher_app=false
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
launcher_icons/adaptive_monochrome_432x432=""
graphics/opengl_debug=false
shader_baker/enabled=false
xr_features/xr_mode=0
gesture/swipe_to_dismiss=false
screen/immersive_mode=true
screen/edge_to_edge=false
screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
screen/background_color=Color(0, 0, 0, 1)
splash_screen/disable_godot_boot_splash=false
splash_screen/icon=""
splash_screen/branding_image=""
splash_screen/background_color=Color(0, 0, 0, 1)
user_data_backup/allow=false
command_line/extra_args=""
permissions/custom_permissions=PackedStringArray()
permissions/access_checkin_properties=false
permissions/access_coarse_location=false
permissions/access_fine_location=false
permissions/access_location_extra_commands=false
permissions/access_media_location=false
permissions/access_mock_location=false
permissions/access_network_state=false
permissions/access_surface_flinger=false
permissions/access_wifi_state=false
permissions/account_manager=false
permissions/add_voicemail=false
permissions/authenticate_accounts=false
permissions/battery_stats=false
permissions/bind_accessibility_service=false
permissions/bind_appwidget=false
permissions/bind_device_admin=false
permissions/bind_input_method=false
permissions/bind_nfc_service=false
permissions/bind_notification_listener_service=false
permissions/bind_print_service=false
permissions/bind_remoteviews=false
permissions/bind_text_service=false
permissions/bind_vpn_service=false
permissions/bind_wallpaper=false
permissions/bluetooth=false
permissions/bluetooth_admin=false
permissions/bluetooth_privileged=false
permissions/brick=false
permissions/broadcast_package_removed=false
permissions/broadcast_sms=false
permissions/broadcast_sticky=false
permissions/broadcast_wap_push=false
permissions/call_phone=false
permissions/call_privileged=false
permissions/camera=false
permissions/capture_audio_output=false
permissions/capture_secure_video_output=false
permissions/capture_video_output=false
permissions/change_component_enabled_state=false
permissions/change_configuration=false
permissions/change_network_state=false
permissions/change_wifi_multicast_state=false
permissions/change_wifi_state=false
permissions/clear_app_cache=false
permissions/clear_app_user_data=false
permissions/control_location_updates=false
permissions/delete_cache_files=false
permissions/delete_packages=false
permissions/device_power=false
permissions/diagnostic=false
permissions/disable_keyguard=false
permissions/dump=false
permissions/expand_status_bar=false
permissions/factory_test=false
permissions/flashlight=false
permissions/force_back=false
permissions/get_accounts=false
permissions/get_package_size=false
permissions/get_tasks=false
permissions/get_top_activity_info=false
permissions/global_search=false
permissions/hardware_test=false
permissions/inject_events=false
permissions/install_location_provider=false
permissions/install_packages=false
permissions/install_shortcut=false
permissions/internal_system_window=false
permissions/internet=false
permissions/kill_background_processes=false
permissions/location_hardware=false
permissions/manage_accounts=false
permissions/manage_app_tokens=false
permissions/manage_documents=false
permissions/manage_external_storage=false
permissions/manage_media=false
permissions/master_clear=false
permissions/media_content_control=false
permissions/modify_audio_settings=false
permissions/modify_phone_state=false
permissions/mount_format_filesystems=false
permissions/mount_unmount_filesystems=false
permissions/nfc=false
permissions/persistent_activity=false
permissions/post_notifications=false
permissions/process_outgoing_calls=false
permissions/read_calendar=false
permissions/read_call_log=false
permissions/read_contacts=false
permissions/read_external_storage=false
permissions/read_frame_buffer=false
permissions/read_history_bookmarks=false
permissions/read_input_state=false
permissions/read_logs=false
permissions/read_media_audio=false
permissions/read_media_images=false
permissions/read_media_video=false
permissions/read_media_visual_user_selected=false
permissions/read_phone_state=false
permissions/read_profile=false
permissions/read_sms=false
permissions/read_social_stream=false
permissions/read_sync_settings=false
permissions/read_sync_stats=false
permissions/read_user_dictionary=false
permissions/reboot=false
permissions/receive_boot_completed=false
permissions/receive_mms=false
permissions/receive_sms=false
permissions/receive_wap_push=false
permissions/record_audio=false
permissions/reorder_tasks=false
permissions/restart_packages=false
permissions/send_respond_via_message=false
permissions/send_sms=false
permissions/set_activity_watcher=false
permissions/set_alarm=false
permissions/set_always_finish=false
permissions/set_animation_scale=false
permissions/set_debug_app=false
permissions/set_orientation=false
permissions/set_pointer_speed=false
permissions/set_preferred_applications=false
permissions/set_process_limit=false
permissions/set_time=false
permissions/set_time_zone=false
permissions/set_wallpaper=false
permissions/set_wallpaper_hints=false
permissions/signal_persistent_processes=false
permissions/status_bar=false
permissions/subscribed_feeds_read=false
permissions/subscribed_feeds_write=false
permissions/system_alert_window=false
permissions/transmit_ir=false
permissions/uninstall_shortcut=false
permissions/update_device_stats=false
permissions/use_credentials=false
permissions/use_sip=false
permissions/vibrate=false
permissions/wake_lock=false
permissions/write_apn_settings=false
permissions/write_calendar=false
permissions/write_call_log=false
permissions/write_contacts=false
permissions/write_external_storage=false
permissions/write_gservices=false
permissions/write_history_bookmarks=false
permissions/write_profile=false
permissions/write_secure_settings=false
permissions/write_settings=false
permissions/write_sms=false
permissions/write_social_stream=false
permissions/write_sync_settings=false
permissions/write_user_dictionary=false
+32
View File
@@ -6,6 +6,9 @@
[ext_resource type="PackedScene" uid="uid://bvytqfap2t478" path="res://consumer.tscn" id="3_mj2jn"] [ext_resource type="PackedScene" uid="uid://bvytqfap2t478" path="res://consumer.tscn" id="3_mj2jn"]
[ext_resource type="Script" uid="uid://iy6u4txips6p" path="res://main_game_camera.gd" id="3_v1wow"] [ext_resource type="Script" uid="uid://iy6u4txips6p" path="res://main_game_camera.gd" id="3_v1wow"]
[ext_resource type="Texture2D" uid="uid://lq8htcre3uve" path="res://assets/images/extractor.png" id="6_kdryc"] [ext_resource type="Texture2D" uid="uid://lq8htcre3uve" path="res://assets/images/extractor.png" id="6_kdryc"]
[ext_resource type="Texture2D" uid="uid://m2en3pg3og4u" path="res://assets/images/belt.png" id="7_udeyl"]
[ext_resource type="Texture2D" uid="uid://j8q05ybgrs5q" path="res://assets/images/adder.png" id="8_miq82"]
[ext_resource type="Texture2D" uid="uid://bvss8ahosx14f" path="res://assets/images/delete.png" id="9_j5hk1"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v1wow"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v1wow"]
texture = ExtResource("1_mlf6e") texture = ExtResource("1_mlf6e")
@@ -36,12 +39,41 @@ offset_right = 40.0
offset_bottom = 40.0 offset_bottom = 40.0
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control" unique_id=856029850] [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control" unique_id=856029850]
custom_minimum_size = Vector2(64, 64)
layout_mode = 0 layout_mode = 0
offset_right = 40.0 offset_right = 40.0
offset_bottom = 40.0 offset_bottom = 40.0
[node name="extractor_button" type="TextureButton" parent="CanvasLayer/Control/VBoxContainer" unique_id=438731803] [node name="extractor_button" type="TextureButton" parent="CanvasLayer/Control/VBoxContainer" unique_id=438731803]
custom_minimum_size = Vector2(64, 64)
custom_maximum_size = Vector2(64, 64)
layout_mode = 2 layout_mode = 2
texture_normal = ExtResource("6_kdryc") texture_normal = ExtResource("6_kdryc")
ignore_texture_size = true
stretch_mode = 4
[node name="belt_button" type="TextureButton" parent="CanvasLayer/Control/VBoxContainer" unique_id=468389970]
custom_minimum_size = Vector2(64, 64)
custom_maximum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("7_udeyl")
stretch_mode = 4
[node name="adder_button" type="TextureButton" parent="CanvasLayer/Control/VBoxContainer" unique_id=288888649]
custom_minimum_size = Vector2(64, 64)
custom_maximum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("8_miq82")
stretch_mode = 4
[node name="delete_button" type="TextureButton" parent="CanvasLayer/Control/VBoxContainer" unique_id=272199163]
custom_minimum_size = Vector2(64, 64)
custom_maximum_size = Vector2(64, 64)
layout_mode = 2
texture_normal = ExtResource("9_j5hk1")
stretch_mode = 4
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/extractor_button" to="." method="_on_extractor_button_pressed"] [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/extractor_button" to="." method="_on_extractor_button_pressed"]
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/belt_button" to="." method="_on_belt_button_pressed"]
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/adder_button" to="." method="_on_adder_button_pressed"]
[connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/delete_button" to="." method="_on_delete_button_pressed"]
+18 -4
View File
@@ -9,8 +9,10 @@ extends Node2D
# preload scenes that we can place: # preload scenes that we can place:
const EXTRACTOR_SCENE = preload("res://extractor.tscn") const EXTRACTOR_SCENE = preload("res://extractor.tscn")
const BELT_SCENE = preload("res://belt.tscn") const BELT_SCENE = preload("res://belt.tscn")
const ADDER_SCENE = preload("res://adder.tscn")
const DELETE_SCENE = preload("res://delete.tscn")
enum Mode { NONE, PLACE_EXTRACTOR, PLACE_BELT, DELETE } enum Mode { NONE, PLACE_EXTRACTOR, PLACE_BELT, PLACE_ADDER, DELETE }
var current_mode = Mode.NONE var current_mode = Mode.NONE
var preview_item: Node2D = null # Holds the visual for the mouse var preview_item: Node2D = null # Holds the visual for the mouse
@@ -42,7 +44,7 @@ func _process(_delta: float) -> void:
generate_and_render_around_camera() generate_and_render_around_camera()
# Update the preview item's position and snap to the grid # Update the preview item's position and snap to the grid
if preview_item and (current_mode != Mode.NONE and current_mode != Mode.DELETE): if preview_item and current_mode != Mode.NONE:
var grid_pos = get_grid_snapped_mouse_position() var grid_pos = get_grid_snapped_mouse_position()
preview_item.global_position = tile_layer.map_to_local(grid_pos) preview_item.global_position = tile_layer.map_to_local(grid_pos)
# var scaled_pos = (get_grid_snapped_mouse_position() * 32) # var scaled_pos = (get_grid_snapped_mouse_position() * 32)
@@ -68,7 +70,7 @@ func _input(event):
# Returns the grid position of the mouse # Returns the grid position of the mouse
func get_grid_snapped_mouse_position() -> Vector2i: func get_grid_snapped_mouse_position() -> Vector2:
return tile_layer.local_to_map(get_global_mouse_position()) return tile_layer.local_to_map(get_global_mouse_position())
@@ -207,7 +209,8 @@ func place_item(item: PackedScene):
"type": new_item.name, "type": new_item.name,
}) })
func delete_item(target_pos: Vector2i): func delete_item(target_pos: Vector2):
print("deleting item")
var targets = get_tree().get_nodes_in_group("Placed_objects") var targets = get_tree().get_nodes_in_group("Placed_objects")
for item in targets: for item in targets:
if item.global_position == target_pos: if item.global_position == target_pos:
@@ -236,3 +239,14 @@ func _on_extractor_button_pressed():
## clear_preview() ## clear_preview()
## current_mode = Mode.DELETE ## current_mode = Mode.DELETE
## ##
func _on_belt_button_pressed() -> void:
set_preview_mode(Mode.PLACE_BELT, BELT_SCENE)
func _on_adder_button_pressed() -> void:
set_preview_mode(Mode.PLACE_ADDER, ADDER_SCENE)
func _on_delete_button_pressed() -> void:
set_preview_mode(Mode.DELETE, DELETE_SCENE)