mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
|invite 'email' stars+n, |invite 'email' planets+m
This commit is contained in:
parent
f80695ed96
commit
ae17d69ca3
@ -9,11 +9,33 @@
|
||||
/+ womb
|
||||
=* invite invite:womb
|
||||
=* reference reference:womb
|
||||
|%
|
||||
++ plural
|
||||
|= {a/@u b/tape} ^+ b
|
||||
?: =(1 a) "one {b}"
|
||||
=; n/tape "{n} {b}s"
|
||||
~| plural-stub+a ::TODO expand
|
||||
%- trip
|
||||
%+ snag a ^~
|
||||
%+ weld
|
||||
/no/''/two/three/four/five/six/seven/eight/nine/ten/elven/twelve
|
||||
/thirteen/fourteen/fifteen/sixteen/seventeen/eighteen/nineteen/twenty
|
||||
::
|
||||
++ type $%({$planets planets/@u} {$stars stars/@u})
|
||||
--
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{{who/@t $~} ref/(unit (each ship mail:womb)) sta/@}
|
||||
{{who/@t etc/$@($~ {typ/type $~})} ref/(unit (each ship mail:womb))}
|
||||
==
|
||||
?~ etc $(etc ~[planets+2])
|
||||
:- %womb-invite
|
||||
^- {cord reference invite}
|
||||
=+ inv=(scot %uv (end 7 1 eny))
|
||||
[inv ref [who 10 sta "You have been invited to Urbit: {(trip inv)}" "This is an invite of 10 planets"]]
|
||||
=; d/[planets=@u stars=@u inf=tape]
|
||||
[inv ref [who planets.d stars.d "Your invite for {inf.d}: {(trip inv)}" ~]]
|
||||
::
|
||||
?: =(0 +.typ.etc) ~|(%empty-invite !!)
|
||||
?- -.typ.etc
|
||||
$stars [planets=0 stars.typ.etc (plural stars.typ.etc "star")]
|
||||
$planets [planets.typ.etc stars=0 (plural planets.typ.etc "planet")]
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user