docs: update room navigator skill with correct get_current_room_name method
Replace raw eval JSON with godot_game_call_method for checking current room, matching the actual Godot MCP tool interface used in practice.
This commit is contained in:
@@ -35,8 +35,9 @@ Room identification at runtime:
|
||||
|
||||
The canonical way is via `MainGame.get_current_room_name()`:
|
||||
|
||||
Use `godot_game_call_method` to call it directly on the node path:
|
||||
```json
|
||||
{"command": "eval", "params": {"code": "get_tree().root.get_node('Node2D').get_current_room_name()"}}
|
||||
Call method get_current_room_name on /root/Node2D
|
||||
```
|
||||
|
||||
Returns a string like `"kq4_010_forest_path"`. The implementation extracts the filename from the scene script's resource path (`script_path.trim_suffix(".gd").get_file()`), NOT the node name (which is always `"background"`).
|
||||
|
||||
Reference in New Issue
Block a user