Refactored ++work's ++react to always supply the relevant action.

This commit is contained in:
Fang 2017-06-20 17:52:44 -07:00
parent 60f5ed19d1
commit 29cff5f815

View File

@ -285,8 +285,8 @@
++ react ::< new reaction ++ react ::< new reaction
::> ::>
:: ::
|= rac/reaction |= {res/?($info $fail) wat/cord}
(ta-delta %react red rac) (ta-delta %react red [res wat `act])
:: ::
++ affect ::< delta to story ++ affect ::< delta to story
::> ::>
@ -294,8 +294,7 @@
|= {nom/knot dif/diff-story} |= {nom/knot dif/diff-story}
?: (~(has by stories) nom) ?: (~(has by stories) nom)
(impact nom dif) (impact nom dif)
%- react (react %fail (crip "no story {(trip nom)}"))
[%fail (crip "no story {(trip nom)}") `act]
:: ::
++ impact ::< delta for story ++ impact ::< delta for story
::> ::>
@ -319,8 +318,7 @@
?. ?=(?($white $green) typ) ~ ?. ?=(?($white $green) typ) ~
[our.bol ~ ~] [our.bol ~ ~]
== ==
%- react (react %fail (crip "{(trip nom)}: already exists"))
[%fail (crip "{(trip nom)}: already exists") `act]
:: ::
++ action-delete ::< delete + announce ++ action-delete ::< delete + announce
::> delete story {nom}, optionally announcing the ::> delete story {nom}, optionally announcing the
@ -354,8 +352,7 @@
|= {nom/knot inv/? sis/(set ship)} |= {nom/knot inv/? sis/(set ship)}
=+ soy=(~(get by stories) nom) =+ soy=(~(get by stories) nom)
?~ soy ?~ soy
%^ ta-delta %react red (react %fail (crip "no story {(trip nom)}"))
[%fail (crip "no story {(trip nom)}") `act]
so-done:(~(so-permit so nom ~ u.soy) inv sis) so-done:(~(so-permit so nom ~ u.soy) inv sis)
:: ::
++ action-source ::< un/sub p to/from r ++ action-source ::< un/sub p to/from r