Skip to content

Commit

Permalink
Fix #39 , Close #40
Browse files Browse the repository at this point in the history
Co-Authored-By: eemkukko <[email protected]>
  • Loading branch information
Alexejhero and eemkukko committed Jan 7, 2025
1 parent 8d70af0 commit 8270bbf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Godot/addons/neuro-sdk/messages/api/outgoing_message.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ func _get_command() -> String:
push_error("OutgoingMessage._get_command() is not implemented.")
return "invalid"

func _get_data() -> Dictionary:
return {}
# Returns Dictionary | null
func _get_data():
return null

func merge(_other: OutgoingMessage) -> bool:
return false
Expand Down
6 changes: 6 additions & 0 deletions Godot/addons/neuro-sdk/messages/api/ws_message.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ func _init(command_: String, data_, game_: String):
game = game_

func get_data() -> Dictionary:
if data == null:
return {
"command": command,
"game": game,
}

return {
"command": command,
"game": game,
Expand Down
2 changes: 1 addition & 1 deletion Godot/examples/play_o_action.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends NeuroAction

const TicTacToe := preload("res://addons/neuro-sdk/examples/tic_tac_toe.gd")
const TicTacToe := preload("res://examples/tic_tac_toe.gd")

var _ticTacToe: TicTacToe

Expand Down
2 changes: 1 addition & 1 deletion Godot/examples/tic_tac_toe.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends Node

const PlayOAction := preload("res://addons/neuro-sdk/examples/play_o_action.gd")
const PlayOAction := preload("res://examples/play_o_action.gd")

@export var resetButton: BaseButton
@export var container: GridContainer
Expand Down

0 comments on commit 8270bbf

Please sign in to comment.