[go: nahoru, domu]

Skip to content

Commit

Permalink
fixed wrong path for nodes when using a build outside the editor, ren…
Browse files Browse the repository at this point in the history
…amed Turtle to LSystemTurtle
  • Loading branch information
HungryProton committed Feb 18, 2023
1 parent 3e25907 commit 8382473
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions common/autoloads/node_factory.gd
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ func refresh_list() -> void:
_node_search_index = Dictionary()
_nodes = Dictionary()

var node_path := "res://nodes/"
if OS.has_feature("standalone"):
var node_path: String
if OS.has_feature("editor"):
node_path = "res://nodes/"
else:
node_path = OS.get_executable_path().get_base_dir().path_join("nodes")

_find_all_nodes(node_path)
Expand Down
2 changes: 1 addition & 1 deletion nodes/generators/curves/l_system/l_system.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extends ProtonNode


var _rng := RandomNumberGenerator.new()
var _turtle := Turtle.new()
var _turtle := LSystemTurtle.new()


func _init() -> void:
Expand Down
2 changes: 1 addition & 1 deletion nodes/generators/curves/l_system/turtle.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends Node
class_name Turtle
class_name LSystemTurtle

# L-System component

Expand Down

0 comments on commit 8382473

Please sign in to comment.