feat: cleanup mess

This commit is contained in:
2026-07-01 15:07:00 +08:00
parent 594a0ce84d
commit b4ce7453c3
7 changed files with 0 additions and 185 deletions
-6
View File
@@ -1,6 +0,0 @@
@rpc("any_peer", "call_local")
func remove_slow_effect():
slow_timer = 0.0
self.is_slowed = false
if movement_manager:
movement_manager.set_speed_multiplier(1.0)
-6
View File
@@ -1,6 +0,0 @@
@rpc("authority", "call_local", "reliable")
func sync_clear_sticky_cell(pos: Vector2i) -> void:
sticky_cells.erase(pos)
mark_cleansed(pos)
if gridmap:
gridmap.set_cell_item(Vector3i(pos.x, 2, pos.y), -1)
-68
View File
@@ -1,68 +0,0 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="1_font"]
[node name="GauntletHUD" type="CanvasLayer"]
layer = 5
visible = false
[node name="TopContainer" type="CenterContainer" parent="."]
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_top = 70.0
grow_horizontal = 2
[node name="SlowMoLabel" type="Label" parent="TopContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 18
theme_override_colors/font_color = Color(0.3, 0.5, 1.0, 1)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 4
theme_override_fonts/font = ExtResource("1_font")
text = "SLOW-MO"
horizontal_alignment = 1
visible = false
[node name="BottomContainer" type="CenterContainer" parent="."]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_top = -120.0
grow_horizontal = 2
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="BottomContainer"]
layout_mode = 2
theme_override_constants/separation = 4
[node name="PhaseLabel" type="Label" parent="BottomContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
theme_override_colors/font_color = Color(1, 0.6, 0.8, 1)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 6
theme_override_fonts/font = ExtResource("1_font")
text = "🍬 OPEN ARENA"
horizontal_alignment = 1
[node name="CleanserHBox" type="HBoxContainer" parent="BottomContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 6
alignment = 1
[node name="CleanserIcon" type="TextureRect" parent="BottomContainer/VBoxContainer/CleanserHBox"]
layout_mode = 2
custom_minimum_size = Vector2(20, 20)
stretch_mode = 5
[node name="CleanserLabel" type="Label" parent="BottomContainer/VBoxContainer/CleanserHBox"]
layout_mode = 2
theme_override_font_sizes/font_size = 20
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 6
theme_override_fonts/font = ExtResource("1_font")
text = "[E] Cleanser (0)"
horizontal_alignment = 1
-48
View File
@@ -1,48 +0,0 @@
func _spawn_cleanser_particles(pos: Vector2i) -> void:
"""Spawn bright cleansing particles when sticky is cleared."""
if not main_scene or not gridmap:
return
var world_pos = Vector3(
pos.x * gridmap.cell_size.x + gridmap.cell_size.x / 2.0,
0.5,
pos.y * gridmap.cell_size.z + gridmap.cell_size.z / 2.0
)
var particles = GPUParticles3D.new()
particles.emitting = true
particles.one_shot = true
particles.amount = 12
particles.lifetime = 0.6
particles.explosiveness = 0.9
var material = ParticleProcessMaterial.new()
material.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_SPHERE
material.emission_sphere_radius = 0.3
material.direction = Vector3(0, 1, 0)
material.spread = 180.0
material.initial_velocity_min = 3.0
material.initial_velocity_max = 5.0
material.gravity = Vector3(0, -5.0, 0)
material.scale_min = 0.05
material.scale_max = 0.15
var mesh = SphereMesh.new()
mesh.radius = 0.2
mesh.height = 0.4
var spatial_mat = StandardMaterial3D.new()
spatial_mat.albedo_color = Color(0.2, 1.0, 1.0) # Cyan/Blue for cleanser
spatial_mat.emission_enabled = true
spatial_mat.emission = Color(0.2, 1.0, 1.0)
spatial_mat.emission_energy_multiplier = 3.0
mesh.material = spatial_mat
particles.draw_pass_1 = mesh
particles.process_material = material
particles.position = world_pos
main_scene.add_child(particles)
await get_tree().create_timer(1.2).timeout
if particles and is_instance_valid(particles):
particles.queue_free()
-24
View File
@@ -1,24 +0,0 @@
func _find_valid_drop_position() -> Vector2i:
# Try random adjacent cells
var neighbors = enhanced_gridmap.get_neighbors(current_position, 0)
neighbors.shuffle()
for neighbor in neighbors:
var pos = neighbor.position
# Check item layer
var item_cell = Vector3i(pos.x, 1, pos.y)
if enhanced_gridmap.get_cell_item(item_cell) == -1:
if not is_position_occupied(pos):
# Gauntlet Mode explicit overrides
var gm = null
var main_gauntlet = get_tree().root.get_node_or_null("Main")
if main_gauntlet and main_gauntlet.get("gauntlet_manager"):
gm = main_gauntlet.gauntlet_manager
if gm and gm.is_active:
if pos.x == 0 or pos.x == gm.ARENA_COLUMNS - 1 or pos.y == 0 or pos.y == gm.ARENA_ROWS - 1:
continue
if gm._is_npc_zone(pos):
continue
return pos
return Vector2i(-1, -1)
-8
View File
@@ -1,8 +0,0 @@
@rpc("any_peer", "call_local")
func remove_slow_effect():
slow_timer = 0.0
self.is_slowed = false
if movement_manager:
# INSTANT response: restore speed multiplier to 1.0 immediately
movement_manager.set_speed_multiplier(1.0)
print("Player %s slow effect removed early" % name)
-25
View File
@@ -1,25 +0,0 @@
/func _find_valid_drop_position/,/return Vector2i(-1, -1)/c\
func _find_valid_drop_position() -> Vector2i:\
# Try random adjacent cells\
var neighbors = enhanced_gridmap.get_neighbors(current_position, 0)\
neighbors.shuffle()\
\
for neighbor in neighbors:\
var pos = neighbor.position\
# Check item layer\
var item_cell = Vector3i(pos.x, 1, pos.y)\
if enhanced_gridmap.get_cell_item(item_cell) == -1:\
if not is_position_occupied(pos):\
# Gauntlet Mode explicit overrides\
var gm = null\
var main_gauntlet = get_tree().root.get_node_or_null("Main")\
if main_gauntlet and main_gauntlet.get("gauntlet_manager"):\
gm = main_gauntlet.gauntlet_manager\
if gm and gm.is_active:\
if pos.x == 0 or pos.x == gm.ARENA_COLUMNS - 1 or pos.y == 0 or pos.y == gm.ARENA_ROWS - 1:\
continue\
if gm._is_npc_zone(pos):\
continue\
return pos\
\
return Vector2i(-1, -1)