-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix icons in Godot 4 Fixes #49 and ports new icon design from godot-3.x to godot-4.x. * Disable bootsplash fullsize * Fix Blackboard class
- Loading branch information
Showing
9 changed files
with
35 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
extends Object | ||
class_name Blackboard | ||
var blackboard = {} | ||
class_name Blackboard extends RefCounted | ||
|
||
func set(key, value, blackboard_name = 'default'): | ||
var blackboard: Dictionary = {} | ||
|
||
|
||
func set_value(key: Variant, value: Variant, blackboard_name: String = 'default') -> void: | ||
if not blackboard.has(blackboard_name): | ||
blackboard[blackboard_name] = {} | ||
|
||
blackboard[blackboard_name][key] = value | ||
|
||
|
||
func get(key, default_value = null, blackboard_name = 'default'): | ||
if has(key, blackboard_name): | ||
func get_value(key: Variant, default_value: Variant = null, blackboard_name: String = 'default') -> Variant: | ||
if has_value(key, blackboard_name): | ||
return blackboard[blackboard_name].get(key, default_value) | ||
return default_value | ||
|
||
|
||
func has(key, blackboard_name = 'default'): | ||
func has_value(key: Variant, blackboard_name: String = 'default') -> bool: | ||
return blackboard.has(blackboard_name) and blackboard[blackboard_name].has(key) and blackboard[blackboard_name][key] != null | ||
|
||
|
||
func erase(key, blackboard_name = 'default'): | ||
func erase_value(key: Variant, blackboard_name: String = 'default') -> void: | ||
if blackboard.has(blackboard_name): | ||
blackboard[blackboard_name][key] = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters