vats: handle insane desk names

This commit is contained in:
Tinnus Napbus 2023-10-10 13:12:40 +13:00
parent 7a205c4b76
commit b7edc006be

View File

@ -51,10 +51,11 @@
=/ deks =/ deks
?~ desks ?~ desks
%+ sort %+ sort
(sort ~(tap in -.prep) |=([[a=@ *] b=@ *] !(aor a b))) (sort ~(tap by -.prep) |=([[a=@ *] b=@ *] !(aor a b)))
|=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base))) |=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base)))
%+ skip ~(tap in -.prep) %+ skip ~(tap by -.prep)
|=([syd=@tas *] =(~ (find ~[syd] desks))) |=([syd=@tas *] =(~ (find ~[syd] desks)))
=. deks (skim deks |=([=desk *] ((sane %tas) desk)))
?: =(filt %blocking) ?: =(filt %blocking)
=/ base-wic =/ base-wic
%+ sort ~(tap by wic:(~(got by -.prep) %base)) %+ sort ~(tap by wic:(~(got by -.prep) %base))
@ -118,6 +119,8 @@
^- tank ^- tank
=/ ego (scot %p our) =/ ego (scot %p our)
=/ wen (scot %da now) =/ wen (scot %da now)
?. ((sane %tas) syd)
leaf+"insane desk: {<syd>}"
=+ .^(=cass %cw /[ego]/[syd]/[wen]) =+ .^(=cass %cw /[ego]/[syd]/[wen])
?: =(ud.cass 0) ?: =(ud.cass 0)
leaf+"desk does not yet exist: {<syd>}" leaf+"desk does not yet exist: {<syd>}"