feat: Add Tekton character model, implement in-game message bar, global match timer UI, and camera context manager.

This commit is contained in:
Yogi Wiguna
2026-02-12 14:56:57 +08:00
parent 5275c4acd8
commit a05e3123b4
15 changed files with 324 additions and 30 deletions
+33
View File
@@ -1577,6 +1577,39 @@ func _get_ordinal(n: int) -> String:
func _input(event):
if event.is_action_pressed("ui_cancel"):
_toggle_pause_menu()
# DEBUG: check all floors
if event is InputEventKey and event.pressed and event.keycode == KEY_F9:
check_all_floors()
func check_all_floors():
print("--- CHECKING ALL FLOORS (Debug F9) ---")
var enhanced_gridmap = get_node_or_null("EnhancedGridMap")
if not enhanced_gridmap:
print("Error: EnhancedGridMap not found.")
return
var missing_count = 0
var total_checked = 0
# Assuming standard 14x14 board (0-13)
for x in range(14):
for y in range(14):
total_checked += 1
var cell_3d = Vector3i(x, 0, y)
var item = enhanced_gridmap.get_cell_item(cell_3d)
if item == -1:
print("MISSING FLOOR at [%d, %d]! (Item: -1)" % [x, y])
missing_count += 1
# Optional: Auto-fix?
# enhanced_gridmap.set_cell_item(cell_3d, 1)
elif item == 6:
print("ICE/CRACK FLOOR at [%d, %d] (Item: 6)" % [x, y])
print("--- CHECK COMPLETE: Found %d missing floors out of %d checked. ---" % [missing_count, total_checked])
var msg_type = NotificationManager.MessageType.WARNING if missing_count > 0 else NotificationManager.MessageType.NORMAL
NotificationManager.send_message(GameStateManager.local_player_character, "Checked Floors: %d Missing" % missing_count, msg_type)
func _toggle_pause_menu():
var pause_menu = get_node_or_null("PauseMenu")
+1 -12
View File
@@ -785,7 +785,7 @@ func drop_random_item():
rpc("sync_playerboard", playerboard)
# Sync grid item
var cell = Vector3i(drop_pos.x, 0, drop_pos.y)
var cell = Vector3i(drop_pos.x, 1, drop_pos.y)
rpc("sync_grid_item", cell.x, cell.y, cell.z, item_id)
NotificationManager.send_message(self , NotificationManager.MESSAGES.DROPPED_ITEM, NotificationManager.MessageType.WARNING)
@@ -1891,13 +1891,6 @@ func sync_throw_tekton(target_pos: Vector2i):
var tween = create_tween()
tween.set_parallel(true)
# We can use a curve or just simple jump logic.
# For a nice arc in 3D: Tween X/Z linearly, Tween Y with ease out/in (bounce-like)?
# Or use a method that interpolates a curve.
# Simple approach: Tween 'position' effectively? No, linear pos is straight line.
# Let's use a value tween and update position manually, or just use a parabolic path helper?
# Easiest readable way: likely just tweening horizontal and vertical separately if we could.
# Let's stick to a simple "Jump" tween:
# 1. Move X/Z linearly to target
tween.tween_property(tekton, "global_position:x", end_world_pos.x, 0.6).set_trans(Tween.TRANS_LINEAR)
@@ -1933,10 +1926,6 @@ func sync_throw_tekton(target_pos: Vector2i):
if p.has_method("apply_stagger"):
print("[Throw] Applying stagger to %s" % p.name)
p.apply_stagger(3.0)
# Apply floor freeze around the stunned player (Radius 0 or 1? "change to 6" implies under them)
if tekton.has_method("temporarily_change_floor"):
tekton.temporarily_change_floor(Vector2i(p.current_position.x, p.current_position.y), 1, 6, 3.0)
NotificationManager.send_message(self , "Stunned " + p.name + "!", NotificationManager.MessageType.WARNING)
# 2. Tekton drops tiles (Spawn tiles around) AND shrinks