Skip to content

Commit

Permalink
Iconpaths (#36)
Browse files Browse the repository at this point in the history
* Updated the icon import path to new syntax

* Updated the icon import path to new syntax

* code issues

* code issues
  • Loading branch information
creadicted authored Sep 8, 2022
1 parent ffc5bec commit 377fc50
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion addons/beehave/nodes/beehave_node.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends BeehaveTree

class_name BeehaveNode, "../icons/action.svg"
class_name BeehaveNode
@icon("../../icons/action.svg")

enum { SUCCESS, FAILURE, RUNNING }

Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/composites/composite.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends BeehaveNode

class_name Composite, "../../icons/category_composite.svg"
class_name Composite
@icon("../../icons/category_composite.svg")

func _ready():
if self.get_child_count() < 1:
Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/composites/selector.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Composite

class_name SelectorComposite, "../../icons/selector.svg"
class_name SelectorComposite
@icon("../../icons/selector.svg")

func tick(actor, blackboard):
for c in get_children():
Expand Down
4 changes: 2 additions & 2 deletions addons/beehave/nodes/composites/selector_star.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# FAILED or SUCCEEDED
extends Composite

class_name SelectorStarComposite, "../../icons/selector_star.svg"

class_name SelectorStarComposite
@icon("../../icons/selector_star.svg")

var last_execution_index = 0

Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/composites/sequence.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Composite

class_name SequenceComposite, "../../icons/sequencer.svg"
class_name SequenceComposite
@icon("../../icons/sequencer.svg")

func tick(actor, blackboard):
for c in get_children():
Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/composites/sequence_star.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

extends Composite

class_name SequenceStarComposite, "../../icons/sequencer_star.svg"
class_name SequenceStarComposite
@icon("../../icons/sequencer_star.svg")

var successful_index = 0

Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/decorators/decorator.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends BeehaveNode

class_name Decorator, "../../icons/category_decorator.svg"
class_name Decorator
@icon("../../icons/category_decorator.svg")


func _ready():
Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/decorators/failer.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Decorator

class_name AlwaysFailDecorator, "../../icons/fail.svg"
class_name AlwaysFailDecorator
@icon("../../icons/fail.svg")


func tick(action, blackboard):
Expand Down
4 changes: 2 additions & 2 deletions addons/beehave/nodes/decorators/inverter.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends Decorator

class_name InverterDecorator, "../../icons/inverter.svg"

class_name InverterDecorator
@icon("../../icons/inverter.svg")

func tick(action, blackboard):
for c in get_children():
Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/decorators/limiter.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Decorator

class_name LimiterDecorator, "../../icons/limiter.svg"
class_name LimiterDecorator
@icon("../../icons/limiter.svg")

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

Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/decorators/succeeder.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends Decorator

class_name AlwaysSucceedDecorator, "../../icons/succeed.svg"
class_name AlwaysSucceedDecorator
@icon("../../icons/succeed.svg")

func tick(action, blackboard):
for c in get_children():
Expand Down
3 changes: 2 additions & 1 deletion addons/beehave/nodes/leaves/action.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extends Leaf

class_name ActionLeaf, "../../icons/action.svg"
class_name ActionLeaf
@icon("../../icons/action.svg")
3 changes: 2 additions & 1 deletion addons/beehave/nodes/leaves/condition.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extends Leaf

class_name ConditionLeaf, "../../icons/condition.svg"
class_name ConditionLeaf
@icon("../../icons/condition.svg")
3 changes: 2 additions & 1 deletion addons/beehave/nodes/leaves/leaf.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extends BeehaveNode

class_name Leaf, "../../icons/action.svg"
class_name Leaf
@icon("../../icons/action.svg")

0 comments on commit 377fc50

Please sign in to comment.