mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 10:05:09 +03:00
Various fixes and improvements.
This commit is contained in:
parent
b5eacfa6b9
commit
a259e04a28
@ -50,3 +50,25 @@ j2_mcy(Pt6, al, bunt)(u2_wire wir_r,
|
||||
return pro;
|
||||
}
|
||||
}
|
||||
|
||||
/* ~(whip al gen)
|
||||
*/
|
||||
u2_noun // transfer
|
||||
j2_mcy(Pt6, al, whip)(u2_wire wir_r,
|
||||
u2_noun van, // retain
|
||||
u2_noun gen, // retain
|
||||
u2_noun axe) //
|
||||
{
|
||||
u2_noun cor = _al_core(wir_r, van, gen);
|
||||
u2_weak hoc = u2_ds_look(wir_r, cor, "whip");
|
||||
|
||||
if ( u2_none == hoc ) {
|
||||
return u2_cm_bail(c3__fail);
|
||||
} else {
|
||||
u2_noun gat = u2_nk_soft(wir_r, cor, hoc);
|
||||
u2_noun pro = u2_nk_mong(wir_r, gat, u2k(axe));
|
||||
|
||||
u2_rz(wir_r, hoc);
|
||||
return pro;
|
||||
}
|
||||
}
|
||||
|
@ -402,6 +402,20 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
case c3__bcpt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mint_used(wir_r);
|
||||
{
|
||||
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__read, p_gen);
|
||||
u2_noun axe = u2h(sep);
|
||||
u2_noun rex = j2_mcy(Pt6, al, whip)(wir_r, van, q_sut, axe);
|
||||
u2_noun ret = _mint_in(wir_r, van, sut, gol, rex);
|
||||
|
||||
u2z(sep);
|
||||
u2z(rex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mint_used(wir_r);
|
||||
{
|
||||
|
@ -350,6 +350,28 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
case c3__bcpt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mint_used(wir_r);
|
||||
{
|
||||
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__read, p_gen);
|
||||
u2_noun pox = j2_mcy(Pt6, ut, seep)(wir_r, van, dox, c3__read, p_gen);
|
||||
u2_noun axe = u2h(sep);
|
||||
|
||||
if ( axe != u2h(pox) ) {
|
||||
return u2_bl_error(wir_r, "mull-bonk-wing");
|
||||
}
|
||||
else {
|
||||
u2_noun rex = j2_mcy(Pt6, al, whip)(wir_r, van, q_sut, axe);
|
||||
u2_noun ret = _mull_in(wir_r, van, sut, gol, dox, rex);
|
||||
|
||||
u2z(sep);
|
||||
u2z(pox);
|
||||
u2z(rex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_mull_used(wir_r);
|
||||
{
|
||||
|
@ -196,7 +196,20 @@
|
||||
}
|
||||
else switch ( u2_h(gen) ) {
|
||||
default: goto open;
|
||||
|
||||
|
||||
case c3__bcpt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_play_used(wir_r);
|
||||
{
|
||||
u2_noun sep = j2_mcy(Pt6, ut, seep)(wir_r, van, sut, c3__read, p_gen);
|
||||
u2_noun axe = u2h(sep);
|
||||
u2_noun rex = j2_mcy(Pt6, al, whip)(wir_r, van, q_sut, axe);
|
||||
u2_noun ret = _play_x(wir_r, van, sut, rex);
|
||||
|
||||
u2z(sep);
|
||||
u2z(rex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
|
||||
_play_used(wir_r);
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* include/wire.h
|
||||
* include/wire.h
|
||||
**
|
||||
** This file is in the public domain.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user