mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 16:09:13 +03:00
issuing ship wear leveling
This commit is contained in:
parent
1d16b291f7
commit
ce0a1af602
@ -242,13 +242,16 @@
|
|||||||
?~ c [c d]
|
?~ c [c d]
|
||||||
[(some (rep a b u.c ~)) d]
|
[(some (rep a b u.c ~)) d]
|
||||||
::
|
::
|
||||||
|
++ in-list
|
||||||
|
|* {a/(list) b/@u} ^+ [(snag *@ a) b]
|
||||||
|
=+ c=(lent a)
|
||||||
|
[(snag (mod b c) a) (div b c)]
|
||||||
|
::
|
||||||
++ shop-star
|
++ shop-star
|
||||||
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
||||||
?~ lax [~ nth]
|
?: =(~ lax) [~ nth]
|
||||||
=^ out nth
|
=^ sel nth (in-list lax nth)
|
||||||
(prefix 3 who.i.lax (~(get fo r.i.lax) nth))
|
(prefix 3 who.sel (~(get fo r.sel) nth))
|
||||||
?^ out [out nth]
|
|
||||||
$(lax t.lax)
|
|
||||||
::
|
::
|
||||||
++ shop-planets
|
++ shop-planets
|
||||||
|= nth/@u ^- cursor
|
|= nth/@u ^- cursor
|
||||||
@ -259,20 +262,16 @@
|
|||||||
(shop-planet-gal nth (issuing galaxies.office))
|
(shop-planet-gal nth (issuing galaxies.office))
|
||||||
::
|
::
|
||||||
++ shop-planet
|
++ shop-planet
|
||||||
|= {nth/@u sat/(list {who/@p * q/(foil planet)})} ^- cursor
|
|= {nth/@u sta/(list {who/@p * q/(foil planet)})} ^- cursor
|
||||||
?~ sat [~ nth]
|
?: =(~ sta) [~ nth]
|
||||||
=^ out nth
|
=^ sel nth (in-list sta nth)
|
||||||
(prefix 4 who.i.sat (~(get fo q.i.sat) nth))
|
(prefix 4 who.sel (~(get fo q.sel) nth))
|
||||||
?^ out [out nth]
|
|
||||||
$(sat t.sat)
|
|
||||||
::
|
::
|
||||||
++ shop-planet-gal
|
++ shop-planet-gal
|
||||||
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
|= {nth/@u lax/(list {who/@p * * r/(foil star)})} ^- cursor
|
||||||
?~ lax [~ nth]
|
?: =(~ lax) [~ nth]
|
||||||
=^ out nth
|
=^ sel nth (in-list lax nth)
|
||||||
(shop-planet nth (issuing-under 3 who.i.lax box.r.i.lax))
|
(shop-planet nth (issuing-under 3 who.sel box.r.sel))
|
||||||
?^ out [out nth]
|
|
||||||
$(lax t.lax)
|
|
||||||
::
|
::
|
||||||
++ peek-x-shop
|
++ peek-x-shop
|
||||||
|= tyl/path ^- (unit (unit {$ships (list @p)}))
|
|= tyl/path ^- (unit (unit {$ships (list @p)}))
|
||||||
|
Loading…
Reference in New Issue
Block a user