fix: downgrade workflow godot version to 4.6.3 to match system, fix godot compilation errors

This commit is contained in:
2026-07-06 12:09:23 +08:00
parent 9747f91b20
commit 5c789cb37f
8 changed files with 368 additions and 354 deletions
+11 -11
View File
@@ -27,22 +27,22 @@ jobs:
- name: Setup Godot (Cached) - name: Setup Godot (Cached)
run: | run: |
apt-get update -qq && apt-get install -y -qq unzip curl apt-get update -qq && apt-get install -y -qq unzip curl
if [ ! -f /cache/godot_4.7 ]; then if [ ! -f /cache/godot_4.6.3 ]; then
echo "Downloading Godot 4.7..." echo "Downloading Godot 4.6.3..."
curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_linux.x86_64.zip" curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_linux.x86_64.zip"
unzip -q -o /tmp/godot.zip -d /cache/ unzip -q -o /tmp/godot.zip -d /cache/
mv /cache/Godot_v4.7-stable_linux.x86_64 /cache/godot_4.7 mv /cache/Godot_v4.6.3-stable_linux.x86_64 /cache/godot_4.6.3
fi fi
cp /cache/godot_4.7 /usr/local/bin/godot cp /cache/godot_4.6.3 /usr/local/bin/godot
chmod +x /usr/local/bin/godot chmod +x /usr/local/bin/godot
mkdir -p ~/.local/share/godot/export_templates/4.7.stable mkdir -p ~/.local/share/godot/export_templates/4.6.3.stable
if [ ! -f /cache/Godot_v4.7-stable_export_templates.tpz ]; then if [ ! -f /cache/Godot_v4.6.3-stable_export_templates.tpz ]; then
echo "Downloading templates..." echo "Downloading templates..."
curl -sL -o /cache/Godot_v4.7-stable_export_templates.tpz \ curl -sL -o /cache/Godot_v4.6.3-stable_export_templates.tpz \
"https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_export_templates.tpz" "https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_export_templates.tpz"
fi fi
cd ~/.local/share/godot/export_templates/4.7.stable cd ~/.local/share/godot/export_templates/4.6.3.stable
unzip -q -o /cache/Godot_v4.7-stable_export_templates.tpz unzip -q -o /cache/Godot_v4.6.3-stable_export_templates.tpz
mv templates/* . mv templates/* .
rm -rf templates rm -rf templates
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
+5 -5
View File
@@ -28,14 +28,14 @@ jobs:
- name: Setup Godot (Cached) - name: Setup Godot (Cached)
run: | run: |
if [ ! -f /cache/godot_4.7 ]; then if [ ! -f /cache/godot_4.6.3 ]; then
echo "Downloading Godot 4.7..." echo "Downloading Godot 4.6.3..."
apt-get update -qq && apt-get install -y -qq unzip curl apt-get update -qq && apt-get install -y -qq unzip curl
curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.7-stable/Godot_v4.7-stable_linux.x86_64.zip" curl -sL -o /tmp/godot.zip "https://github.com/godotengine/godot-builds/releases/download/4.6.3-stable/Godot_v4.6.3-stable_linux.x86_64.zip"
unzip -q -o /tmp/godot.zip -d /cache/ unzip -q -o /tmp/godot.zip -d /cache/
mv /cache/Godot_v4.7-stable_linux.x86_64 /cache/godot_4.7 mv /cache/Godot_v4.6.3-stable_linux.x86_64 /cache/godot_4.6.3
fi fi
cp /cache/godot_4.7 /usr/local/bin/godot cp /cache/godot_4.6.3 /usr/local/bin/godot
chmod +x /usr/local/bin/godot chmod +x /usr/local/bin/godot
mkdir -p build mkdir -p build
+1 -1
View File
@@ -17,7 +17,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
config/name="Tekton Dash Armageddon" config/name="Tekton Dash Armageddon"
config/version="2.4.3" config/version="2.4.3"
run/main_scene="res://scenes/ui/boot_screen.tscn" run/main_scene="res://scenes/ui/boot_screen.tscn"
config/features=PackedStringArray("4.7", "Forward Plus") config/features=PackedStringArray("4.6", "Forward Plus")
boot_splash/bg_color=Color(0.16470589, 0.6745098, 0.9372549, 1) boot_splash/bg_color=Color(0.16470589, 0.6745098, 0.9372549, 1)
boot_splash/stretch_mode=0 boot_splash/stretch_mode=0
boot_splash/image="uid://b10e6kr508642" boot_splash/image="uid://b10e6kr508642"
+2 -1
View File
@@ -204,7 +204,8 @@ func _setup_effect_elevation():
print("[Main] MeshLibrary elevation applied: Wall(4) and Freeze(5) at Y=0.8") print("[Main] MeshLibrary elevation applied: Wall(4) and Freeze(5) at Y=0.8")
# Force gridmap cell size to match player logic (1, 0.05, 1) - >0.001 to avoid errors # Force gridmap cell size to match player logic (1, 0.05, 1) - >0.001 to avoid errors
var em = $EnhancedGridMap if not em:
em = get_node_or_null("EnhancedGridMap")
if em: if em:
em.cell_size = Vector3(1, 0.05, 1) em.cell_size = Vector3(1, 0.05, 1)
+14 -4
View File
@@ -218,15 +218,25 @@ func _run_ai_tick():
# Priority 0.7: Candy Survival — Deliver candies to Mekton NPC # Priority 0.7: Candy Survival — Deliver candies to Mekton NPC
if strategic_planner and strategic_planner.is_candy_survival_mode(): if strategic_planner and strategic_planner.is_candy_survival_mode():
var gm = strategic_planner._get_candy_survival_manager() var gm = strategic_planner._get_candy_survival_manager()
if gm and gm.is_active: if gm and gm.active:
var pid = actor.get("peer_id") if "peer_id" in actor else actor.name.to_int() var pid = actor.get("peer_id") if "peer_id" in actor else actor.name.to_int()
var held_color = gm.player_candy_color.get(pid, -1) var held_color = gm.player_candy_color.get(pid, -1)
if held_color != -1 and gm.player_candies.get(pid, 0) > 0: if held_color != -1 and gm.player_candies.get(pid, 0) > 0:
if held_color == gm.current_face: if held_color == gm.current_face:
# Face matches! Run to the NPC Center! # Face matches! Run to the NPC Center!
var path = strategic_planner.find_path(actor.current_position, Vector2i(8, 8)) var path = enhanced_gridmap.find_path(
if path.size() > 0: Vector2(actor.current_position),
_execute_move(path[0]) Vector2(8, 8),
0, false, false
)
if path.size() >= 2:
var next_step = Vector2i(path[1].x, path[1].y)
if actor.movement_manager.simple_move_to(next_step):
_is_processing_action = true
_current_action = "delivering_candies"
while is_instance_valid(actor) and actor.is_player_moving:
await get_tree().process_frame
_is_processing_action = false
print("[BotController] Action Taken: Delivering candies to Mekton!") print("[BotController] Action Taken: Delivering candies to Mekton!")
return return
+11 -8
View File
@@ -79,10 +79,6 @@ func _setup_hud() -> void:
if hud_rush_bar: if hud_rush_bar:
hud_rush_label = hud_rush_bar.get_node_or_null("SugarRushLabel") hud_rush_label = hud_rush_bar.get_node_or_null("SugarRushLabel")
func start_game_mode() -> void:
if multiplayer.is_server():
activate_client_side()
func activate_client_side() -> void: func activate_client_side() -> void:
active = true active = true
if hud_layer: if hud_layer:
@@ -129,6 +125,8 @@ func _define_sticky_walls() -> void:
sticky_cells[Vector2i(NPC_CENTER.x + dx, NPC_CENTER.y + dy)] = true sticky_cells[Vector2i(NPC_CENTER.x + dx, NPC_CENTER.y + dy)] = true
func start_game_mode() -> void: func start_game_mode() -> void:
if multiplayer.is_server():
activate_client_side()
active = true active = true
current_face = CandyColor.HEART current_face = CandyColor.HEART
face_timer = 0.0 face_timer = 0.0
@@ -391,9 +389,9 @@ func is_ghost_active(pid: int) -> bool:
func _setup_arena() -> void: func _setup_arena() -> void:
if not gridmap: if not gridmap:
return return
gridmap.clear_layer(0) gridmap.set("columns", ARENA_COLS)
gridmap.clear_layer(1) gridmap.set("rows", ARENA_ROWS)
gridmap.clear_layer(2) gridmap.clear()
# Build floor # Build floor
for x in range(ARENA_COLS): for x in range(ARENA_COLS):
@@ -490,6 +488,8 @@ func get_score(pid: int) -> int:
@rpc("authority", "call_remote", "unreliable") @rpc("authority", "call_remote", "unreliable")
func sync_candy_badge(pid: int, count: int, mult: float, face_match: bool) -> void: func sync_candy_badge(pid: int, count: int, mult: float, face_match: bool) -> void:
if not active:
activate_client_side()
if pid == multiplayer.get_unique_id(): if pid == multiplayer.get_unique_id():
if hud_stack_badge: if hud_stack_badge:
hud_stack_badge.text = "Stack: %d (x%.1f)" % [count, mult] hud_stack_badge.text = "Stack: %d (x%.1f)" % [count, mult]
@@ -506,6 +506,8 @@ func sync_candy_badge(pid: int, count: int, mult: float, face_match: bool) -> vo
@rpc("authority", "call_remote", "unreliable") @rpc("authority", "call_remote", "unreliable")
func sync_knock_result(attacker: int, target: int, candies: int) -> void: func sync_knock_result(attacker: int, target: int, candies: int) -> void:
if not active:
activate_client_side()
var local = multiplayer.get_unique_id() var local = multiplayer.get_unique_id()
if attacker == local or target == local: if attacker == local or target == local:
if hud_knock_label and player_knocks.has(local): if hud_knock_label and player_knocks.has(local):
@@ -513,7 +515,8 @@ func sync_knock_result(attacker: int, target: int, candies: int) -> void:
@rpc("authority", "call_remote", "unreliable") @rpc("authority", "call_remote", "unreliable")
func sync_ghost_active(pid: int, active_on: bool) -> void: func sync_ghost_active(pid: int, active_on: bool) -> void:
if not active:
activate_client_side()
if pid == multiplayer.get_unique_id(): if pid == multiplayer.get_unique_id():
if hud_ghost_label and player_ghosts.has(pid): if hud_ghost_label and player_ghosts.has(pid):
hud_ghost_label.text = "👻 Ghosts: %d" % player_ghosts[pid] hud_ghost_label.text = "👻 Ghosts: %d" % player_ghosts[pid]
+1 -1
View File
@@ -122,7 +122,7 @@ func simple_move_to(grid_position: Vector2i) -> bool:
return false return false
# Candy Survival explicit wall overrides (since we visually removed the wall blocks) # Candy Survival explicit wall overrides (since we visually removed the wall blocks)
if gm and gm.is_active: if gm and gm.active:
if gm._is_npc_zone(grid_position): if gm._is_npc_zone(grid_position):
print("[Move] Failed: Blocked by Candy Survival NPC center at %s" % grid_position) print("[Move] Failed: Blocked by Candy Survival NPC center at %s" % grid_position)
return false return false