Última actividad 1786343145

ZZ's Avatar ZZ revisó este gist 1786343145. Ir a la revisión

1 file changed, 0 insertions, 0 deletions

AIFIX.md renombrado a z-AIFIX.md

Archivo renombrado sin cambios

ZZ's Avatar ZZ revisó este gist 1786343125. Ir a la revisión

1 file changed, 78 insertions

AIFIX.md(archivo creado)

@@ -0,0 +1,78 @@
1 + Refer to this document to correct outdated code for Godot 4.6 gdscript using copy and paste git diffs to correct the mistakes.
2 +
3 + ### Replace := [] with Array[Label] = []
4 + - var valid_rocks := []
5 + + var valid_rocks: Array[Label] = []
6 +
7 + - DisplayServer.vsync = DisplayServer.VSYNC_ENABLED # Fixed V-Sync prevents DWM composition stalls
8 + + DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED) # Fixed V-Sync prevents DWM composition stalls
9 +
10 + ### Replace Input.is_touchscreen_available() with DisplayServer.is_touchscreen_available()
11 + - "Touchscreen": Input.is_touchscreen_available(),
12 + + "Touchscreen": DisplayServer.is_touchscreen_available(),
13 +
14 + - "WebRTC Support": Engine.has_feature("web_view"),
15 + + "WebRTC Support": OS.has_feature("web") or ClassDB.class_exists("WebRTCPeerConnection"),
16 +
17 + - col.color = Color.rand()
18 + + col.color = Color(randf(), randf(), randf())
19 +
20 +
21 + "yield" was removed in Godot 4. Use "await" instead.
22 +
23 +
24 + ### Invalid call. Nonexistent function 'clear' in base 'VBoxContainer'.
25 + - kitchen_sink_box.clear()
26 + + for child in kitchen_sink_box.get_children():
27 + + child.queue_free()
28 +
29 + ### Cannot infer the type of "child" variable because the value doesn't have a set type.
30 + - var child := control.create_item(root)
31 + + var child: TreeItem = control.create_item(root)
32 +
33 + ### Native class "Slider" cannot be constructed as it is abstract.
34 + - HSeparator.new(), Slider.new(), HSlider.new(), ProgressBar.new(),
35 + + VSlider.new(), HSeparator.new(), HSlider.new(), ProgressBar.new(),
36 +
37 + ### Cannot infer the type of "child" variable because the value doesn't have a set type.
38 + - var child := control.create_item(root)
39 + + var child: TreeItem = control.create_item(root)
40 +
41 + ### Replace: Invalid assignment of property or key 'border_width_all' with value of type 'int' on a base object of type 'StyleBoxFlat'.
42 + - style.border_width_all = 2
43 + + style.border_width_left = 2
44 + + style.border_width_right = 2
45 + + style.border_width_top = 2
46 + + style.border_width_bottom = 2
47 + - style.corner_radius_all = 16
48 + + style.corner_radius_top_left = 16
49 + + style.corner_radius_top_right = 16
50 + + style.corner_radius_bottom_left = 16
51 + + style.corner_radius_bottom_right = 16
52 +
53 + ### Replace: PAUSE_MODE_PROCESS with PROCESS_MODE_ALWAYS
54 + - timer.pause_mode = Timer.PAUSE_MODE_PROCESS
55 + + timer.process_mode = Node.PROCESS_MODE_ALWAYS
56 +
57 + ### FIX: for popup timer is not working because the ConfirmationDialog pauses the scene tree automatically when it is shown via popup_centered()
58 + Even set timer.process_mode = Node.PROCESS_MODE_ALWAYS, the parent node (dialog) has a default process mode of PROCESS_MODE_INHERIT. When Godot pauses the SceneTree for the popup modal, the dialog stops processing, which forces the timer to stop processing regardless of its individual setting.To fix this, you must explicitly set the dialog to process always as well.
59 + The Fix
60 + Add dialog.process_mode = Node.PROCESS_MODE_ALWAYS right after you instantiate it
61 +
62 + ### Why This Beats await or call_deferred. Prefer Signal-based hooks as they don't guess.
63 + - await get_tree().process_frame() guesses when layout will finish. If text rendering takes 2 extra frames (due to markdown parsing, font caching, or heavy UI), the scroll runs on outdated dimensions and snaps too early.
64 + - Signal-based hooks don't guess. They wait for Godot's layout server to explicitly report that sizing has changed, guaranteeing sb.max_value reflects the true content height before you read it.
65 +
66 + ### Replace get_process_delta_time with get_process_delta_time
67 + - var dynamic_speed = speed * Node.get_process_delta_time() # Throws the error
68 + + var dynamic_speed = speed * get_process_delta_time()
69 +
70 +
71 + ### Other Notes
72 +
73 + - system_input.fit_content_width = true
74 + + system_input.wrap_mode = TextEdit.LINE_WRAPPING_BOUNDARY
75 +
76 + - var hover_style = StyleBoxFlat.new(style) ❌
77 + + var hover_style = style.duplicate() # Correct way to copy a StyleBox
78 + + Time.get_ticks_msec() # Correct way to call get_ticks_msec

ZZ's Avatar ZZ revisó este gist 1786341496. Ir a la revisión

1 file changed, 3 insertions, 6 deletions

Qwen36-MTP-System-Power.md

@@ -39,11 +39,8 @@ Recommended Pattern for EnvoyOS
39 39 Tool Purpose When to Use in EnvoyOS
40 40 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
41 41 call_deferred() Schedules a method to run at the end of the current frame Safe scene tree edits during tab swaps, avoiding "node doesn't exist" or layout-calculation conflicts
42 - await + Futures Non-blocking suspension until an event completes Loading configs, network handshakes, waiting for UI/engines to
43 - initialize without freezing the main thread
44 - Signals Zero-polling, event-driven communication Decoupling tab focus from engine states, energy tier updates,
45 - cross-module notifications
46 - Threading + @thread_sync Offload heavy CPU work off the main thread AI inference, video decoding, clipboard polling, VOIP packet
47 - processing
42 + await + Futures Non-blocking suspension until an event completes Loading configs, network handshakes, waiting for UI/engines to initialize without freezing the main thread
43 + Signals Zero-polling, event-driven communication Decoupling tab focus from engine states, energy tier updates, cross-module notifications
44 + Threading + @thread_sync Offload heavy CPU work off the main thread AI inference, video decoding, clipboard polling, VOIP packet processing
48 45 ProcessMode Controls when _process(), _physics_process(), and inputs run Tying engine runtime to tab visibility vs true background execution
49 46 ```

ZZ's Avatar ZZ revisó este gist 1786341467. Ir a la revisión

1 file changed, 1 insertion, 2 deletions

Qwen36-MTP-System-Power.md

@@ -38,8 +38,7 @@ Recommended Pattern for EnvoyOS
38 38 ```
39 39 Tool Purpose When to Use in EnvoyOS
40 40 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
41 - call_deferred() Schedules a method to run at the end of the current frame Safe scene tree edits during tab swaps, avoiding "node doesn't exist" or
42 - or layout-calculation conflicts
41 + call_deferred() Schedules a method to run at the end of the current frame Safe scene tree edits during tab swaps, avoiding "node doesn't exist" or layout-calculation conflicts
43 42 await + Futures Non-blocking suspension until an event completes Loading configs, network handshakes, waiting for UI/engines to
44 43 initialize without freezing the main thread
45 44 Signals Zero-polling, event-driven communication Decoupling tab focus from engine states, energy tier updates,

ZZ's Avatar ZZ revisó este gist 1786341442. Ir a la revisión

1 file changed, 14 insertions, 1 deletion

Qwen36-MTP-System-Power.md

@@ -34,4 +34,17 @@ Recommended Pattern for EnvoyOS
34 34 - await only for explicit async operations (configs, network handshakes).
35 35 - call_deferred or signals for scene tree edits during tab swaps.
36 36 - Threading for heavy computations; marshal results back via signals.
37 - - Process modes tied to engine context (active/bg/off).
37 + - Process modes tied to engine context (active/bg/off).
38 + ```
39 + Tool Purpose When to Use in EnvoyOS
40 + ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
41 + call_deferred() Schedules a method to run at the end of the current frame Safe scene tree edits during tab swaps, avoiding "node doesn't exist" or
42 + or layout-calculation conflicts
43 + await + Futures Non-blocking suspension until an event completes Loading configs, network handshakes, waiting for UI/engines to
44 + initialize without freezing the main thread
45 + Signals Zero-polling, event-driven communication Decoupling tab focus from engine states, energy tier updates,
46 + cross-module notifications
47 + Threading + @thread_sync Offload heavy CPU work off the main thread AI inference, video decoding, clipboard polling, VOIP packet
48 + processing
49 + ProcessMode Controls when _process(), _physics_process(), and inputs run Tying engine runtime to tab visibility vs true background execution
50 + ```

ZZ's Avatar ZZ revisó este gist 1786341384. Ir a la revisión

1 file changed, 1 insertion, 1 deletion

Qwen36-MTP-System-Power.md

@@ -21,7 +21,7 @@ responsive.
21 21 - Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 22 - State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
23 23
24 - Key Summary
24 + Concurrency/execution Summary
25 25 - call_deferred: Scene Tree Safety
26 26 - await & Futures: Non-Blocking Execution
27 27 - Signals: Reactive State Management

ZZ's Avatar ZZ revisó este gist 1786341367. Ir a la revisión

1 file changed, 7 insertions

Qwen36-MTP-System-Power.md

@@ -21,6 +21,13 @@ responsive.
21 21 - Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 22 - State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
23 23
24 + Key Summary
25 + - call_deferred: Scene Tree Safety
26 + - await & Futures: Non-Blocking Execution
27 + - Signals: Reactive State Management
28 + - Threading + Main Thread Sync: Heavy Workloads
29 + - Process Modes: Tab Visibility vs Runtime
30 +
24 31 Recommended Pattern for EnvoyOS
25 32 - Central EnvoyStateManager (RefCounted/Node) that tracks tab focus, engine contexts, and energy tiers.
26 33 - Use signals for all cross-module communication.

ZZ's Avatar ZZ revisó este gist 1786341280. Ir a la revisión

1 file changed, 9 insertions, 1 deletion

Qwen36-MTP-System-Power.md

@@ -19,4 +19,12 @@ responsive.
19 19 - Signals: Native Godot event system. Decouples systems, enables reactive UI/engine updates without polling. Essential for multi-tab state management.
20 20 - Threading (Thread/Callable.bind()/@thread_sync): For heavy CPU tasks (AI inference, network I/O) that shouldn't block the main thread.
21 21 - Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 - - State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
22 + - State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
23 +
24 + Recommended Pattern for EnvoyOS
25 + - Central EnvoyStateManager (RefCounted/Node) that tracks tab focus, engine contexts, and energy tiers.
26 + - Use signals for all cross-module communication.
27 + - await only for explicit async operations (configs, network handshakes).
28 + - call_deferred or signals for scene tree edits during tab swaps.
29 + - Threading for heavy computations; marshal results back via signals.
30 + - Process modes tied to engine context (active/bg/off).

ZZ's Avatar ZZ revisó este gist 1786340977. Ir a la revisión

1 file changed, 6 insertions, 6 deletions

Qwen36-MTP-System-Power.md

@@ -12,11 +12,11 @@ Background Audio 🔋 Safe to run continuously
12 12 Timers/State Stores 🔋 Negligible
13 13 ```
14 14 Key Concepts for concurrency/execution options:
15 - • call_deferred: Schedules a method to run at the end of the current frame/physics step. Good for safe scene tree manipulation, avoiding "node doesn't exist
15 + - call_deferred: Schedules a method to run at the end of the current frame/physics step. Good for safe scene tree manipulation, avoiding "node doesn't exist
16 16 yet" errors.
17 - • await: Godot 4's async/await pattern. Replaces yield. Used for non-blocking waits (signals, timers, functions returning Future). Keeps main thread
17 + - await: Godot 4's async/await pattern. Replaces yield. Used for non-blocking waits (signals, timers, functions returning Future). Keeps main thread
18 18 responsive.
19 - • Signals: Native Godot event system. Decouples systems, enables reactive UI/engine updates without polling. Essential for multi-tab state management.
20 - • Threading (Thread/Callable.bind()/@thread_sync): For heavy CPU tasks (AI inference, network I/O) that shouldn't block the main thread.
21 - • Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 - • State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
19 + - Signals: Native Godot event system. Decouples systems, enables reactive UI/engine updates without polling. Essential for multi-tab state management.
20 + - Threading (Thread/Callable.bind()/@thread_sync): For heavy CPU tasks (AI inference, network I/O) that shouldn't block the main thread.
21 + - Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 + - State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.

ZZ's Avatar ZZ revisó este gist 1786340958. Ir a la revisión

1 file changed, 10 insertions, 1 deletion

Qwen36-MTP-System-Power.md

@@ -10,4 +10,13 @@ Video Decode/Encode 🔋🔋🔋🔋 Pause while hidden
10 10 Clipboard/OS Sync 🔋 Event-driven only
11 11 Background Audio 🔋 Safe to run continuously
12 12 Timers/State Stores 🔋 Negligible
13 - ```
13 + ```
14 + Key Concepts for concurrency/execution options:
15 + • call_deferred: Schedules a method to run at the end of the current frame/physics step. Good for safe scene tree manipulation, avoiding "node doesn't exist
16 + yet" errors.
17 + • await: Godot 4's async/await pattern. Replaces yield. Used for non-blocking waits (signals, timers, functions returning Future). Keeps main thread
18 + responsive.
19 + • Signals: Native Godot event system. Decouples systems, enables reactive UI/engine updates without polling. Essential for multi-tab state management.
20 + • Threading (Thread/Callable.bind()/@thread_sync): For heavy CPU tasks (AI inference, network I/O) that shouldn't block the main thread.
21 + • Process Modes (PROCESS_MODE_ALWAYS, INHERIT, PAUSE): Controls when nodes update across different UI states (modals, hidden tabs).
22 + • State Machines / Context Managers: Managing tab switches, engine lifecycles, and background vs active states without race conditions.
Siguiente Anterior