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