ames: fix saxo scry; emit on sponsor change too

This commit is contained in:
Ted Blackman 2023-09-01 11:28:31 -04:00
parent 0c6f3030f3
commit f077e48112

View File

@ -1856,6 +1856,11 @@
*peer-state *peer-state
+.u.ship-state +.u.ship-state
:: ::
++ get-sponsors
;; (list ship)
=< q.q %- need %- need
(rof ~ /ames %j `beam`[[our %saxo %da now] /(scot %p our)])
::
+| %tasks +| %tasks
:: +on-take-flub: vane not ready to process message, pretend it :: +on-take-flub: vane not ready to process message, pretend it
:: was never delivered :: was never delivered
@ -2677,7 +2682,7 @@
^+ event-core ^+ event-core
:: ::
?: =(our ship) ?: =(our ship)
event-core (emit unix-duct.ames-state %give %saxo get-sponsors)
:: ::
?~ sponsor ?~ sponsor
%- (slog leaf+"ames: {(scow %p ship)} lost sponsor, ignoring" ~) %- (slog leaf+"ames: {(scow %p ship)} lost sponsor, ignoring" ~)
@ -2704,6 +2709,7 @@
:: ::
?: =(our ship) ?: =(our ship)
=. rift.ames-state rift.point =. rift.ames-state rift.point
=. event-core (emit unix-duct.ames-state %give %saxo get-sponsors)
$(points t.points) $(points t.points)
:: ::
?. (~(has by keys.point) life.point) ?. (~(has by keys.point) life.point)
@ -2845,17 +2851,12 @@
:- flow/`[~[/ames] /dead-flow `@da`(add now ~m2)] :- flow/`[~[/ames] /dead-flow `@da`(add now ~m2)]
cork/`[~[/ames] /recork `@da`(add now ~d1)] cork/`[~[/ames] /recork `@da`(add now ~d1)]
:: ::
=/ sponsors
;; (list ship)
=< q.q %- need %- need
(rof ~ /ames %j /(scot %p our)/saxo/(scot %da now)/(scot %p our))
::
%- emil %- emil
%+ weld %+ weld
dead-moves dead-moves
^- (list move) ^- (list move)
:~ [duct %give %turf turfs] :~ [duct %give %turf turfs]
[duct %give %saxo sponsors] [duct %give %saxo get-sponsors]
[duct %pass /ping %g %deal [our our /ames] %ping %poke %noun !>(%kick)] [duct %pass /ping %g %deal [our our /ames] %ping %poke %noun !>(%kick)]
== ==
:: +on-vega: handle kernel reload :: +on-vega: handle kernel reload