2016-10-22 02:44:39 +03:00
|
|
|
:: Generate random moon and corresponding ticket
|
2015-10-20 21:12:22 +03:00
|
|
|
::
|
2016-02-05 06:05:37 +03:00
|
|
|
:::: /hoon/moon/gen
|
2015-10-20 21:12:22 +03:00
|
|
|
::
|
2016-02-17 04:40:32 +03:00
|
|
|
/? 310
|
2017-06-18 23:23:20 +03:00
|
|
|
/- sole
|
|
|
|
[. sole]
|
2015-10-20 21:12:22 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
!:
|
2017-06-18 23:23:20 +03:00
|
|
|
:- %ask
|
2016-08-11 21:15:06 +03:00
|
|
|
|= $: {now/@da eny/@uvJ bec/beak}
|
2016-02-17 07:34:06 +03:00
|
|
|
$~
|
|
|
|
$~
|
2015-10-20 21:12:22 +03:00
|
|
|
==
|
2017-06-18 23:23:20 +03:00
|
|
|
=/ ran (clan p.bec)
|
2016-06-17 05:09:31 +03:00
|
|
|
?: ?=({?($earl $pawn)} ran)
|
2017-06-18 23:23:20 +03:00
|
|
|
%- sole-so
|
|
|
|
:- %tang :_ ~
|
|
|
|
leaf+"can't create a moon from a {?:(?=($earl ran) "moon" "comet")}"
|
|
|
|
=/ mon (mix (lsh 5 1 (end 5 1 eny)) p.bec)
|
|
|
|
=/ tic .^(@ /a/(scot %p p.bec)/tick/(scot %da now)/(scot %p mon))
|
|
|
|
%+ sole-yo
|
|
|
|
leaf+"(see https://github.com/urbit/arvo/issues/327 for details)"
|
|
|
|
%+ sole-yo
|
|
|
|
:- %leaf
|
|
|
|
;: weld
|
|
|
|
"WARNING: linking a moon to your "
|
|
|
|
?-(ran $czar "galaxy", $king "star", $duke "planet")
|
|
|
|
" can cause networking bugs"
|
|
|
|
==
|
|
|
|
%+ sole-lo
|
|
|
|
[& %$ "enter y/yes to continue: "]
|
|
|
|
|= inp/tape
|
|
|
|
?. |(=("y" inp) =("yes" inp))
|
|
|
|
(sole-so [%tang leaf+"canceled" ~])
|
|
|
|
(sole-so [%tang leaf+"moon: {<`@p`mon>}; ticket: {<`@p`tic>}" leaf+"" ~])
|