Chane UnlockLockable recursiveness

graph-rework-2
noah metz 2023-06-26 23:12:43 -06:00
parent 6c1887ed76
commit cf8648f615
1 changed files with 2 additions and 2 deletions

@ -311,7 +311,7 @@ func UnlockLockable(ctx * GraphContext, lockable Lockable, node GraphNode, node_
var lock_err error = nil var lock_err error = nil
for _, requirement := range(lockable_state.Requirements()) { for _, requirement := range(lockable_state.Requirements()) {
var err error = nil var err error = nil
err = UnlockLockable(ctx, requirement, node, node_state) err = UnlockLockable(ctx, requirement, lockable, lockable_state)
if err != nil { if err != nil {
lock_err = err lock_err = err
break break
@ -391,7 +391,7 @@ func LockLockable(ctx * GraphContext, lockable Lockable, node GraphNode, node_st
if lock_err != nil { if lock_err != nil {
for _, locked_lockable := range(locked_requirements) { for _, locked_lockable := range(locked_requirements) {
err = UnlockLockable(ctx, locked_lockable, node, node_state) err = UnlockLockable(ctx, locked_lockable, lockable, lockable_state)
if err != nil { if err != nil {
panic(err) panic(err)
} }