Skip to content

Commit 006a47a

Browse files
authored
Merge pull request #101 from Crystalwarrior/fix-return
Fix return command by using main_collection
2 parents cf0a5b7 + de2eef5 commit 006a47a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

command_processor.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,26 +284,26 @@ func _execute_command(command:Blockflow.CommandClass) -> void:
284284

285285

286286
func _add_to_history() -> void:
287-
assert(bool(current_collection != null))
287+
assert(bool(main_collection != null))
288288
var history_value = []
289289
history_value.resize(_HistoryData.size())
290-
history_value[_HistoryData.COLLECTION] = current_collection
290+
history_value[_HistoryData.COLLECTION] = main_collection
291291
history_value[_HistoryData.COMMAND_POSITION] = current_command_position
292292
_history.append(history_value)
293293

294294

295295
# Adds a history value to [_jump_history].
296296
# This function should NEVER be called manually.
297297
func _add_to_jump_history(target_position:int, target_collection:Blockflow.CollectionClass) -> void:
298-
assert(bool(current_collection != null))
298+
assert(bool(main_collection != null))
299299
var jump_data := []
300300
var history_from := []
301301
var history_to := []
302302
jump_data.resize(_JumpHistoryData.size())
303303
history_from.resize(_HistoryData.size())
304304
history_to.resize(_HistoryData.size())
305305

306-
history_from[_HistoryData.COLLECTION] = current_collection
306+
history_from[_HistoryData.COLLECTION] = main_collection
307307
history_from[_HistoryData.COMMAND_POSITION] = current_command_position
308308
jump_data[_JumpHistoryData.FROM] = history_from
309309

0 commit comments

Comments
 (0)