mirror of
https://github.com/urbit/shrub.git
synced 2024-12-04 14:58:10 +03:00
add |bonus womb balance expander
This commit is contained in:
parent
f296388df4
commit
c0418a80d1
15
gen/hood/bonus.hoon
Normal file
15
gen/hood/bonus.hoon
Normal file
@ -0,0 +1,15 @@
|
||||
::
|
||||
:::: /hoon/reinvite/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvI bec/beak}
|
||||
{{pas/@uvG opt/$@($~ {planets/@u $@($~ {stars/@u $~})})} $~}
|
||||
==
|
||||
?~ opt $(opt [planets=1]~)
|
||||
?~ +.opt $(+.opt [stars=0]~)
|
||||
:- %womb-bonus
|
||||
[(scot %uv pas) 1 0]
|
@ -142,6 +142,7 @@
|
||||
{$release-ships (list ship)}
|
||||
{$claim aut/passcode her/@p}
|
||||
{$recycle who/mail him/knot tik/knot}
|
||||
{$bonus tid/cord pla/@ud sta/@ud}
|
||||
{$invite tid/cord ref/reference inv/invite}
|
||||
{$reinvite aut/passcode inv/invite}
|
||||
==
|
||||
@ -604,6 +605,7 @@
|
||||
+>
|
||||
?- -.pok.i.a
|
||||
$claim (teba (poke-claim +.pok.i.a))
|
||||
$bonus (teba (poke-bonus +.pok.i.a))
|
||||
$invite (teba (poke-invite +.pok.i.a))
|
||||
$report (teba (poke-report +.pok.i.a))
|
||||
$release (teba (poke-release +.pok.i.a))
|
||||
@ -613,6 +615,19 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ poke-bonus :: expand invitation
|
||||
|= {tid/cord pla/@ud sta/@ud}
|
||||
=< abet
|
||||
=. log-transaction (log-transaction %bonus +<)
|
||||
?> |(=(our src) =([~ src] boss)) :: priveledged
|
||||
=/ pas ~|(bad-invite+tid `passcode`(slav %uv tid))
|
||||
%_ .
|
||||
bureau
|
||||
%+ ~(put by bureau) (shaf %pass pas)
|
||||
=/ bal ~|(%bad-passcode (~(got by bureau) (shaf %pass pas)))
|
||||
bal(planets (add pla planets.bal), stars (add sta stars.bal))
|
||||
==
|
||||
::
|
||||
++ poke-invite :: create invitation
|
||||
|= {tid/cord ref/reference inv/invite}
|
||||
=< abet
|
||||
|
Loading…
Reference in New Issue
Block a user