feat: Introduce SpecialTilesManager to manage special tile effects, including powerup inventory, leveling, cooldowns, and targeted abilities.
This commit is contained in:
@@ -0,0 +1,71 @@
|
|||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=true
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="../Tekton Armageddon Export/tekton_armageddon.exe"
|
||||||
|
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.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=true
|
||||||
|
texture_format/s3tc_bptc=true
|
||||||
|
texture_format/etc2_astc=false
|
||||||
|
shader_baker/enabled=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
codesign/enable=false
|
||||||
|
codesign/timestamp=true
|
||||||
|
codesign/timestamp_server_url=""
|
||||||
|
codesign/digest_algorithm=1
|
||||||
|
codesign/description=""
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
application/modify_resources=true
|
||||||
|
application/icon=""
|
||||||
|
application/console_wrapper_icon=""
|
||||||
|
application/icon_interpolation=4
|
||||||
|
application/file_version=""
|
||||||
|
application/product_version=""
|
||||||
|
application/company_name="DanchieGo"
|
||||||
|
application/product_name="Tekton Armageddon"
|
||||||
|
application/file_description=""
|
||||||
|
application/copyright=""
|
||||||
|
application/trademarks=""
|
||||||
|
application/export_angle=0
|
||||||
|
application/export_d3d12=0
|
||||||
|
application/d3d12_agility_sdk_multiarch=true
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||||
|
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||||
|
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
|
||||||
|
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||||
|
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||||
|
Start-ScheduledTask -TaskName godot_remote_debug
|
||||||
|
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -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
|
||||||
|
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||||
@@ -9756,6 +9756,7 @@ flat = true
|
|||||||
expand_icon = true
|
expand_icon = true
|
||||||
|
|
||||||
[node name="PutBtn" type="Button" parent="TouchControls/TouchControls" unique_id=1027790362]
|
[node name="PutBtn" type="Button" parent="TouchControls/TouchControls" unique_id=1027790362]
|
||||||
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 3
|
anchors_preset = 3
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
|
|||||||
@@ -98,10 +98,12 @@ func handle_unhandled_input(event):
|
|||||||
player.activate_powerup(1) # AREA_FREEZE
|
player.activate_powerup(1) # AREA_FREEZE
|
||||||
KEY_KP_4, KEY_4:
|
KEY_KP_4, KEY_4:
|
||||||
player.activate_powerup(3) # INVISIBLE_MODE
|
player.activate_powerup(3) # INVISIBLE_MODE
|
||||||
KEY_C:
|
# KEY_R:
|
||||||
|
# player.auto_put_item()
|
||||||
|
KEY_Q:
|
||||||
if player.powerup_manager:
|
if player.powerup_manager:
|
||||||
player.powerup_manager.use_special_effect()
|
player.powerup_manager.use_special_effect()
|
||||||
KEY_V:
|
KEY_E: # Swapped to E per request
|
||||||
if player.powerup_manager:
|
if player.powerup_manager:
|
||||||
if player.powerup_manager.has_method("spawn_boost_reward"):
|
if player.powerup_manager.has_method("spawn_boost_reward"):
|
||||||
player.powerup_manager.spawn_boost_reward()
|
player.powerup_manager.spawn_boost_reward()
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ const FREEZE_SLOW_DURATION = 3.0
|
|||||||
signal cooldown_updated(effect: int, time_left: float, max_time: float)
|
signal cooldown_updated(effect: int, time_left: float, max_time: float)
|
||||||
signal powerup_unlocked(effect: int, level: int)
|
signal powerup_unlocked(effect: int, level: int)
|
||||||
|
|
||||||
|
var wall_orientation_horizontal: bool = false # False = Vertical, True = Horizontal
|
||||||
|
|
||||||
# New Helper functions for Targeting and Preview
|
# New Helper functions for Targeting and Preview
|
||||||
|
|
||||||
func get_skill_affected_area(effect: int, center_pos: Vector2i) -> Array[Vector2i]:
|
func get_skill_affected_area(effect: int, center_pos: Vector2i) -> Array[Vector2i]:
|
||||||
@@ -46,13 +48,8 @@ func get_skill_affected_area(effect: int, center_pos: Vector2i) -> Array[Vector2
|
|||||||
area.append(pos)
|
area.append(pos)
|
||||||
|
|
||||||
SpecialEffect.BLOCK_FLOOR:
|
SpecialEffect.BLOCK_FLOOR:
|
||||||
# Logic: Perpendicular to player direction or based on major axis difference
|
# Logic: Based on toggled orientation state
|
||||||
var diff = center_pos - player.current_position
|
var is_horizontal = wall_orientation_horizontal
|
||||||
var is_horizontal = false
|
|
||||||
if abs(diff.x) > abs(diff.y):
|
|
||||||
is_horizontal = false # Vertical Column
|
|
||||||
else:
|
|
||||||
is_horizontal = true # Horizontal Row
|
|
||||||
|
|
||||||
if is_horizontal:
|
if is_horizontal:
|
||||||
for x in range(enhanced_gridmap.columns):
|
for x in range(enhanced_gridmap.columns):
|
||||||
@@ -226,9 +223,22 @@ func activate_effect(effect: int, target_player: Node3D = null):
|
|||||||
if not (player.is_bot or player.is_in_group("Bots")):
|
if not (player.is_bot or player.is_in_group("Bots")):
|
||||||
var main = player.get_tree().get_root().get_node_or_null("Main")
|
var main = player.get_tree().get_root().get_node_or_null("Main")
|
||||||
if main and main.ui_manager:
|
if main and main.ui_manager:
|
||||||
|
# Toggle Logic for Wall Block
|
||||||
|
if main.ui_manager.current_action_state == main.ui_manager.ActionState.TARGETING and main.ui_manager.pending_skill_id == effect:
|
||||||
|
if effect == SpecialEffect.BLOCK_FLOOR:
|
||||||
|
toggle_wall_orientation()
|
||||||
|
powerup_cooldowns[effect] = 0.0 # Revert cooldown
|
||||||
|
emit_signal("cooldown_updated", effect, 0.0, 0.0)
|
||||||
|
return
|
||||||
|
|
||||||
main.ui_manager.current_action_state = main.ui_manager.ActionState.TARGETING
|
main.ui_manager.current_action_state = main.ui_manager.ActionState.TARGETING
|
||||||
main.ui_manager.pending_skill_id = effect
|
main.ui_manager.pending_skill_id = effect
|
||||||
NotificationManager.send_message(player, "Select a target area...", NotificationManager.MessageType.NORMAL)
|
|
||||||
|
var msg = "Select a target area..."
|
||||||
|
if effect == SpecialEffect.BLOCK_FLOOR:
|
||||||
|
msg = "Click again to toggle Vertical/Horizontal"
|
||||||
|
|
||||||
|
NotificationManager.send_message(player, msg, NotificationManager.MessageType.NORMAL)
|
||||||
# Do NOT set cooldown yet. Cooldown sets on execution.
|
# Do NOT set cooldown yet. Cooldown sets on execution.
|
||||||
# Revert the cooldown set above (hacky but handles the split flow)
|
# Revert the cooldown set above (hacky but handles the split flow)
|
||||||
powerup_cooldowns[effect] = 0.0
|
powerup_cooldowns[effect] = 0.0
|
||||||
@@ -316,40 +326,15 @@ func _execute_area_freeze(center_pos: Vector2i = Vector2i.ZERO):
|
|||||||
if main: main.rpc("sync_grid_item", pos.x, 0, pos.y, 0)
|
if main: main.rpc("sync_grid_item", pos.x, 0, pos.y, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func toggle_wall_orientation():
|
||||||
|
wall_orientation_horizontal = !wall_orientation_horizontal
|
||||||
|
var mode_str = "HORIZONTAL" if wall_orientation_horizontal else "VERTICAL"
|
||||||
|
NotificationManager.send_message(player, "Wall Mode: " + mode_str, NotificationManager.MessageType.NORMAL)
|
||||||
|
|
||||||
func _execute_block_floor(target_pos: Vector2i):
|
func _execute_block_floor(target_pos: Vector2i):
|
||||||
# "Wall Block"
|
# "Wall Block"
|
||||||
# Determine Row or Column based on click?
|
var is_horizontal = wall_orientation_horizontal
|
||||||
# Or let's imply orientation (North/South = Row, East/West = Column) relative to Player?
|
|
||||||
# Or just Row vs Column based on closest axis?
|
|
||||||
# Let's use simple logic: If click is further along X than Z from player, use Column(X), else Row(Z).
|
|
||||||
|
|
||||||
var diff = target_pos - player.current_position
|
|
||||||
var is_horizontal = false
|
|
||||||
if abs(diff.x) > abs(diff.y):
|
|
||||||
is_horizontal = false # Aligned with X axis roughly? Logic check:
|
|
||||||
# If I am at (0,0) and click (5,0), diff is (5,0). X is dominant.
|
|
||||||
# I want to block the vertical column at X=5? Or the horizontal row?
|
|
||||||
# Original logic "is_horizontal" meant blocking the Row (all X at fixed Z).
|
|
||||||
# If I click (5,0), I likely want to block that column or row?
|
|
||||||
# Let's default to blocking the axis perpendicular to where I'm looking/clicking?
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Actually, simpler: Let's block the line that passes through the target point
|
|
||||||
# perpendicular to the direction from player to target.
|
|
||||||
# If I shoot North (change in Y/Z), I want a wall ACROSS (Row/X).
|
|
||||||
# If I shoot East (change in X), I want a wall ACROSS (Column/Z).
|
|
||||||
|
|
||||||
if abs(diff.x) > abs(diff.y):
|
|
||||||
# Target is East/West. I want a wall perpendicular -> Vertical (Fixed X, varying Z)
|
|
||||||
# Wait, "Column" in grid usually means Fixed X. "Row" means Fixed Z.
|
|
||||||
# So if X diff is big, I am shooting along X. I want a wall AT that X? No, I want a wall BLOCKING that X?
|
|
||||||
# Let's stick to the visual preview logic we will implement:
|
|
||||||
# If abs(diff.x) > abs(diff.y) -> Show Column (Vertical strip at target.x)
|
|
||||||
is_horizontal = false
|
|
||||||
else:
|
|
||||||
# Target is North/South. Show Row (Horizontal strip at target.y)
|
|
||||||
is_horizontal = true
|
|
||||||
|
|
||||||
var neighbors = []
|
var neighbors = []
|
||||||
|
|
||||||
if is_horizontal:
|
if is_horizontal:
|
||||||
|
|||||||
@@ -237,9 +237,9 @@ func _ensure_shortcut_label(btn: Button, button_name: String):
|
|||||||
|
|
||||||
match button_name:
|
match button_name:
|
||||||
"Grab": shortcut_lbl.text = "Space"
|
"Grab": shortcut_lbl.text = "Space"
|
||||||
"Put": shortcut_lbl.text = "R"
|
"Put": shortcut_lbl.text = "" # Disabled shortcut
|
||||||
"Special": shortcut_lbl.text = "C"
|
"Special": shortcut_lbl.text = "Q"
|
||||||
"SpawnBoost": shortcut_lbl.text = "V"
|
"SpawnBoost": shortcut_lbl.text = "E"
|
||||||
|
|
||||||
btn.add_child(shortcut_lbl)
|
btn.add_child(shortcut_lbl)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user