mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
naive: sponsorship fixes
This commit is contained in:
parent
99955ce8d3
commit
dd57a72a4d
@ -572,7 +572,7 @@
|
||||
=* parent=@ i.t.t.topics.log
|
||||
=/ parent-point (get-point state parent)
|
||||
?> ?=(^ parent-point)
|
||||
?: |(?=(%l2 -.point) ?=(%l2 -.u.parent-point)) `point
|
||||
?: ?=(%l2 -.u.parent-point) `point
|
||||
:- [%point ship %sponsor `parent]~
|
||||
point(escape.net ~, sponsor.net [%& parent])
|
||||
::
|
||||
@ -594,12 +594,16 @@
|
||||
:- [%point ship %sponsor ~]~
|
||||
point(has.sponsor.net %|)
|
||||
::
|
||||
:: The rest can be done by any ship on L1, even if their spawn proxy
|
||||
:: is set to L2
|
||||
::
|
||||
?: ?=(%l2 -.point) `point
|
||||
::
|
||||
?: =(log-name escape-requested:log-names)
|
||||
?> ?=([@ ~] t.t.topics.log)
|
||||
=* parent=@ i.t.t.topics.log
|
||||
=/ parent-point (get-point state parent)
|
||||
?> ?=(^ parent-point)
|
||||
?: |(?=(%l2 -.point) ?=(%l2 -.u.parent-point)) `point
|
||||
:- [%point ship %escape `parent]~
|
||||
point(escape.net `parent)
|
||||
::
|
||||
@ -608,15 +612,9 @@
|
||||
=* parent=@ i.t.t.topics.log
|
||||
=/ parent-point (get-point state parent)
|
||||
?> ?=(^ parent-point)
|
||||
?: |(?=(%l2 -.point) ?=(%l2 -.u.parent-point)) `point
|
||||
:- [%point ship %escape ~]~
|
||||
point(escape.net ~)
|
||||
::
|
||||
:: The rest can be done by any ship on L1, even if their spawn proxy
|
||||
:: is set to L2
|
||||
::
|
||||
?: ?=(%l2 -.point) `point
|
||||
::
|
||||
?: =(log-name broke-continuity:log-names)
|
||||
?> ?=(~ t.t.topics.log)
|
||||
=* rift=@ data.log
|
||||
@ -756,6 +754,7 @@
|
||||
^- (unit [effects ^state])
|
||||
=/ point (get-point state ship)
|
||||
?~ point (debug %strange-ship ~)
|
||||
?. ?=(%l2 -.u.point) (debug %ship-not-on-l2 ~)
|
||||
=/ res=(unit [=effects new-point=^point]) (fun u.point rest)
|
||||
?~ res
|
||||
~
|
||||
|
Loading…
Reference in New Issue
Block a user