feat: Add Tekton character model, implement in-game message bar, global match timer UI, and camera context manager.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://utm8oftmv8j5"
|
||||
path="res://.godot/imported/Eyes_tex.png-aabac09a0fb924ac14c06a6be2f4f05e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/Eyes_tex.png"
|
||||
dest_files=["res://.godot/imported/Eyes_tex.png-aabac09a0fb924ac14c06a6be2f4f05e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://c13jhsv1joff3"
|
||||
path="res://.godot/imported/tekton.glb-cf03c9120f9a286ceda76a1bd03efb7b.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/tekton.glb"
|
||||
dest_files=["res://.godot/imported/tekton.glb-cf03c9120f9a286ceda76a1bd03efb7b.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d123exll0rjb4"
|
||||
path.s3tc="res://.godot/imported/tekton_Eyes_tex.png-a762feb64225d79df9b056b17747e69e.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "c13f2be99209c1297644bd6d4c5cae6f"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/tekton_Eyes_tex.png"
|
||||
dest_files=["res://.godot/imported/tekton_Eyes_tex.png-a762feb64225d79df9b056b17747e69e.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://crja1dx3kxq8i"
|
||||
path.s3tc="res://.godot/imported/tekton_GOGGLE 2 UV Tex2.png-a74d54bd4f016375b43ce3654c0a051d.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "54c5e1acb27020ed20da0689345f47ec"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/tekton_GOGGLE 2 UV Tex2.png"
|
||||
dest_files=["res://.godot/imported/tekton_GOGGLE 2 UV Tex2.png-a74d54bd4f016375b43ce3654c0a051d.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 557 KiB |
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://jm6bbn8u07t0"
|
||||
path.s3tc="res://.godot/imported/tekton_WhiteFluffyTowel_normal.jpg-12e4f4b3bed0064676af8a3656ba72eb.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "286009441fbbc5f913f0d3b39741d839"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/tekton_WhiteFluffyTowel_normal.jpg"
|
||||
dest_files=["res://.godot/imported/tekton_WhiteFluffyTowel_normal.jpg-12e4f4b3bed0064676af8a3656ba72eb.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=1
|
||||
roughness/src_normal="res://assets/models/meshes/tekton/tekton_WhiteFluffyTowel_normal.jpg"
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 945 KiB |
@@ -0,0 +1,44 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://y6x8hr8lvthp"
|
||||
path.s3tc="res://.godot/imported/tekton_WhiteFluffyTowel_roughness.png-ed0b88b8cc824543b2ad818afe55c13f.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "3650b521fc7995add9cc4eb21b0b803a"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/meshes/tekton/tekton_WhiteFluffyTowel_roughness.png"
|
||||
dest_files=["res://.godot/imported/tekton_WhiteFluffyTowel_roughness.png-ed0b88b8cc824543b2ad818afe55c13f.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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=0
|
||||
@@ -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
@@ -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
|
||||
|
||||
+32
-18
@@ -150,12 +150,16 @@ var is_recovering: bool = false # True when shrunk/waiting
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
"""Called when Tekton lands after being thrown or knocked."""
|
||||
# Prevent double-triggering (re-entrancy)
|
||||
if is_recovering:
|
||||
return
|
||||
|
||||
is_recovering = true
|
||||
|
||||
print("[Tekton] Landed/Knocked! Shrinking and waiting... (Intensity: %.1f)" % intensity)
|
||||
|
||||
_flash_damage() # Add visual flash too? Why not.
|
||||
|
||||
is_recovering = true
|
||||
|
||||
# Disable movement/interaction logic temporarily
|
||||
var controller = get_node_or_null("TektonController")
|
||||
if controller and controller.get("timer"):
|
||||
@@ -176,6 +180,13 @@ func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
var t = create_tween()
|
||||
t.tween_property(mesh, "scale", base_scale * 0.5, 0.2).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
|
||||
|
||||
# Spawn tiles (as requested "tekton will spawn a tiles around that floor also")
|
||||
if is_multiplayer_authority():
|
||||
spawn_tiles_around(int(8 * intensity))
|
||||
|
||||
# Floor Freeze (Visual/Instant - Run on all clients locally)
|
||||
temporarily_change_floor(current_position, 1, 6, 3.0)
|
||||
|
||||
# Wait 3 seconds
|
||||
await get_tree().create_timer(3.0).timeout
|
||||
|
||||
@@ -193,18 +204,8 @@ func on_thrown_landing(attacker: Node = null, intensity: float = 1.0):
|
||||
if controller and controller.has_method("_start_timer"):
|
||||
if is_multiplayer_authority() and not is_carried:
|
||||
controller._start_timer()
|
||||
|
||||
# Spawn tiles (as requested "tekton will spawn a tiles around that floor also")
|
||||
if is_multiplayer_authority():
|
||||
spawn_tiles_around(int(8 * intensity))
|
||||
|
||||
|
||||
# Floor Freeze (Visual/Instant - Run on all clients locally)
|
||||
temporarily_change_floor(current_position, 1, 6, 3.0)
|
||||
|
||||
# Stun nearby players handled by Thrower (Player.gd) or here?
|
||||
# Player.gd handles the stun call because it knows the impact zone context better?
|
||||
# Actually, Player.gd calls this function. Player.gd *also* iterates players to stun them.
|
||||
# That is fine.
|
||||
|
||||
func temporarily_change_floor(center: Vector2i, radius: int, new_id: int, duration: float):
|
||||
if not enhanced_gridmap: return
|
||||
@@ -221,13 +222,21 @@ func temporarily_change_floor(center: Vector2i, radius: int, new_id: int, durati
|
||||
|
||||
# Only change if not already the new ID (avoid redundant updates or overriding existing freeze)
|
||||
if original != new_id:
|
||||
# PRE-FIX: If we capture a "Hole" (Void or Pickup 7-14) here, we must record it as Floor (0)
|
||||
# so that we restore a valid floor later.
|
||||
if original == -1 or (original >= 7 and original <= 14):
|
||||
print("[Tekton] Warning: Captured floor at %s was ID %d (Invalid/Pickup). Recording as FLOOR (0)." % [pos, original])
|
||||
original = 0
|
||||
|
||||
changed_cells[pos] = original
|
||||
# Set locally immediately
|
||||
enhanced_gridmap.set_cell_item(cell_3d, new_id)
|
||||
print("[Tekton] Applying Floor ID %d at %s (Replacing ID %d)" % [new_id, pos, original])
|
||||
|
||||
await get_tree().create_timer(duration).timeout
|
||||
|
||||
# Restore locally
|
||||
var restored_count = 0
|
||||
for pos in changed_cells:
|
||||
var original = changed_cells[pos]
|
||||
var current_cell = Vector3i(pos.x, 0, pos.y)
|
||||
@@ -235,12 +244,17 @@ func temporarily_change_floor(center: Vector2i, radius: int, new_id: int, durati
|
||||
|
||||
# Only restore if it hasn't been changed to something else in meantime
|
||||
if current == new_id:
|
||||
# Fallback: Fix "Hole" bugs where original was Void (-1) or a Pickup (7-14)
|
||||
# Pickups (7-14) on Floor Layer (0) cause holes because they lack floor geometry.
|
||||
# If we find a pickup here, we MUST restore to Floor (0) instead of the Pickup.
|
||||
if original == -1 or (original >= 7 and original <= 14):
|
||||
print("[Tekton] Warning: Restoring floor at %s was ID %d (Invalid/Pickup). Forcing to FLOOR (0)." % [pos, original])
|
||||
original = 0
|
||||
|
||||
enhanced_gridmap.set_cell_item(current_cell, original)
|
||||
|
||||
# Stun nearby players handled by Thrower (Player.gd) or here?
|
||||
# Player.gd handles the stun call because it knows the impact zone context better?
|
||||
# Actually, Player.gd calls this function. Player.gd *also* iterates players to stun them.
|
||||
# That is fine.
|
||||
restored_count += 1
|
||||
|
||||
print("[Tekton] Restored %d/%d frozen floors at %s" % [restored_count, changed_cells.size(), center])
|
||||
|
||||
func spawn_tiles_around(count: int = 4):
|
||||
"""Spawns a mix of normal and special tiles in a radius."""
|
||||
|
||||
Reference in New Issue
Block a user