mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 12:22:10 +03:00
clay: %pass %drip with context, expect and handle errors in +take
This commit is contained in:
parent
90970469d0
commit
9ae28a985c
@ -1384,7 +1384,7 @@
|
||||
`[[care.mood case.mood syd] path.mood cage]:[u.res syd=syd]
|
||||
?~ ref
|
||||
[%give %writ riot]
|
||||
[%slip %b %drip !>([%writ riot])]
|
||||
[%pass /drip %b %drip !>([%writ riot])]
|
||||
::
|
||||
++ case-to-date
|
||||
|= =case
|
||||
@ -3781,7 +3781,7 @@
|
||||
(~(run in moods) |=(m=mood [care.m path.m]))
|
||||
=/ gift [%wris cas res]
|
||||
?: ?=(^ ref)
|
||||
[%slip %b %drip !>(gift)]
|
||||
[%pass /drip %b %drip !>(gift)] :: XX s/b [%behn %wris ...] in $sign?
|
||||
[%give gift]
|
||||
?> ?=([* ~ ~] res)
|
||||
:_ ~
|
||||
@ -5753,7 +5753,25 @@
|
||||
|= [tea=wire hen=duct dud=(unit goof) hin=sign]
|
||||
^+ [*(list move) ..^$]
|
||||
?^ dud
|
||||
~|(%clay-take-dud (mean tang.u.dud))
|
||||
?+ tea
|
||||
~|(%clay-take-dud (mean tang.u.dud))
|
||||
::
|
||||
[%drip ~]
|
||||
%. [~ ..^$]
|
||||
%- slog
|
||||
^- tang
|
||||
:* 'clay: drip fail'
|
||||
[%rose [": " "" ""] 'bail' mote.u.dud ~]
|
||||
tang.u.dud
|
||||
==
|
||||
==
|
||||
::
|
||||
:: pseudo %slip on %drip
|
||||
::
|
||||
?: ?=([%drip ~] tea)
|
||||
?> ?=([?(%behn %clay) ?(%writ %wris) *] hin)
|
||||
[[`move`[hen %give +.hin] ~] ..^$]
|
||||
::
|
||||
?: ?=([%lu %load *] tea)
|
||||
?> ?=(%unto +<.hin)
|
||||
?> ?=(%poke-ack -.p.hin)
|
||||
@ -5909,7 +5927,7 @@
|
||||
~(tap in ducts)
|
||||
=/ cancel-moves=(list move)
|
||||
%+ turn cancel-ducts
|
||||
|=(=duct [duct %slip %b %drip !>([%writ ~])])
|
||||
|=(=duct [duct %pass /drip %b %drip !>([%writ ~])])
|
||||
:: delete local state of foreign desk
|
||||
::
|
||||
=. hoy.ruf (~(del by hoy.ruf) who)
|
||||
|
Loading…
Reference in New Issue
Block a user