Skip to content

Commit a091a47

Browse files
committed
Border's state gets saved
1 parent c28fde8 commit a091a47

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/Border.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ extends StaticBody2D
33
var interactedids = []
44

55
func _ready():
6+
if Global.config.get_value("misc", "barrier_passed"):
7+
queue_free()
68
Global.id_interaction.connect(_on_id_interaction)
9+
710

811
func contains(id):
912
return interactedids.find(id) != -1
@@ -12,4 +15,6 @@ func _on_id_interaction(id):
1215
if not contains(id):
1316
interactedids.append(id)
1417
if contains(1) and contains(2) and contains(3):
18+
Global.config.set_value("misc", "barrier_passed", true)
19+
Global.config.save(Global.configpath)
1520
queue_free()

0 commit comments

Comments
 (0)