Skip to content

Commit

Permalink
🐛 Godot4 beta 13+ fix: move @ICON above class name (#96)
Browse files Browse the repository at this point in the history
🐛 move @ICON above class name
  • Loading branch information
bitbrain authored Jan 21, 2023
1 parent c60f32e commit 563fda3
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 135 deletions.
2 changes: 1 addition & 1 deletion addons/beehave/nodes/beehave_root.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Controls the flow of execution of the entire behaviour tree.
@tool
class_name BeehaveRoot extends BeehaveTree
@icon("../icons/tree.svg")
class_name BeehaveRoot extends BeehaveTree


@export var enabled: bool = true:
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/beehave_tree.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Base class for all parts of the behaviour tree.
@tool
class_name BeehaveTree extends Node
@icon("../icons/category_bt.svg")
class_name BeehaveTree extends Node


enum {
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/composite.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## A Composite node controls the flow of execution of its children in a specific manner.
@tool
class_name Composite extends BeehaveNode
@icon("../../icons/category_composite.svg")
class_name Composite extends BeehaveNode


var running_child: BeehaveNode = null
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/selector.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## return `FAILURE`. This node will attempt to process all its children every
## single tick, even if one of them is currently `RUNNING` already.
@tool
class_name SelectorComposite extends Composite
@icon("../../icons/selector.svg")
class_name SelectorComposite extends Composite

func tick(actor: Node, blackboard: Blackboard) -> int:
for c in get_children():
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/selector_random.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
## [code]SelectorStar[/code] would, with the exception that the children
## will be executed in a random order.
@tool
class_name SelectorRandomComposite extends Composite
@icon("../../icons/selector_random.svg")
class_name SelectorRandomComposite extends Composite


## A shuffled list of the children that will be executed in reverse order.
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/selector_star.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## return `FAILURE`. This node will skip all previous child nodes that were
## executed prior, in case one of the children is currently in `RUNNING` state.
@tool
class_name SelectorStarComposite extends Composite
@icon("../../icons/selector_reactive.svg")
class_name SelectorStarComposite extends Composite

var last_execution_index = 0

Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/sequence.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
## return `FAILURE`. This node will attempt to process all its children every
## single tick, even if one of them is currently `RUNNING` already.
@tool
class_name SequenceComposite extends Composite
@icon("../../icons/sequence.svg")
class_name SequenceComposite extends Composite

func tick(actor: Node, blackboard: Blackboard) -> int:
for c in get_children():
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/sequence_random.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
## [code]SequenceStar[/code] would, with the exception that the children
## will be executed in a random order.
@tool
class_name SequenceRandomComposite extends Composite
@icon("../../icons/sequence_random.svg")
class_name SequenceRandomComposite extends Composite


## Whether the sequence should start where it left off after a previous failure.
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/composites/sequence_star.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
## return `FAILURE`. This node will skip all previous child nodes that succeeded
## prior, in case one of the children is currently in `RUNNING` state
@tool
class_name SequenceStarComposite extends Composite
@icon("../../icons/sequence_reactive.svg")
class_name SequenceStarComposite extends Composite

var successful_index = 0

Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/decorators/decorator.gd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Decorator nodes are used to transform the result received by its child.
## Must only have one child.
@tool
class_name Decorator extends BeehaveNode
@icon("../../icons/category_decorator.svg")
class_name Decorator extends BeehaveNode


func _ready():
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/decorators/failer.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## A Failer node will always return a `FAILURE` status code.
@tool
class_name AlwaysFailDecorator extends Decorator
@icon("../../icons/failer.svg")
class_name AlwaysFailDecorator extends Decorator


func tick(actor: Node, blackboard: Blackboard) -> int:
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/decorators/inverter.gd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## An inverter will return `FAILURE` in case it's child returns a `SUCCESS` status
## code or `SUCCESS` in case its child returns a `FAILURE` status code.
@tool
class_name InverterDecorator extends Decorator
@icon("../../icons/inverter.svg")
class_name InverterDecorator extends Decorator

func tick(actor: Node, blackboard: Blackboard) -> int:
for c in get_children():
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/decorators/limiter.gd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## The limiter will execute its child `x` amount of times. When the number of
## maximum ticks is reached, it will return a `FAILURE` status code.
@tool
class_name LimiterDecorator extends Decorator
@icon("../../icons/limiter.svg")
class_name LimiterDecorator extends Decorator

@onready var cache_key = 'limiter_%s' % self.get_instance_id()

Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/decorators/succeeder.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## A succeeder node will always return a `SUCCESS` status code.
@tool
class_name AlwaysSucceedDecorator extends Decorator
@icon("../../icons/succeeder.svg")
class_name AlwaysSucceedDecorator extends Decorator


func tick(actor: Node, blackboard: Blackboard) -> int:
Expand Down
2 changes: 1 addition & 1 deletion addons/beehave/nodes/leaves/action.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
## frame executions. In this case, the node should return `RUNNING` until the
## action is completed.
@tool
class_name ActionLeaf extends Leaf
@icon("../../icons/action.svg")
class_name ActionLeaf extends Leaf
2 changes: 1 addition & 1 deletion addons/beehave/nodes/leaves/condition.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Conditions are leaf nodes that either return SUCCESS or FAILURE depending on
## a single simple condition. They should never return `RUNNING`.
@tool
class_name ConditionLeaf extends Leaf
@icon("../../icons/condition.svg")
class_name ConditionLeaf extends Leaf
2 changes: 1 addition & 1 deletion addons/beehave/nodes/leaves/leaf.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Base class for all leaf nodes of the tree.
@tool
class_name Leaf extends BeehaveNode
@icon("../../icons/category_leaf.svg")
class_name Leaf extends BeehaveNode


func _get_configuration_warnings() -> PackedStringArray:
Expand Down
122 changes: 4 additions & 118 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -8,124 +8,6 @@

config_version=5

_global_script_classes=[{
"base": "Leaf",
"class": &"ActionLeaf",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/leaves/action.gd"
}, {
"base": "Decorator",
"class": &"AlwaysFailDecorator",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/decorators/failer.gd"
}, {
"base": "Decorator",
"class": &"AlwaysSucceedDecorator",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/decorators/succeeder.gd"
}, {
"base": "BeehaveTree",
"class": &"BeehaveNode",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/beehave_node.gd"
}, {
"base": "BeehaveTree",
"class": &"BeehaveRoot",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/beehave_root.gd"
}, {
"base": "Node",
"class": &"BeehaveTree",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/beehave_tree.gd"
}, {
"base": "RefCounted",
"class": &"Blackboard",
"language": &"GDScript",
"path": "res://addons/beehave/blackboard.gd"
}, {
"base": "BeehaveNode",
"class": &"Composite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/composite.gd"
}, {
"base": "Leaf",
"class": &"ConditionLeaf",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/leaves/condition.gd"
}, {
"base": "BeehaveNode",
"class": &"Decorator",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/decorators/decorator.gd"
}, {
"base": "Decorator",
"class": &"InverterDecorator",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/decorators/inverter.gd"
}, {
"base": "BeehaveNode",
"class": &"Leaf",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/leaves/leaf.gd"
}, {
"base": "Decorator",
"class": &"LimiterDecorator",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/decorators/limiter.gd"
}, {
"base": "Composite",
"class": &"SelectorComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/selector.gd"
}, {
"base": "Composite",
"class": &"SelectorRandomComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/selector_random.gd"
}, {
"base": "Composite",
"class": &"SelectorStarComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/selector_star.gd"
}, {
"base": "Composite",
"class": &"SequenceComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/sequence.gd"
}, {
"base": "Composite",
"class": &"SequenceRandomComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/sequence_random.gd"
}, {
"base": "Composite",
"class": &"SequenceStarComposite",
"language": &"GDScript",
"path": "res://addons/beehave/nodes/composites/sequence_star.gd"
}]
_global_script_class_icons={
"ActionLeaf": "res://addons/beehave/icons/action.svg",
"AlwaysFailDecorator": "res://addons/beehave/icons/failer.svg",
"AlwaysSucceedDecorator": "res://addons/beehave/icons/succeeder.svg",
"BeehaveNode": "",
"BeehaveRoot": "res://addons/beehave/icons/tree.svg",
"BeehaveTree": "res://addons/beehave/icons/category_bt.svg",
"Blackboard": "",
"Composite": "res://addons/beehave/icons/category_composite.svg",
"ConditionLeaf": "res://addons/beehave/icons/condition.svg",
"Decorator": "res://addons/beehave/icons/category_decorator.svg",
"InverterDecorator": "res://addons/beehave/icons/inverter.svg",
"Leaf": "res://addons/beehave/icons/category_leaf.svg",
"LimiterDecorator": "res://addons/beehave/icons/limiter.svg",
"SelectorComposite": "res://addons/beehave/icons/selector.svg",
"SelectorRandomComposite": "res://addons/beehave/icons/selector_random.svg",
"SelectorStarComposite": "res://addons/beehave/icons/selector_reactive.svg",
"SequenceComposite": "res://addons/beehave/icons/sequence.svg",
"SequenceRandomComposite": "res://addons/beehave/icons/sequence_random.svg",
"SequenceStarComposite": "res://addons/beehave/icons/sequence_reactive.svg"
}

[application]

config/name="Beehave"
Expand All @@ -135,6 +17,10 @@ boot_splash/image="res://splash.png"
boot_splash/fullsize=false
config/icon="res://icon.png"

[editor]

export/convert_text_resources_to_binary=true

[editor_plugins]

enabled=PackedStringArray("res://addons/beehave/plugin.cfg")

0 comments on commit 563fda3

Please sign in to comment.