Better queue management.

This commit is contained in:
C. Guy Yarvin 2015-01-19 14:02:00 -08:00
parent 5658b03245
commit 17c020d0de
3 changed files with 14 additions and 9 deletions

View File

@ -537,6 +537,8 @@
^- [(list move) _..^^$]
=+ mut=(~(get by pol.all) our)
?^ mut
?: &(?=([@ @ *] imp) !(~(has by bum.u.mut) imp)) :: %took for dead imps
[~ ..^^$]
abet:work:(quem:(boar:(gent our imp u.mut) hen law) kon)
((gape hen law) our imp kon)
::
@ -1163,9 +1165,9 @@
=+ qol=(~(get by qel.sat) ost)
:: ~& [%yawn-told-has qol [our hen]]
=+ qul=?~(qol 1 +(u.qol))
:: ?: =(10 qul)
:: ~& [%yawn-told-full our hen]
:: +>.$(qic.sat `[hen %nuke p.kon])
?: =(10 qul)
~& [%yawn-told-full our hen]
+>.$(qic.sat `[hen %nuke p.kon])
+>.$(qic.sat ~, qel.sat (~(put by qel.sat) ost qul))
::
%load

View File

@ -396,8 +396,8 @@
==
%+ welp
?~(pot.res ~ (spam %rush %prompt u.pot.res))
%- zing
(turn (flop tak.res) |=(a=cord (spam %rush %txt a)))
%^ spam %rush %tang
(turn (flop tak.res) |=(a=cord [%leaf (trip a)]))
::
++ pour
|= [ost=bone pax=path sih=*]
@ -414,8 +414,8 @@
:_ +>.$
%+ welp
?~(pot.res ~ (spam %rush %prompt u.pot.res))
%- zing
(turn (flop tak.res) |=(a=cord (spam %rush %txt a)))
%^ spam %rush %tang
(turn (flop tak.res) |=(a=cord [%leaf (trip a)]))
:_ +>.$
:- [ost %give +.sih]
?+ +<.sih ~

View File

@ -51,6 +51,7 @@
[%mess p=hapt q=ship r=cage] ::
[%meta p=vase] ::
[%nuke p=hapt q=ship] ::
[%took p=hapt q=ship] ::
== == == ::
++ mand ,[p=term q=(list twig)] :: name and arguments
++ coma ::
@ -530,6 +531,8 @@
[[ost %give +.sih]~ +>.$]
?~ pax ~& %no-path !!
?> ?=([%child span ?(%fork %out %main) ~] pax)
=+ abet:(purr:(ve hid ost vat) i.t.pax i.t.t.pax typ sih)
[-< +>.$(vat ->)]
=^ moz vat abet:(purr:(ve hid ost vat) i.t.pax i.t.t.pax typ sih)
:_ +>.$
?. ?=(%rush +<.sih) moz
[[ost %pass pax %g %took [our.hid i.t.pax imp.hid] our.hid] moz]
--