mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-11 08:55:23 +03:00
Ignore %present commands that wouldn't actually change anything.
This commit is contained in:
parent
3e0a681c2b
commit
66f87e1fab
@ -260,15 +260,14 @@
|
||||
::
|
||||
|= {who/ship nos/(set naem) dif/diff-status}
|
||||
^+ +>
|
||||
%- ta-deltas
|
||||
%+ murn ~(tap in nos)
|
||||
|= n/naem
|
||||
^- (unit delta)
|
||||
?. (~(has by stories) n) ~
|
||||
:: only have presence if you have write permission.
|
||||
?. (~(so-admire so n ~ (~(got by stories) n)) who)
|
||||
~
|
||||
`[%story n %status [our.bol n] who dif]
|
||||
=+ nol=~(tap in nos)
|
||||
|-
|
||||
?~ nol +>.^$
|
||||
=. +>.^$
|
||||
?. (~(has by stories) i.nol) +>.^$
|
||||
=+ soy=(~(got by stories) i.nol)
|
||||
so-done:(~(so-present so i.nol ~ soy) who dif)
|
||||
$(nol t.nol)
|
||||
::
|
||||
++ ta-action ::< apply client action
|
||||
::> performs action sent by a client.
|
||||
@ -916,6 +915,21 @@
|
||||
::> arms that make miscellaneous changes to this story.
|
||||
::+|
|
||||
::
|
||||
++ so-present ::< accept status diff
|
||||
|= {who/ship dif/diff-status}
|
||||
^+ +>
|
||||
:: only have presence if you have write permission.
|
||||
?. |((so-admire who) ?=($remove -.dif)) +>
|
||||
:: ignore if it won't result in change.
|
||||
?. ?: ?=($remove -.dif) (~(has by locals) who)
|
||||
?| !(~(has by locals) who)
|
||||
::
|
||||
=+ (~(got by locals) who)
|
||||
!=(- (change-status - dif))
|
||||
==
|
||||
+>
|
||||
(so-delta-our %status so-cir who dif)
|
||||
::
|
||||
++ so-config-full ::< split full config
|
||||
::> split a %full config delta up into multiple
|
||||
::> smaller ones, for easier application.
|
||||
|
Loading…
Reference in New Issue
Block a user