Skip to content

Instantly share code, notes, and snippets.

@rjsalts
Last active May 29, 2019 00:36
Show Gist options
  • Save rjsalts/3b5d1f9e181913ac04b3b89862691ba4 to your computer and use it in GitHub Desktop.
Save rjsalts/3b5d1f9e181913ac04b3b89862691ba4 to your computer and use it in GitHub Desktop.
unbound_lambda( ({'item, 'dest}),
({#'?,
({#',, ({#'=, 'origin, ({#'environment, 'item}) }),
({#'=, 'mover, ({#'previous_object, 0}) }),
0
}),
0,
({#'?,
({#'call_other, 'item, "query_move_ok", 'dest, 'mover
/*({#'previous_object, 1})*/ }),
1,
({#'==, 'item, 0}),
1,
({#'==, 'dest, 0}),
1,
({#'?,
({#'==, 'origin, 0 }),
0,
({#'call_other, 'origin,
"query_leave_ok", 'item, 'dest, 'mover /*({#'previous_object, 1})*/ }),
1,
({#'==, 'item, 0}),
1,
({#'==, 'dest, 0}),
1,
0 }),
1,
({#',,
({#'=, 'pass, ({#'call_other, 'dest, "query_enter_ok", 'item,
'mover /*({#'previous_object, 1}) */}) }), 0 }),
0,
({#'&&, ({#'intp, 'pass}), ({#'>=, 'pass, 1}) }),
1,
({#'==, 'item, 0}),
1,
({#'==, 'dest, 0}),
1,
0}),
0,
({#',, ({#'efun::set_environment, 'item, 'dest}), 0 }),
0,
({#'?, 'origin,
({#',, ({#'call_other, 'origin, "leave_signal", 'item, 'dest,
'mover /*({#'previous_object, 1})*/ }), 0 }) , 0 }),
0,
({#'==, 'item, 0}),
0,
({#'==, 'dest, 0}),
0,
({#',, ({#'call_other, 'dest, "enter_signal", 'item, 'origin,
'mover /*({#'previous_object, 1})*/, 'pass }), 0 }),
0,
({#'==, 'item, 0 }),
0,
({#',, ({#'call_other, 'item, "move_signal", 'origin,
'mover, /*({#'previous_object, 1})*/ }), 0 }),
0,
({#'==, 'item, 0}),
0,
({#'==, 'dest, 0}),
0,
({#'!=, ({#'environment, 'item}), 'dest}),
1,
({#',,
({#'?, ({#'living, 'item}), ({#',,
({#'efun::set_this_player, 'item}),
({#'call_other, 'dest, "init"}),
({#'?, ({#'!=, ({#'environment, 'item}), 'dest}), ({#'return})}),
}) }),
({#'=, 'others, ({#'all_inventory, 'dest}) }),
({#'=, ({#'[, 'others, ({#'member, 'others, 'item}) }), 0}),
({#'filter, 'others,
({#'bind_lambda,
unbound_lambda( ({'ob, 'item}),
({#'?, ({#'living, 'ob}), ({#',,
({#'efun::set_this_player, 'ob}),
({#'call_other, 'item, "init"}),
}) })
)
}),
'item,
}),
({#'?, ({#'living, 'item}), ({#',,
({#'efun::set_this_player, 'item}),
({#'filter_objects, 'others, "init"}),
}) }),
({#'?, ({#'living, 'dest}), ({#',,
({#'efun::set_this_player, 'dest}),
({#'call_other, 'item, "init"}),
}) }), 1
})
, 1
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment